Ignore:
Timestamp:
02/09/23 14:06:45 (21 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
6a9006d, a9ffccd
Parents:
0ba5d1a
Message:

Reservation Implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/service/Impl/SeatServiceImpl.java

    r0ba5d1a r00fa72f  
    11package com.example.moviezone.service.Impl;
    22
     3import com.example.moviezone.model.Category;
    34import com.example.moviezone.model.Projection_Room;
    45import com.example.moviezone.model.Seat;
     
    89
    910import java.util.List;
     11import java.util.Optional;
    1012
    1113@Service
    1214public class SeatServiceImpl implements SeatService {
     15
     16
    1317    private final SeatRepository seatRepository;
    1418
     
    2630        return seatRepository.findAllByProjection(projection_room);
    2731    }
     32
     33    @Override
     34    public List<Seat> findAllByRoomAndCategory(Projection_Room projectionRoom, Category category) {
     35        return seatRepository.findAllByCategoryAndProjection(category,projectionRoom);
     36    }
     37
     38    @Override
     39    public Optional<Seat> getSeatById(int id) {
     40        return Optional.of(seatRepository.getById(id));
     41    }
    2842}
Note: See TracChangeset for help on using the changeset viewer.