1 | package com.tourMate.dao;
|
---|
2 |
|
---|
3 | import com.tourMate.entities.*;
|
---|
4 | import jakarta.transaction.Transactional;
|
---|
5 |
|
---|
6 | import java.util.Date;
|
---|
7 | import java.util.List;
|
---|
8 |
|
---|
9 | public interface RestaurantDao {
|
---|
10 | @Transactional
|
---|
11 | void createRestaurant(Restaurant restaurant);
|
---|
12 | List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
|
---|
13 | @Transactional
|
---|
14 | void addRestaurantImage(RestaurantImages restaurantImages);
|
---|
15 | @Transactional
|
---|
16 | void removeRestaurantImage(RestaurantImages image);
|
---|
17 | @Transactional
|
---|
18 | void saveTable(RestaurantsTable resTable);
|
---|
19 | @Transactional
|
---|
20 | RestaurantImages findRestaurantImageById(long restaurantImageId);
|
---|
21 | void deleteRestaurant(Restaurant r);
|
---|
22 | List<Restaurant> getRestaurants();
|
---|
23 | @Transactional
|
---|
24 | void addMenuToRestaurant(Menu menu);
|
---|
25 | Restaurant findRestaurantByID(long restaurantID);
|
---|
26 | List<RestaurantImages> getRestaurantImages(long restaurantID);
|
---|
27 | List<RestaurantsTable> getRestaurantTables(long restaurantID);
|
---|
28 | RestaurantsTable findTableById(long tableId);
|
---|
29 | @Transactional
|
---|
30 | void deleteTable(RestaurantsTable rt);
|
---|
31 | List<Restaurant> getRestaurantsByUser(User u);
|
---|
32 | List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
|
---|
33 | @Transactional
|
---|
34 | void saveTableAvailable(RestaurantsAvailible ra);
|
---|
35 | @Transactional
|
---|
36 | void deleteTableAvailable(RestaurantsAvailible ra);
|
---|
37 |
|
---|
38 | List<RestaurantsAvailible> getTablesAvailability();
|
---|
39 |
|
---|
40 | // List<RestaurantsAvailible> getTablesAvailability();
|
---|
41 | @Transactional
|
---|
42 | void createReservation(RestaurantReservations reservations);
|
---|
43 | @Transactional
|
---|
44 | void deleteReservation(RestaurantReservations r);
|
---|
45 | RestaurantReservations findReservationByID(long tableId);
|
---|
46 | RestaurantsAvailible findAvailableReservationByID(long availibleId);
|
---|
47 | List<RestaurantReservations> findReservationByUser(User user);
|
---|
48 | List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
|
---|
49 | List<RestaurantReservations> getReservations();
|
---|
50 | List<Restaurant> searchByRestaurantName(String restaurantName);
|
---|
51 |
|
---|
52 | List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
|
---|
53 |
|
---|
54 | List<RestaurantsTable> searchByNoSeats(int noSeats);
|
---|
55 |
|
---|
56 | List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
|
---|
57 |
|
---|
58 | List<RestaurantReservations> findPastReservationsByUser(User user);
|
---|
59 |
|
---|
60 | List<MenuImages> getMenuImages(long menuId);
|
---|
61 |
|
---|
62 | List<MenuImages> getMenuImagesByRestaurant(Restaurant restaurant);
|
---|
63 |
|
---|
64 | @Transactional
|
---|
65 | void addMenuImage(MenuImages menuImages);
|
---|
66 |
|
---|
67 | Menu findMenuId(Long menuId);
|
---|
68 |
|
---|
69 | void saveReservation(RestaurantReservations r);
|
---|
70 |
|
---|
71 | // public void createRestaurant(Restaurant restaurant, long userId);
|
---|
72 | // public void deleteRestaurant(long restaurantID);
|
---|
73 | // @Transactional
|
---|
74 | // public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
|
---|
75 | // public Restaurant findRestaurantByID (long restaurantID);
|
---|
76 | // public List<Restaurant> searchByRestaurantName(String restaurantName);
|
---|
77 | // public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
|
---|
78 | // public List<Restaurant> getRestaurants();
|
---|
79 | // @Transactional
|
---|
80 | // public void addMenuToRestaurant(long restaurantId, Menu menu);
|
---|
81 | //
|
---|
82 | // public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
|
---|
83 | //
|
---|
84 | // public void createTable(Restaurant restaurant, int noSeats);
|
---|
85 | // public void editTable(Restaurant restaurant, long tableId, int noSeats);
|
---|
86 | // public void deleteTable(long tableId);
|
---|
87 | // public List<Restaurant> getRestaurantsByUser(long userId);
|
---|
88 | // public RestaurantsTable findTableById(long tableId);
|
---|
89 | // public List<RestaurantsTable> searchByNoSeats(int noSeats);
|
---|
90 | // public List<RestaurantsTable> getRestaurantTables(long restaurantID);
|
---|
91 | //
|
---|
92 | // public void addRestaurantImage(RestaurantImages restaurantImages);
|
---|
93 | // public void removeRestaurantImage(long restaurantImageId);
|
---|
94 | // public RestaurantImages findRestaurantImageById(long restaurantImageId);
|
---|
95 | // public List<RestaurantImages> getRestaurantImages(long restaurantID);
|
---|
96 | //
|
---|
97 | // public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats);
|
---|
98 | // @Transactional
|
---|
99 | // abstract void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo);
|
---|
100 | // public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
|
---|
101 | // public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
|
---|
102 | // public void deleteTableAvailable(long tableId);
|
---|
103 | // public RestaurantsAvailible findAvailableReservationByID(long availibleId);
|
---|
104 | //
|
---|
105 | // public List<RestaurantsAvailible> getTablesAvailability();
|
---|
106 | // public void createReservation(RestaurantReservations reservations);
|
---|
107 | // public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
|
---|
108 | // public void deleteReservation(long restaurantsTableId);
|
---|
109 | // public RestaurantReservations findReservationByID(long tableId);
|
---|
110 | // public List<RestaurantReservations> findReservationByUser(User user);
|
---|
111 | // public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
|
---|
112 | // public List<RestaurantReservations> getReservations();
|
---|
113 | //
|
---|
114 | // List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
|
---|
115 | //
|
---|
116 | // List<RestaurantReservations> findPastReservationsByUser(User u);
|
---|
117 | // List<MenuImages> getMenuImages(long menuId);
|
---|
118 | // public void addMenuImage(MenuImages menuImages);
|
---|
119 | //
|
---|
120 | // Menu findMenuId(Long menuId);
|
---|
121 | //
|
---|
122 | // void saveReservation(RestaurantReservations restaurantReservations);
|
---|
123 | }
|
---|