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

Reservation Implemented

Location:
src/main/java/com/example/moviezone/repository
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/repository/CategoryRepository.java

    r0ba5d1a r00fa72f  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.Optional;
     8
    79@Repository
    810public interface CategoryRepository extends JpaRepository<Category,Integer>{
     11    Optional<Category> getByIdcategory(int id);
    912}
  • src/main/java/com/example/moviezone/repository/Projection_RoomRepository.java

    r0ba5d1a r00fa72f  
    44import com.example.moviezone.model.Projection_Room;
    55import org.springframework.data.jpa.repository.JpaRepository;
     6import org.springframework.data.jpa.repository.query.Procedure;
     7
     8import java.util.List;
    69
    710public interface Projection_RoomRepository extends JpaRepository<Projection_Room,Integer> {
     11    @Procedure("project.getRoomsForProjection")
     12    List<Projection_Room> getRoomsForProjection(int id);
    813}
  • src/main/java/com/example/moviezone/repository/SeatRepository.java

    r0ba5d1a r00fa72f  
    11package com.example.moviezone.repository;
    22
     3import com.example.moviezone.model.Category;
     4import com.example.moviezone.model.Projection;
    35import com.example.moviezone.model.Projection_Room;
    46import com.example.moviezone.model.Seat;
     
    1113public interface SeatRepository extends JpaRepository<Seat,Integer> {
    1214    List<Seat> findAllByProjection(Projection_Room projection);
     15    List<Seat> findAllByCategoryAndProjection(Category category, Projection_Room projectionRoom);
    1316}
  • src/main/java/com/example/moviezone/repository/TicketRepository.java

    r0ba5d1a r00fa72f  
    44import com.example.moviezone.model.Ticket;
    55import org.springframework.data.jpa.repository.JpaRepository;
     6import org.springframework.data.jpa.repository.query.Procedure;
    67import org.springframework.stereotype.Repository;
    78
     
    1011public interface TicketRepository extends JpaRepository<Ticket,Integer> {
    1112    List<Ticket> findAllByCustomer(Customer customer);
     13    @Procedure("project.getPriceForTicket")
     14    Integer getPriceForTicket(int id);
    1215}
Note: See TracChangeset for help on using the changeset viewer.