Changeset 00fa72f for src/main/java/com/example/moviezone/repository
- Timestamp:
- 02/09/23 14:06:45 (21 months ago)
- Branches:
- master
- Children:
- 6a9006d, a9ffccd
- Parents:
- 0ba5d1a
- 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 5 5 import org.springframework.stereotype.Repository; 6 6 7 import java.util.Optional; 8 7 9 @Repository 8 10 public interface CategoryRepository extends JpaRepository<Category,Integer>{ 11 Optional<Category> getByIdcategory(int id); 9 12 } -
src/main/java/com/example/moviezone/repository/Projection_RoomRepository.java
r0ba5d1a r00fa72f 4 4 import com.example.moviezone.model.Projection_Room; 5 5 import org.springframework.data.jpa.repository.JpaRepository; 6 import org.springframework.data.jpa.repository.query.Procedure; 7 8 import java.util.List; 6 9 7 10 public interface Projection_RoomRepository extends JpaRepository<Projection_Room,Integer> { 11 @Procedure("project.getRoomsForProjection") 12 List<Projection_Room> getRoomsForProjection(int id); 8 13 } -
src/main/java/com/example/moviezone/repository/SeatRepository.java
r0ba5d1a r00fa72f 1 1 package com.example.moviezone.repository; 2 2 3 import com.example.moviezone.model.Category; 4 import com.example.moviezone.model.Projection; 3 5 import com.example.moviezone.model.Projection_Room; 4 6 import com.example.moviezone.model.Seat; … … 11 13 public interface SeatRepository extends JpaRepository<Seat,Integer> { 12 14 List<Seat> findAllByProjection(Projection_Room projection); 15 List<Seat> findAllByCategoryAndProjection(Category category, Projection_Room projectionRoom); 13 16 } -
src/main/java/com/example/moviezone/repository/TicketRepository.java
r0ba5d1a r00fa72f 4 4 import com.example.moviezone.model.Ticket; 5 5 import org.springframework.data.jpa.repository.JpaRepository; 6 import org.springframework.data.jpa.repository.query.Procedure; 6 7 import org.springframework.stereotype.Repository; 7 8 … … 10 11 public interface TicketRepository extends JpaRepository<Ticket,Integer> { 11 12 List<Ticket> findAllByCustomer(Customer customer); 13 @Procedure("project.getPriceForTicket") 14 Integer getPriceForTicket(int id); 12 15 }
Note:
See TracChangeset
for help on using the changeset viewer.