Index: src/main/java/com/tourMate/config/SecurityConfig.java
===================================================================
--- src/main/java/com/tourMate/config/SecurityConfig.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/config/SecurityConfig.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -5,6 +5,6 @@
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@@ -13,5 +13,5 @@
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+import org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler;
 import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
 import org.springframework.web.cors.CorsConfiguration;
@@ -21,9 +21,13 @@
 import java.util.Arrays;
 
-import static org.springframework.security.config.Customizer.withDefaults;
-
 @Configuration
 @EnableWebSecurity
 public class SecurityConfig {
+
+    private final UserSecurity userSecurity;
+
+    public SecurityConfig(UserSecurity userSecurity) {
+        this.userSecurity = userSecurity;
+    }
 
     @Bean
@@ -64,6 +68,6 @@
                             try {
                                 authz
-                                        .requestMatchers(new AntPathRequestMatcher("/1/hasBusiness")).permitAll()
-                                        .requestMatchers(new AntPathRequestMatcher("/business/1/unapproved")).permitAll()
+                                        .requestMatchers(new AntPathRequestMatcher("/{userId}/hasBusiness")).access(userSecurity)
+                                        .requestMatchers(new AntPathRequestMatcher("/business/*/unapproved")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/register")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/hotel/search")).permitAll()
@@ -71,11 +75,15 @@
                                         .requestMatchers(new AntPathRequestMatcher("/restaurant/search")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/upload")).permitAll()
-                                        .requestMatchers(new AntPathRequestMatcher("/business/*")).hasAnyAuthority("SUPERADMIN")
-                                        .anyRequest().authenticated()
+                                        .requestMatchers(new AntPathRequestMatcher("/business/approve/*")).hasAnyAuthority("SUPERADMIN")
+                                        .requestMatchers(new AntPathRequestMatcher("/business/add/*")).authenticated()
+                                        .requestMatchers(new AntPathRequestMatcher("/*/user/{userId}")).access(userSecurity)
+                                        .anyRequest().permitAll()
+//                                        .anyRequest().authenticated()
                                         .and()
-                                        .formLogin().loginPage("http://localhost:3000/login")
+                                        .formLogin()
                                         .loginProcessingUrl("/api/login").usernameParameter("username").passwordParameter("password")
                                         .successHandler((request, response, authentication) -> {
                                             response.setStatus(HttpServletResponse.SC_OK);
+                                            response.setCharacterEncoding("UTF-8");
                                             response.setContentType("application/json");
                                             response.getWriter().print("{\"message\": \"Login successful\",");
@@ -85,5 +93,6 @@
                                         .failureHandler((request, response, exception) -> {
                                             response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-                                            response.getWriter().print("Pukla veza\n" + exception.getMessage());
+                                            response.sendRedirect("/login");
+                                            response.getWriter().print("Neuspesna najava\n" + exception.getMessage());
                                             response.getWriter().flush();
                                         })
@@ -93,5 +102,5 @@
                                         .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
                                         .and()
-                                        .logout()
+                                        .logout().logoutSuccessHandler((new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)))
                                         .permitAll();
 
Index: src/main/java/com/tourMate/config/UserSecurity.java
===================================================================
--- src/main/java/com/tourMate/config/UserSecurity.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
+++ src/main/java/com/tourMate/config/UserSecurity.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -0,0 +1,33 @@
+package com.tourMate.config;
+
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.User;
+import com.tourMate.services.HotelManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authorization.AuthorizationDecision;
+import org.springframework.security.authorization.AuthorizationManager;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.access.intercept.RequestAuthorizationContext;
+import org.springframework.stereotype.Component;
+
+import java.util.function.Supplier;
+
+@Component
+public class UserSecurity implements AuthorizationManager<RequestAuthorizationContext> {
+
+    @Override
+    public AuthorizationDecision check(Supplier authenticationSupplier, RequestAuthorizationContext ctx) {
+        Long userId = Long.parseLong(ctx.getVariables().get("userId"));
+        Authentication authentication = (Authentication) authenticationSupplier.get();
+        return new AuthorizationDecision(hasUserId(authentication, userId));
+    }
+
+    public boolean hasUserId(Authentication authentication, Long userId) {
+        System.out.println(userId);
+        User user = (User) authentication.getPrincipal();
+        System.out.println(user.getUserID());
+        System.out.println(authentication.getPrincipal());
+        return userId == user.getUserID();
+    }
+
+}
Index: src/main/java/com/tourMate/controllers/HotelController.java
===================================================================
--- src/main/java/com/tourMate/controllers/HotelController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/controllers/HotelController.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -2,4 +2,6 @@
 
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
@@ -50,5 +52,5 @@
     }
 
-    @GetMapping(path = "/hotel/list/{id}")
+    @GetMapping(path = "/hotel/{id}/list")
     public ResponseEntity<Hotels> getHotelById (@PathVariable(name = "id") long hotelId)
     {
@@ -104,7 +106,8 @@
     //HOTEL ROOM CRUD
     @PostMapping(path = "/hotel/rooms/add")
-    public void addRoom(@RequestBody HotelRoom room, @RequestParam(name = "hotelId") long hotelId) {
+    public void addRoom(@RequestBody HotelRoom room,
+                        @RequestParam(name = "hotelId") long hotelId) {
         Hotels h = hotelManager.findHotelByID(hotelId);
-        hotelManager.createRoom(h, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice());
+        hotelManager.createRoom(h, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice(), room.getNumOfBeds());
     }
 
@@ -149,5 +152,6 @@
         //HOTEL AVAILABILITY CRUD
     @PostMapping(path = "/hotel/rooms/available/{id}/add")
-    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable, @PathVariable long id)
+    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable,
+                                 @PathVariable long id)
     {
         HotelRoom hotelRoom = hotelManager.findRoomById(id);
@@ -178,14 +182,17 @@
     public List<HotelRoomAvailable> getRoomAvailability(@PathVariable Long id)
     {
-        return hotelManager.getRoomsAvailibility();
+        return hotelManager.getRoomsAvailableById(id);
     }
 
     @GetMapping(path = "/hotel/search")
-    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation, @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
-                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo, @RequestParam(name = "numBeds") int numBeds)
-    {
-        System.out.println(hotelLocation);
+    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation,
+                                               @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
+                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo,
+                                               @RequestParam(name = "numBeds") int numBeds,
+                                               @RequestParam(name = "flexible") Boolean flexible)
+    {
+        System.out.println(flexible);
         System.out.println(dateFrom + " " + dateTo);
-        return hotelManager.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numBeds);
+        return hotelManager.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numBeds, flexible);
     }
 
@@ -203,5 +210,4 @@
     }
 
-<<<<<<< HEAD
     @GetMapping(path = "/hotel/{id}/reservations/active")
     public List<HotelReservationDto> getActiveReservationsForHotel(@PathVariable Long id)
@@ -233,5 +239,9 @@
         return hotelManager.getRoomImages(id);
     }
-=======
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
+
+    @PostMapping("/hotel/{id}/cancel")
+    public void cancelHotelReservation(@PathVariable Long id){
+        hotelManager.deleteReservation(id);
+    }
+
 }
Index: src/main/java/com/tourMate/controllers/ImagesController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ImagesController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ 	(revision )
@@ -1,54 +1,0 @@
-package com.tourMate.controllers;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-@CrossOrigin("*")
-@RestController
-@RequestMapping("/images")
-class ImageController {
-
-    private static final Logger logger = LoggerFactory.getLogger(ImageController.class);
-
-    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    public ResponseEntity uploadFile(@RequestParam MultipartFile file, @RequestParam String type) {
-
-        try
-        {
-            Path desktopPath = Paths.get(System.getProperty("user.home"), "Desktop\\images_tm");
-            Path filePath = desktopPath.resolve(file.getOriginalFilename());
-            System.out.println(filePath);
-            file.transferTo(filePath.toFile());
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-
-        logger.info(String.format("File name '%s' uploaded successfully.", file.getOriginalFilename()));
-        return ResponseEntity.ok().build();
-    }
-
-    @GetMapping("/download")
-    public ResponseEntity downloadFile1(@RequestParam String fileName) throws IOException {
-
-        File file = new File(fileName);
-        InputStreamResource resource = new InputStreamResource(new FileInputStream(file));
-
-        return ResponseEntity.ok()
-                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + file.getName())
-                .contentType(MediaType.APPLICATION_OCTET_STREAM)
-                .contentLength(file.length())
-                .body(resource);
-    }
-}
Index: src/main/java/com/tourMate/controllers/RestaurantController.java
===================================================================
--- src/main/java/com/tourMate/controllers/RestaurantController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/controllers/RestaurantController.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -1,5 +1,7 @@
 package com.tourMate.controllers;
 
+import com.tourMate.dto.HotelReservationDto;
 import com.tourMate.dto.RestaurantDto;
+import com.tourMate.dto.RestaurantReservationDto;
 import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.entities.*;
@@ -34,4 +36,9 @@
     }
 
+    @PostMapping("/restaurant/{id}/cancel")
+    public void removeRestaurant(@PathVariable Long id){
+        restaurantManager.deleteReservation(id);
+    }
+
     @GetMapping(path = "/restaurant")
     public List<Restaurant> showRestaurants() {
@@ -42,5 +49,5 @@
     public List<Restaurant> showRestaurantsForUser(@PathVariable(name = "id") long userId) {
 
-        return restaurantManager.getRestaurants();
+        return restaurantManager.getRestaurantsByUser(userId);
     }
 
@@ -133,5 +140,5 @@
                                   @PathVariable Long id) {
         System.out.println(restaurantsAvailible.getHourFrom() + " " + restaurantsAvailible.getHourTo());
-        restaurantManager.createTableAvailable(id, restaurantsAvailible.getHourFrom(), restaurantsAvailible.getHourTo());
+        restaurantManager.createTableAvailable(id, restaurantsAvailible.getHourFrom(), restaurantsAvailible.getHourTo(), restaurantsAvailible.getNumTables());
     }
 
@@ -170,4 +177,16 @@
         return restaurantManager.getRestaurantImages(id);
     }
+
+    @GetMapping(path = "/menu/{id}/images")
+    public List<MenuImages> getImagesForMenu(@PathVariable Long id)
+    {
+        return restaurantManager.getMenuImages(id);
+    }
+
+    @GetMapping(path = "/restaurant/{id}/reservations/active")
+    public List<RestaurantReservationDto> getActiveReservationsForHotel(@PathVariable Long id)
+    {
+        return restaurantManager.findReservationByRestaurant(id);
+    }
 }
 
Index: src/main/java/com/tourMate/controllers/ReviewController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ReviewController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/controllers/ReviewController.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -20,6 +20,7 @@
                     @RequestParam(name = "hotelId", required = false) Long hotelId,
                     @RequestParam(name = "restaurantId", required = false) Long restaurantId,
-                    @RequestParam(name = "transportId", required = false) Long transportId ) {
-        reviewManager.createReview(title, numStars, description, hotelId, restaurantId, transportId);
+                    @RequestParam(name = "transportId", required = false) Long transportId,
+                    @RequestParam(name = "reservationId") Long reservationId) {
+        reviewManager.createReview(title, numStars, description, hotelId, restaurantId, transportId, reservationId);
     }
 
Index: src/main/java/com/tourMate/controllers/TransportController.java
===================================================================
--- src/main/java/com/tourMate/controllers/TransportController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/controllers/TransportController.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -20,7 +20,8 @@
 
     // TRANSPORT CRUD //
-    @PostMapping(path = "/transport/add")
-    public void add(@RequestBody Transport transport) {
-        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), new User(), transport.getCarPlate());
+    @PostMapping(path = "/transport/add/{userId}")
+    public void add(@RequestBody Transport transport,
+                    @PathVariable Long userId) {
+        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), userId, transport.getCarPlate());
 
     }
@@ -45,5 +46,4 @@
     public TransportDto getTransport(@PathVariable(name = "id") long transportId)
     {
-        System.out.println("TUKA SUUUUUM");
         return transportManager.findTransportById(transportId);
     }
@@ -84,6 +84,4 @@
     @PostMapping(path = "/transport/available/add")
     public void add(@RequestBody TransportAvailible transportAvailable, @RequestParam(name = "transportId") long transportId) {
-        System.out.println("OREEEEEL");
-        System.out.println("DVA ORLA");
         Transport t = transportManager.getTransportById(transportId);
         List<TransportRoute> routes = transportAvailable.getRoutes().stream().toList();
@@ -127,7 +125,9 @@
 
     @GetMapping(path = "/transport/search")
-    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from, @RequestParam(name = "to") String to,
-                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date){
-        return transportManager.getTransportsAvailableByFilters(from, to, date);
+    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from,
+                                                              @RequestParam(name = "to") String to,
+                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date,
+                                                              @RequestParam(name = "numPassengers") int numPassengers){
+        return transportManager.getTransportsAvailableByFilters(from, to, date, numPassengers);
     }
 
@@ -151,3 +151,8 @@
         return transportManager.findPastTransportReservationsByUser(id);
     }
+
+    @GetMapping(path = "/transport/{id}/reservations/active")
+    public List<TransportReservation> showTransportReservationsByTransport(@PathVariable Long id) {
+        return transportManager.findTransportReservationByTransportId(id);
+    }
 }
Index: src/main/java/com/tourMate/controllers/UsersController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UsersController.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/controllers/UsersController.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -11,5 +11,4 @@
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
 import java.util.List;
 
@@ -39,4 +38,32 @@
     {
         return businessManager.getUnapprovedBusinessesOfUser(userId);
+    }
+
+    @GetMapping(path = "/business/unapproved")
+    public List<Business> getAllUnapprovedBusinesses()
+    {
+        return businessManager.getUnapprovedBusinesses();
+    }
+
+    @GetMapping(path = "/users/unapproved")
+    public List<User> getAllUnapprovedUsers()
+    {
+        return usersManager.getUnapprovedUsers();
+    }
+
+    @GetMapping(path = "/users/approve/{userId}")
+    public ResponseEntity<?> approveUserProfile(@PathVariable Long userId)
+    {
+        usersManager.approveUserProfile(userId);
+        return new ResponseEntity<>(HttpStatus.OK);
+
+
+    }
+
+    @GetMapping(path = "/business/approve/{businessId}")
+    public ResponseEntity<?> approveBusiness(@PathVariable Long businessId)
+    {
+        businessManager.approveBusiness(businessId);
+        return new ResponseEntity<>(HttpStatus.OK);
     }
 
@@ -85,4 +112,11 @@
         }
     }
+
+    @GetMapping("/users/unlock/{id}")
+    public ResponseEntity unlock(@PathVariable Long id)
+    {
+        usersManager.unlock(id);
+        return new ResponseEntity(HttpStatus.OK);
+    }
 }
 
Index: src/main/java/com/tourMate/dao/BusinessDao.java
===================================================================
--- src/main/java/com/tourMate/dao/BusinessDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/BusinessDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -9,14 +9,23 @@
 public interface BusinessDao {
 
-    @Transactional
-    void createBusiness(Business business, long userId);
-    public List<Business> getUnapprovedBusinessesOfUser(long userId);
-    public void deleteBusiness(long businessId);
-    public List<Business> getCreatedBusinesses();
-    public Business findBusinessById (long businessId);
+    List<Business> getCreatedBusinesses();
+
+    Business findBusinessById(long businessId);
 
     @Transactional
-    void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
-    public boolean hasBusiness(long userId);
+    void createBusiness(Business business);
 
+    List<Business> getUnapprovedBusinessesOfUser(User u);
+
+    @Transactional
+    void deleteBusiness(Business business);
+
+    boolean hasBusiness(User u);
+
+    List<Business> getUnapprovedBusinesses();
+
+    void approveBusiness(Business business);
+
+    @Transactional
+    void editBusiness(Business business);
 }
Index: src/main/java/com/tourMate/dao/HotelDao.java
===================================================================
--- src/main/java/com/tourMate/dao/HotelDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/HotelDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -9,47 +9,136 @@
 
 public interface HotelDao {
-    public void createHotel(Hotels hotel, long userId);
-    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
-    public void deleteHotel(long hotelId);
-    public Hotels findHotelByID (long hotelId);
-    public List<Hotels> getHotels();
-    public List<Hotels> getHotelsForUser(long userId);
-    public List<Hotels> getHotelsByLocation(String hotelLocation);
+    @Transactional
+    void createHotel(Hotels hotel);
 
-    public void deleteHotelImage(long hotelImageId);
-    public HotelsImages findHotelImageById(long hotelImageId);
-    public List<HotelsImages> getHotelImages(Hotels hotels);
-    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
+    List<Hotels> getHotels();
 
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
-    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String HotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
-    public void deleteRoom(long hotelRoomId);
-    public HotelRoom findRoomById (long hotelRoomId);
-    public List<HotelRoom> getRoomsOfHotel (long hotelId);
-    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
+    List<Hotels> getHotelsForUser(User u);
+
+    List<Hotels> getHotelsByLocation(String hotelLocation);
 
     @Transactional
-    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
-    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
-    public void deleteRoomAvailible(long hotelRoomAvailableId);
-    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
-    public List<HotelRoomAvailable> getRoomsAvailibility();
-    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
-    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds);
+    void editHotel(Hotels hotel);
 
-    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
-    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
-    public void deleteReservation(long hotelRoomReservedId);
-    public HotelRoomReservations findReservationById(long hotelRoomReservedId);
-    public List<HotelRoomReservations> findReservationByUser(User user);
-    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
-    public List<HotelRoomReservations> getReservations();
+    @Transactional
+    void deleteHotel(Hotels hotel);
+
+    Hotels findHotelByID(long hotelId);
+
+    List<HotelsImages> getHotelImages(Hotels hotel);
+
+    @Transactional
+    void addHotelImage(HotelsImages image);
+
+    @Transactional
+    void addRoomImage(HotelRoomImages x);
+
+    @Transactional
+    void  saveReservation(HotelRoomReservations hotelRoomReservations);
+
+    @Transactional
+    HotelsImages findHotelImageById(long hotelImageId);
+
+    @Transactional
+    void deleteHotelImage(HotelsImages hotelsImages);
+
+    List<HotelRoom> getRoomsOfHotel(Hotels hotel);
+
+    List<HotelRoomAvailable> getRoomsAvailable(Long id);
+
+    HotelRoom findRoomById(long hotelRoomId);
+
+    List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
+
+    @Transactional
+    void createRoom(HotelRoom hotelRoom);
+
+    @Transactional
+    void editRoom(HotelRoom hr);
+
+    @Transactional
+    void deleteRoom(HotelRoom hr);
+
+    @Transactional
+    void createRoomAvailible(HotelRoomAvailable hra);
+
+    @Transactional
+    void editRoomAvailible(HotelRoomAvailable hr);
+
+    @Transactional
+    void deleteRoomAvailible(HotelRoomAvailable hra);
+
+    HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
+
+    List<HotelRoomAvailable> getRoomsAvailibility();
+
+    List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
+
+    List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
+
+    @Transactional
+    void createReservation(HotelRoomReservations r);
+
+    @Transactional
+    void editReservation(HotelRoomReservations hr);
+
+    @Transactional
+    void deleteReservation(HotelRoomReservations hr);
+
+    HotelRoomReservations findReservationById(long hotelRoomReservedId);
+
+    List<HotelRoomReservations> findReservationByUser(User user);
+
+    List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
+
+    List<HotelRoomReservations> getReservations();
 
     List<Reviews> findReviewsByHotel(Hotels hotel);
 
     List<HotelRoomReservations> findPastReservationByUser(User u);
-
-    void addHotelImage(HotelsImages x);
-
-    void addRoomImage(HotelRoomImages x);
+//    public void createHotel(Hotels hotel, long userId);
+//    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
+//    public void deleteHotel(long hotelId);
+//    public Hotels findHotelByID (long hotelId);
+//    public List<Hotels> getHotels();
+//    public List<Hotels> getHotelsForUser(long userId);
+//    public List<Hotels> getHotelsByLocation(String hotelLocation);
+//
+//    public void deleteHotelImage(long hotelImageId);
+//    public HotelsImages findHotelImageById(long hotelImageId);
+//    public List<HotelsImages> getHotelImages(Hotels hotels);
+//    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
+//
+//    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
+//    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String HotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
+//    public void deleteRoom(long hotelRoomId);
+//    public HotelRoom findRoomById (long hotelRoomId);
+//    public List<HotelRoom> getRoomsOfHotel (long hotelId);
+//    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
+//
+//    @Transactional
+//    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
+//    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
+//    public void deleteRoomAvailible(long hotelRoomAvailableId);
+//    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
+//    public List<HotelRoomAvailable> getRoomsAvailibility();
+//    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
+//    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
+//
+//    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
+//    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
+//    public void deleteReservation(long hotelRoomReservedId);
+//    public HotelRoomReservations findReservationById(long hotelRoomReservedId);
+//    public List<HotelRoomReservations> findReservationByUser(User user);
+//    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
+//    public List<HotelRoomReservations> getReservations();
+//
+//    List<Reviews> findReviewsByHotel(Hotels hotel);
+//
+//    List<HotelRoomReservations> findPastReservationByUser(User u);
+//
+//    void addHotelImage(HotelsImages x);
+//
+//    void addRoomImage(HotelRoomImages x);
+//    void saveReservation(HotelRoomReservations hotelRoomReservations);
 }
Index: src/main/java/com/tourMate/dao/MenuDao.java
===================================================================
--- src/main/java/com/tourMate/dao/MenuDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/MenuDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -2,12 +2,33 @@
 
 import com.tourMate.entities.Menu;
+import jakarta.transaction.Transactional;
 
 import java.util.List;
 
 public interface MenuDao {
-    public void createMenu(String name, String ingredients, double price);
-    public void deleteMenu(long menuId);
-    public List<Menu> getCreatedMenus();
-    public Menu findMenuById(long menuId);
-    public void editMenu(long menuId, String name, String ingredients, double price);
+    @Transactional
+    void createMenu(Menu menu);
+
+    @Transactional
+    void deleteMenu(Menu menu);
+
+    List<Menu> getCreatedMenus();
+
+    Menu findMenuById(long menuId);
+
+    @Transactional
+    void editMenu(Menu menu);
+//    public void createMenu(String name, String ingredients, double price);
+//
+//    @Transactional
+//    void createMenu(Menu menu);
+//
+//    public void deleteMenu(long menuId);
+//
+//    @Transactional
+//    void deleteMenu(Menu menu);
+//
+//    public List<Menu> getCreatedMenus();
+//    public Menu findMenuById(long menuId);
+//    public void editMenu(long menuId, String name, String ingredients, double price);
 }
Index: src/main/java/com/tourMate/dao/RestaurantDao.java
===================================================================
--- src/main/java/com/tourMate/dao/RestaurantDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/RestaurantDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -8,49 +8,116 @@
 
 public interface RestaurantDao {
-    public void createRestaurant(Restaurant restaurant, long userId);
-    public void deleteRestaurant(long restaurantID);
     @Transactional
-    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
-    public Restaurant findRestaurantByID (long restaurantID);
-    public List<Restaurant> searchByRestaurantName(String restaurantName);
-    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
-    public List<Restaurant> getRestaurants();
+    void createRestaurant(Restaurant restaurant);
+    List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
     @Transactional
-    public void addMenuToRestaurant(long restaurantId, Menu menu);
+    void addRestaurantImage(RestaurantImages restaurantImages);
+    @Transactional
+    void removeRestaurantImage(RestaurantImages image);
+    @Transactional
+    void saveTable(RestaurantsTable resTable);
+    @Transactional
+    RestaurantImages findRestaurantImageById(long restaurantImageId);
+    void deleteRestaurant(Restaurant r);
+    List<Restaurant> getRestaurants();
+    @Transactional
+    void addMenuToRestaurant(Menu menu);
+    Restaurant findRestaurantByID(long restaurantID);
+    List<RestaurantImages> getRestaurantImages(long restaurantID);
+    List<RestaurantsTable> getRestaurantTables(long restaurantID);
+    RestaurantsTable findTableById(long tableId);
+    @Transactional
+    void deleteTable(RestaurantsTable rt);
+    List<Restaurant> getRestaurantsByUser(User u);
+    List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
+    @Transactional
+    void saveTableAvailable(RestaurantsAvailible ra);
+    @Transactional
+    void deleteTableAvailable(RestaurantsAvailible ra);
 
-    public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
+    List<RestaurantsAvailible> getTablesAvailability();
 
-    public void createTable(Restaurant restaurant, int noSeats);
-    public void editTable(Restaurant restaurant, long tableId, int noSeats);
-    public void deleteTable(long tableId);
-    public List<Restaurant> getRestaurantsByUser(long userId);
-    public RestaurantsTable findTableById(long tableId);
-    public List<RestaurantsTable> searchByNoSeats(int noSeats);
-    public List<RestaurantsTable> getRestaurantTables(long restaurantID);
+    //    List<RestaurantsAvailible> getTablesAvailability();
+    @Transactional
+    void createReservation(RestaurantReservations reservations);
+    @Transactional
+    void deleteReservation(RestaurantReservations r);
+    RestaurantReservations findReservationByID(long tableId);
+    RestaurantsAvailible findAvailableReservationByID(long availibleId);
+    List<RestaurantReservations> findReservationByUser(User user);
+    List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
+    List<RestaurantReservations> getReservations();
+    List<Restaurant> searchByRestaurantName(String restaurantName);
 
-    public void addRestaurantImage(RestaurantImages restaurantImages);
-    public void removeRestaurantImage(long restaurantImageId);
-    public RestaurantImages findRestaurantImageById(long restaurantImageId);
-    public List<RestaurantImages> getRestaurantImages(long restaurantID);
+    List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
 
-    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats);
-    @Transactional
-    abstract void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo);
-    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
-    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
-    public void deleteTableAvailable(long tableId);
-    public RestaurantsAvailible findAvailableReservationByID(long availibleId);
-
-    public List<RestaurantsAvailible> getTablesAvailability();
-    public void createReservation(RestaurantReservations reservations);
-    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
-    public void deleteReservation(long restaurantsTableId);
-    public RestaurantReservations findReservationByID(long tableId);
-    public List<RestaurantReservations> findReservationByUser(User user);
-    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
-    public List<RestaurantReservations> getReservations();
+    List<RestaurantsTable> searchByNoSeats(int noSeats);
 
     List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
 
-    List<RestaurantReservations> findPastReservationsByUser(User u);
+    List<RestaurantReservations> findPastReservationsByUser(User user);
+
+    List<MenuImages> getMenuImages(long menuId);
+
+    List<MenuImages> getMenuImagesByRestaurant(Restaurant restaurant);
+
+    @Transactional
+    void addMenuImage(MenuImages menuImages);
+
+    Menu findMenuId(Long menuId);
+
+    void saveReservation(RestaurantReservations r);
+
+//    public void createRestaurant(Restaurant restaurant, long userId);
+//    public void deleteRestaurant(long restaurantID);
+//    @Transactional
+//    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
+//    public Restaurant findRestaurantByID (long restaurantID);
+//    public List<Restaurant> searchByRestaurantName(String restaurantName);
+//    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
+//    public List<Restaurant> getRestaurants();
+//    @Transactional
+//    public void addMenuToRestaurant(long restaurantId, Menu menu);
+//
+//    public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
+//
+//    public void createTable(Restaurant restaurant, int noSeats);
+//    public void editTable(Restaurant restaurant, long tableId, int noSeats);
+//    public void deleteTable(long tableId);
+//    public List<Restaurant> getRestaurantsByUser(long userId);
+//    public RestaurantsTable findTableById(long tableId);
+//    public List<RestaurantsTable> searchByNoSeats(int noSeats);
+//    public List<RestaurantsTable> getRestaurantTables(long restaurantID);
+//
+//    public void addRestaurantImage(RestaurantImages restaurantImages);
+//    public void removeRestaurantImage(long restaurantImageId);
+//    public RestaurantImages findRestaurantImageById(long restaurantImageId);
+//    public List<RestaurantImages> getRestaurantImages(long restaurantID);
+//
+//    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats);
+//    @Transactional
+//    abstract void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo);
+//    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
+//    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
+//    public void deleteTableAvailable(long tableId);
+//    public RestaurantsAvailible findAvailableReservationByID(long availibleId);
+//
+//    public List<RestaurantsAvailible> getTablesAvailability();
+//    public void createReservation(RestaurantReservations reservations);
+//    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
+//    public void deleteReservation(long restaurantsTableId);
+//    public RestaurantReservations findReservationByID(long tableId);
+//    public List<RestaurantReservations> findReservationByUser(User user);
+//    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
+//    public List<RestaurantReservations> getReservations();
+//
+//    List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
+//
+//    List<RestaurantReservations> findPastReservationsByUser(User u);
+//    List<MenuImages> getMenuImages(long menuId);
+//    public void addMenuImage(MenuImages menuImages);
+//
+//    Menu findMenuId(Long menuId);
+//
+//    void saveReservation(RestaurantReservations restaurantReservations);
 }
Index: src/main/java/com/tourMate/dao/ReviewDao.java
===================================================================
--- src/main/java/com/tourMate/dao/ReviewDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/ReviewDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -10,18 +10,39 @@
 
 public interface ReviewDao {
-
     @Transactional
     void createReview(Reviews review);
 
-    public void deleteReview(long id);
-    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
-    public Reviews findReviewById(long id);
-    public List<Reviews> getAllReviews();
-    public List<Reviews> getHotelReviews();
-    public List<Reviews> getTransportReviews();
-    public List<Reviews> getRestaurantReviews();
-    public List<Reviews> getHotelReviews(Hotels hotel);
-    public List<Reviews> getRestaurantReviews(Restaurant restaurant);
-    public List<Reviews> getTransportReviews(Transport transport);
+    void deleteReview(Reviews review);
+
+    Reviews findReviewById(long id);
+
+    void editReview(Reviews review);
+
+    List<Reviews> getAllReviews();
+
+    List<Reviews> getHotelReviews();
+
+    List<Reviews> getTransportReviews();
+
+    List<Reviews> getRestaurantReviews();
+
+    List<Reviews> getHotelReviews(Hotels hotel);
+
+    List<Reviews> getRestaurantReviews(Restaurant restaurant);
+
+    List<Reviews> getTransportReviews(Transport transport);
+//    @Transactional
+//    void createReview(Reviews review);
+//
+//    public void deleteReview(long id);
+//    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
+//    public Reviews findReviewById(long id);
+//    public List<Reviews> getAllReviews();
+//    public List<Reviews> getHotelReviews();
+//    public List<Reviews> getTransportReviews();
+//    public List<Reviews> getRestaurantReviews();
+//    public List<Reviews> getHotelReviews(Hotels hotel);
+//    public List<Reviews> getRestaurantReviews(Restaurant restaurant);
+//    public List<Reviews> getTransportReviews(Transport transport);
 
 }
Index: src/main/java/com/tourMate/dao/TransportDao.java
===================================================================
--- src/main/java/com/tourMate/dao/TransportDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/TransportDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -4,61 +4,126 @@
 import com.tourMate.dto.TransportDto;
 import com.tourMate.entities.*;
+import jakarta.transaction.Transactional;
 
 
-import java.util.Collection;
 import java.util.Date;
 import java.util.List;
 
 public interface TransportDao {
+    @Transactional
+    void createTransport(Transport t);
 
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+    @Transactional
+    void deleteTransport(Transport t);
 
-    public void deleteTransport(long transportId);
+    List<Transport> getTransports();
 
-    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+    List<TransportDto> getTransportsByUser(User u);
 
-    public List<Transport> getTransports();
-    public List<TransportDto> getTransportsByUser(long userId);
+    List<RouteListingDto> getRoutesForTransport(Transport t);
 
-    public List<RouteListingDto> getRoutesForTransport(long transportId);
-    public Transport getTransportById(long transportId);
-    public TransportDto findTransportById (long transportId);
+    TransportDto findTransportById(long transportId);
 
-    public void createTransportReservation(TransportReservation transportReservation);
+    Transport getTransportById(long transportId);
 
-    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
+    @Transactional
+    void editTransport(Transport t);
 
-    public void deleteTransportReservation(long reservationID);
+    @Transactional
+    void createTransportReservation(TransportReservation transportReservation);
 
-    public TransportReservation findTransportReservationByID(long reservationID);
+    TransportReservation findTransportReservationByID(long reservationID);
 
-    public List<TransportReservation> getTransportReservations();
+    List<TransportReservation> getTransportReservations();
 
-    public List<TransportReservation> getTransportsReservationsByUserID(long userID);
+    TransportAvailible findTransportAvailableByID(long reservationID);
 
-    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
+    List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers);
 
-    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
+    List<TransportReservation> getTransportsReservationsByUserID(long userID);
 
-    public void deleteTransportAvailable(long availableID);
+    List<TransportAvailible> getTransportsAvailable();
 
-    public TransportAvailible findTransportAvailableByID (long reservationID);
+    @Transactional
+    void createTransportAvailable(TransportAvailible ta);
 
-    public List<TransportAvailible> getTransportsAvailable();
+    void editTransportAvailable(TransportAvailible ta);
 
-    public List<TransportRoute> getTransportsAvailableByFilters (String from,String to,Date date);
-
-    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
-
-    public void deleteTransportRoute(long transportRouteId);
-
-    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
-
-    public TransportRoute findTransportRouteById(long transportRouteId);
+    TransportRoute findTransportRouteById(long transportRouteId);
 
     List<Reviews> getReviewsForTransport(Transport transport);
 
-    List<TransportReservation> findReservationByUser(User u);
+    List<TransportReservation> findPastReservationByUser(User user);
 
-    List<TransportReservation> findPastReservationByUser(User user);
+    @Transactional
+    void saveReservation(TransportReservation transportReservation);
+
+    List<TransportReservation> findReservationByUser(User user);
+
+    @Transactional
+    void deleteTransportReservation(TransportReservation tr);
+
+    @Transactional
+    void deleteTransportAvailable(TransportAvailible ta);
+
+    void createTransportRoute(TransportRoute tr);
+
+    void deleteTransportRoute(TransportRoute tr);
+
+    void editTransportRoute(TransportRoute tr);
+
+    List<TransportReservation> findTransportReservationByTransportId(Transport t);
+
+//    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
+//
+//    public void deleteTransport(long transportId);
+//
+//    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+//
+//    public List<Transport> getTransports();
+//    public List<TransportDto> getTransportsByUser(long userId);
+//
+//    public List<RouteListingDto> getRoutesForTransport(long transportId);
+//    public Transport getTransportById(long transportId);
+//    public TransportDto findTransportById (long transportId);
+//
+//    public void createTransportReservation(TransportReservation transportReservation);
+//
+//    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
+//
+//    public void deleteTransportReservation(long reservationID);
+//
+//    public TransportReservation findTransportReservationByID(long reservationID);
+//
+//    public List<TransportReservation> getTransportReservations();
+//
+//    public List<TransportReservation> getTransportsReservationsByUserID(long userID);
+//
+//    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
+//
+//    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
+//
+//    public void deleteTransportAvailable(long availableID);
+//
+//    public TransportAvailible findTransportAvailableByID (long reservationID);
+//
+//    public List<TransportAvailible> getTransportsAvailable();
+//
+//    public List<TransportRoute> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
+//
+//    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
+//
+//    public void deleteTransportRoute(long transportRouteId);
+//
+//    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
+//
+//    public TransportRoute findTransportRouteById(long transportRouteId);
+//
+//    List<Reviews> getReviewsForTransport(Transport transport);
+//
+//    List<TransportReservation> findReservationByUser(User u);
+//
+//    List<TransportReservation> findPastReservationByUser(User user);
+//
+//    void saveReservation(TransportReservation transportReservation);
 }
Index: src/main/java/com/tourMate/dao/UsersDao.java
===================================================================
--- src/main/java/com/tourMate/dao/UsersDao.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/UsersDao.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -23,3 +23,10 @@
 
     UserDetails findUserByUsername(String username);
+
+    List<User> getUnapprovedUsers();
+
+    void approveUserProfile(User u);
+
+    Role findById(Long id);
+    void updateUser(User s);
 }
Index: src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -19,13 +19,10 @@
     @Transactional
     @Override
-    public void createBusiness(Business business, long userId) {
-        User u = em.find(User.class, userId);
-        business.setUser(u);
+    public void createBusiness(Business business) {
         em.persist(business);
     }
 
     @Override
-    public List<Business> getUnapprovedBusinessesOfUser(long userId) {
-        User u = em.find(User.class, userId);
+    public List<Business> getUnapprovedBusinessesOfUser(User u) {
         return em.createQuery("SELECT b FROM Business b WHERE b.user = :user").setParameter("user", u).getResultList();
     }
@@ -33,15 +30,23 @@
     @Transactional
     @Override
-    public void deleteBusiness(long businessId) {
-        Business business = findBusinessById(businessId);
+    public void deleteBusiness(Business business) {
         em.remove(business);
-
     }
 
     @Override
-    public boolean hasBusiness(long userId)
+    public boolean hasBusiness(User u)
     {
-        User u = em.find(User.class, userId);
         return Integer.parseInt(em.createQuery("SELECT COUNT(b) FROM Business b WHERE b.user = :user").setParameter("user", u).getSingleResult().toString()) > 0;
+    }
+
+    @Override
+    public List<Business> getUnapprovedBusinesses() {
+        return em.createQuery("select b from Business b where not b.approved").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void approveBusiness(Business b) {
+        em.persist(b);
     }
 
@@ -57,14 +62,8 @@
     }
 
+
     @Transactional
     @Override
-    public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved) {
-        Business business = findBusinessById(businessId);
-        business.setName(name);
-        business.setPhone(phone);
-        business.setAddress(address);
-        business.setEdbs(edbs);
-        business.setUser(user);
-        business.setApproved(approved);
+    public void editBusiness(Business business) {
         em.persist(business);
     }
Index: src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -8,4 +8,5 @@
 import org.springframework.stereotype.Service;
 
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
@@ -19,21 +20,15 @@
     @Override
     @Transactional
-    public void createHotel(Hotels hotel, long userId) {
-        User u = em.find(User.class, userId);
-        Hotels h = new Hotels(hotel.getHotelName(), hotel.getHotelDescripiton(), hotel.getHotelLocation(), hotel.getHotelEDBS(), hotel.getParking(), hotel.getPetFriendly(), hotel.getInternetAvailable(), u);
-        em.persist(h);
+    public void createHotel(Hotels hotel) {
+        em.persist(hotel);
     }
 
     @Override
     public List<Hotels> getHotels() {
-        List<Hotels> hoteli = em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
-        System.out.println("OREEEEEEL");
-        return hoteli;
-        //return em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
-    }
-
-    @Override
-    public List<Hotels> getHotelsForUser(long userId) {
-        User u = em.find(User.class, userId);
+        return em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
+    }
+
+    @Override
+    public List<Hotels> getHotelsForUser(User u) {
         return em.createQuery("select h from Hotels h where h.owner = :u").setParameter("u", u).getResultList();
     }
@@ -46,13 +41,5 @@
     @Transactional
     @Override
-    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
-        Hotels hotel = findHotelByID(hotelId);
-        hotel.setHotelName(hotelName);
-        hotel.setHotelDescripiton(hotelDescripiton);
-        hotel.setHotelLocation(hotelLocation);
-        hotel.setHotelEDBS(hotelEDBS);
-        hotel.setParking(parking);
-        hotel.setPetFriendly(petFriendly);
-        hotel.setInternetAvailable(internetAvailable);
+    public void editHotel(Hotels hotel) {
         em.persist(hotel);
     }
@@ -60,7 +47,6 @@
     @Transactional
     @Override
-    public void deleteHotel(long hotelId) {
-        Hotels h = findHotelByID(hotelId);
-        em.remove(h);
+    public void deleteHotel(Hotels hotel) {
+        em.remove(hotel);
     }
 
@@ -89,4 +75,10 @@
     @Override
     @Transactional
+    public void  saveReservation(HotelRoomReservations hotelRoomReservations) {
+        em.persist(hotelRoomReservations);
+    }
+
+    @Override
+    @Transactional
     public HotelsImages findHotelImageById(long hotelImageId) {
         return em.find(HotelsImages.class, hotelImageId);
@@ -95,13 +87,11 @@
     @Override
     @Transactional
-    public void deleteHotelImage(long hotelImageId) {
-        HotelsImages hotelsImages = findHotelImageById(hotelImageId);
+    public void deleteHotelImage(HotelsImages hotelsImages) {
         em.remove(hotelsImages);
     }
 
     @Override
-    public List<HotelRoom> getRoomsOfHotel(long hotelId) {
-        Hotels h = findHotelByID(hotelId);
-        return em.createQuery("SELECT hr from HotelRoom hr where hr.hotel = :hotel").setParameter("hotel", h).getResultList();
+    public List<HotelRoom> getRoomsOfHotel(Hotels hotel) {
+        return em.createQuery("SELECT hr from HotelRoom hr where hr.hotel = :hotel").setParameter("hotel", hotel).getResultList();
     }
 
@@ -123,6 +113,5 @@
     @Transactional
     @Override
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+    public void createRoom(HotelRoom hotelRoom) {
         em.persist(hotelRoom);
     }
@@ -130,13 +119,5 @@
     @Transactional
     @Override
-    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        HotelRoom hr = findRoomById(hotelRoomId);
-        hr.setHotel(hotel);
-        hr.setHotelRoomDescription(hotelRoomDescription);
-        hr.setHotelRoomName(hotelRoomName);
-        hr.setKitchenAvailable(kitchenAvailable);
-        hr.setAirConditioning(airConditioning);
-        hr.setBalcony(balcony);
-        hr.setPrice(price);
+    public void editRoom(HotelRoom hr) {
         em.persist(hr);
     }
@@ -144,6 +125,5 @@
     @Transactional
     @Override
-    public void deleteRoom(long hotelRoomId) {
-        HotelRoom hr = findRoomById(hotelRoomId);
+    public void deleteRoom(HotelRoom hr) {
         em.remove(hr);
     }
@@ -151,6 +131,5 @@
     @Transactional
     @Override
-    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
-        HotelRoomAvailable hra = new HotelRoomAvailable(hotelRoom, dateFrom, dateTo, numberOfBeds);
+    public void createRoomAvailible(HotelRoomAvailable hra) {
         em.persist(hra);
     }
@@ -158,10 +137,5 @@
     @Transactional
     @Override
-    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
-        HotelRoomAvailable hr = findAvailibleRoomById(hotelRoomAvailableId);
-        hr.setHotelRoom(hotelRoom);
-        hr.setDateFrom(dateFrom);
-        hr.setDateTo(dateTo);
-        hr.setNumberOfBeds(numberOfBeds);
+    public void editRoomAvailible(HotelRoomAvailable hr) {
         em.persist(hr);
     }
@@ -169,6 +143,5 @@
     @Transactional
     @Override
-    public void deleteRoomAvailible(long hotelRoomAvailableId) {
-        HotelRoomAvailable hra = findAvailibleRoomById(hotelRoomAvailableId);
+    public void deleteRoomAvailible(HotelRoomAvailable hra) {
         em.remove(hra);
     }
@@ -190,22 +163,72 @@
 
     @Override
-    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
-        return em.createQuery("select hr from HotelRoomAvailable hr where hr.dateFrom <= :dateFrom and hr.dateTo >= :dateTo " +
-<<<<<<< HEAD
-                        "and hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation and hr.hotelRoom.numOfBeds >= :numBeds")
-=======
-                "and hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation and hr.numberOfBeds >= :numBeds")
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
-                .setParameter("hotelLocation", hotelLocation)
-                .setParameter("dateFrom", dateFrom)
-                .setParameter("dateTo", dateTo)
-                .setParameter("numBeds", numberOfBeds)
-                .getResultList();
-    }
-
-    @Override
-    @Transactional
-    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
-        HotelRoomReservations r = new HotelRoomReservations(user, hotelRoom, dateFrom, dateTo, numberOfBeds);
+    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible) {
+        if(flexible)
+        {
+            Calendar calendar = Calendar.getInstance();
+            Calendar calendar1 = Calendar.getInstance();
+            calendar.setTime(dateTo);
+            calendar1.setTime(dateFrom);
+            return em.createQuery("SELECT hr FROM HotelRoomAvailable hr WHERE " +
+                            "((hr.dateFrom <= :dateTo AND hr.dateTo >= :dateFrom) OR " +
+                            "(hr.dateFrom <= :dateToMinus1 AND hr.dateTo >= :dateFromMinus1) OR " +
+                            "(hr.dateFrom <= :dateToMinus2 AND hr.dateTo >= :dateFromMinus2) OR " +
+                            "(hr.dateFrom <= :dateToMinus3 AND hr.dateTo >= :dateFromMinus3) OR " +
+                            "(hr.dateFrom <= :dateToPlus1 AND hr.dateTo >= :dateFromPlus1) OR " +
+                            "(hr.dateFrom <= :dateToPlus2 AND hr.dateTo >= :dateFromPlus2) OR " +
+                            "(hr.dateFrom <= :dateToPlus3 AND hr.dateTo >= :dateFromPlus3)) " +
+                            "AND hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation " +
+                            "AND hr.hotelRoom.numOfBeds >= :numBeds")
+                    .setParameter("hotelLocation", hotelLocation)
+                    .setParameter("dateFrom", dateFrom)
+                    .setParameter("dateTo", dateTo)
+                    .setParameter("dateToMinus1", subtractDays(calendar, 1))
+                    .setParameter("dateToMinus2", subtractDays(calendar, 2))
+                    .setParameter("dateToMinus3", subtractDays(calendar, 3))
+                    .setParameter("dateToPlus1", addDays(calendar, 1))
+                    .setParameter("dateToPlus2", addDays(calendar, 2))
+                    .setParameter("dateToPlus3", addDays(calendar, 3))
+                    .setParameter("dateFromMinus1", subtractDays(calendar1, 1))
+                    .setParameter("dateFromMinus2", subtractDays(calendar1, 2))
+                    .setParameter("dateFromMinus3", subtractDays(calendar1, 3))
+                    .setParameter("dateFromPlus1", addDays(calendar1, 1))
+                    .setParameter("dateFromPlus2", addDays(calendar1, 2))
+                    .setParameter("dateFromPlus3", addDays(calendar1, 3))
+                    .setParameter("numBeds", numberOfBeds)
+                    .getResultList();
+        }
+        else
+        {
+            return em.createQuery("SELECT hr FROM HotelRoomAvailable hr WHERE " +
+                            "((hr.dateFrom <= :dateTo AND hr.dateTo >= :dateFrom)) " +
+                            "AND hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation " +
+                            "AND hr.hotelRoom.numOfBeds >= :numBeds")
+                    .setParameter("hotelLocation", hotelLocation)
+                    .setParameter("dateFrom", dateFrom)
+                    .setParameter("dateTo", dateTo)
+                    .setParameter("numBeds", numberOfBeds)
+                    .getResultList();
+        }
+
+
+
+
+    }
+
+    private Date addDays(Calendar calendar, int days) {
+        Calendar newCalendar = (Calendar) calendar.clone();
+        newCalendar.add(Calendar.DAY_OF_MONTH, days);
+        return newCalendar.getTime();
+    }
+
+    private Date subtractDays(Calendar calendar, int days) {
+        Calendar newCalendar = (Calendar) calendar.clone();
+        newCalendar.add(Calendar.DAY_OF_MONTH, -days);
+        return newCalendar.getTime();
+    }
+
+    @Override
+    @Transactional
+    public void createReservation(HotelRoomReservations  r) {
         em.persist(r);
     }
@@ -213,20 +236,13 @@
     @Override
     @Transactional
-    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
-        HotelRoomReservations hr = findReservationById(hotelRoomReservedId);
-        hr.setUser(user);
-        hr.setHotelRoom(hotelRoom);
-        hr.setDateFrom(dateFrom);
-        hr.setDateTo(dateTo);
-        hr.setNumberOfBeds(numberOfBeds);
+    public void editReservation(HotelRoomReservations hr) {
         em.persist(hr);
-
-    }
-
-    @Transactional
-    @Override
-    public void deleteReservation(long hotelRoomReservedId) {
-        HotelRoomReservations r = findReservationById(hotelRoomReservedId);
-        em.remove(hotelRoomReservedId);
+    }
+
+    @Transactional
+    @Override
+    public void deleteReservation(HotelRoomReservations hr) {
+
+        em.remove(hr);
     }
 
@@ -244,6 +260,6 @@
     @Override
     public List<HotelRoomReservations> findReservationByHotel(Hotels hotel) {
-        List<HotelRoom> hotelRooms = getRoomsOfHotel(hotel.getHotelId());
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom in :hotelRooms").setParameter("hotelRooms", hotelRooms).getResultList();
+        List<HotelRoom> hotelRooms = getRoomsOfHotel(hotel);
+        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom.hotel = :hotel").setParameter("hotel", hotel).getResultList();
     }
 
Index: src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -18,6 +18,5 @@
     @Transactional
     @Override
-    public void createMenu(String name, String ingredients, double price) {
-        Menu menu = new Menu(name, ingredients, price);
+    public void createMenu(Menu menu) {
         em.persist(menu);
     }
@@ -25,6 +24,5 @@
     @Transactional
     @Override
-    public void deleteMenu(long menuId) {
-        Menu menu = findMenuById(menuId);
+    public void deleteMenu(Menu menu) {
         em.remove(menu);
     }
@@ -42,9 +40,6 @@
     @Transactional
     @Override
-    public void editMenu(long menuId, String name, String ingredients, double price) {
-        Menu menu = findMenuById(menuId);
-        menu.setName(name);
-        menu.setIngredients(ingredients);
-        menu.setPrice(price);
+    public void editMenu(Menu menu) {
+
         em.persist(menu);
     }
Index: src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -18,8 +18,6 @@
     @Override
     @Transactional
-    public void createRestaurant(Restaurant restaurant, long userId) {
-        User u = em.find(User.class, userId);
-        Restaurant r = new Restaurant(restaurant.getRestaurantName(), restaurant.getRestaurantLocation(), restaurant.getCousineType(), restaurant.getRestaurantDescription(), restaurant.getRestaurantEdbs(), u);
-        em.persist(r);
+    public void createRestaurant(Restaurant restaurant) {
+        em.persist(restaurant);
     }
 
@@ -43,7 +41,6 @@
     @Transactional
     @Override
-    public void removeRestaurantImage(long restaurantImageId){
-        RestaurantImages restaurantImage = findRestaurantImageById(restaurantImageId);
-        em.remove(restaurantImage);
+    public void removeRestaurantImage(RestaurantImages image){
+        em.remove(image);
     }
 
@@ -55,6 +52,5 @@
 
     @Override
-    public void deleteRestaurant(long restaurantID) {
-        Restaurant r = findRestaurantByID(restaurantID);
+    public void deleteRestaurant(Restaurant r) {
         em.remove(r);
     }
@@ -67,7 +63,5 @@
     @Override
     @Transactional
-    public void addMenuToRestaurant(long restaurantId, Menu menu) {
-        Restaurant r = findRestaurantByID(restaurantId);
-        menu.setRestaurant(r);
+    public void addMenuToRestaurant(Menu menu) {
         em.persist(menu);
     }
@@ -84,20 +78,6 @@
 
     @Override
-    @Transactional
-    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner) {
-        Restaurant res = findRestaurantByID(restaurantID);
-        res.setRestaurantName(restaurantName);
-        res.setRestaurantLocation(restaurantLocation);
-        res.setRestaurantEdbs(restaurantEdbs);
-        res.setRestaurantDescription(restaurantDescription);
-        res.setRestaurantOwner(restaurantOwner);
-        res.setCousineType(cousineType);
-        em.persist(res);
-    }
-
-    @Override
     public List<RestaurantsTable> getRestaurantTables(long restaurantID) {
-        List<RestaurantsTable> restaurantsTables = getRestaurantTables(restaurantID);
-        return restaurantsTables;
+        return em.createQuery("select rt from RestaurantsTable rt where rt.restaurant.restaurantID = :restaurantId").setParameter("restaurantId", restaurantID).getResultList();
     }
 
@@ -109,36 +89,18 @@
     @Override
     @Transactional
-    public void createTable(Restaurant restaurant, int noSeats) {
-        RestaurantsTable resTable = new RestaurantsTable(restaurant, noSeats);
+    public void saveTable(RestaurantsTable resTable) {
         em.persist(resTable);
     }
 
-    @Override
-    @Transactional
-    public void editTable(Restaurant restaurant, long tableId, int noSeats) {
-        RestaurantsTable resTable = findTableById(tableId);
-        resTable.setRestaurant(restaurant);
-        resTable.setNoSeats(noSeats);
-        em.persist(resTable);
-    }
-
-    @Override
-    @Transactional
-    public void deleteTable(long tableId) {
-        RestaurantsTable rt  = findTableById(tableId);
+
+    @Override
+    @Transactional
+    public void deleteTable(RestaurantsTable rt) {
         em.persist(rt);
     }
 
     @Override
-    public List<Restaurant> getRestaurantsByUser(long userId) {
-        User u = em.find(User.class, userId);
+    public List<Restaurant> getRestaurantsByUser(User u) {
         return em.createQuery("select r from Restaurant r where r.restaurantOwner = :u").setParameter("u", u).getResultList();
-    }
-
-    @Override
-    @Transactional
-    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats) {
-        RestaurantsAvailible ra = new RestaurantsAvailible(restaurantsTable, hourFrom, hourTo, noSeats);
-        em.persist(ra);
     }
 
@@ -151,22 +113,11 @@
     @Override
     @Transactional
-    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo){
-        RestaurantsAvailible rta = new RestaurantsAvailible(restaurantsTable, hourFrom, hourTo);
-        em.persist(rta);
-    }
-
-    @Override
-    @Transactional
-    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats) {
-        RestaurantsTable rt = findTableById(tableId);
-        rt.setRestaurant(restaurant);
-        rt.setNoSeats(noSeats);
-        em.persist(rt);
-    }
-
-    @Override
-    @Transactional
-    public void deleteTableAvailable(long tableId) {
-        RestaurantsAvailible ra = findAvailableReservationByID(tableId);
+    public void saveTableAvailable(RestaurantsAvailible ra){
+        em.persist(ra);
+    }
+
+    @Override
+    @Transactional
+    public void deleteTableAvailable(RestaurantsAvailible ra) {
         em.remove(ra);
     }
@@ -183,20 +134,8 @@
     }
 
-    @Override
-    @Transactional
-    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user) {
-        RestaurantReservations r = findReservationByID(restaurantsTableId);
-        r.setTable(rt);
-        r.setTimeFrom(hourFrom);
-        r.setTimeTo(hourTo);
-        r.setNoSeats(noSeats);
-        r.setUser(user);
-        em.persist(r);
-    }
-
-    @Override
-    @Transactional
-    public void deleteReservation(long restaurantsTableId) {
-        RestaurantReservations r = findReservationByID(restaurantsTableId);
+
+    @Override
+    @Transactional
+    public void deleteReservation(RestaurantReservations r) {
         em.remove(r);
     }
@@ -259,3 +198,32 @@
 
     }
+
+    @Override
+    public List<MenuImages> getMenuImages(long menuId) {
+        return em.createQuery("select ri from MenuImages ri where ri.menu.id = :menuId").setParameter("menuId", menuId).getResultList();
+    }
+
+    @Override
+    public List<MenuImages> getMenuImagesByRestaurant(Restaurant resta) {
+        return em.createQuery("select mi from MenuImages mi where mi.menu.restaurant = :restaurant")
+                .setParameter("restaurant", resta)
+                .getResultList();
+    }
+
+    @Transactional
+    @Override
+    public void addMenuImage(MenuImages menuImages) {
+        em.persist(menuImages);
+    }
+
+    @Override
+    public Menu findMenuId(Long menuId) {
+        return em.find(Menu.class, menuId);
+    }
+
+    @Override
+    @Transactional
+    public void saveReservation(RestaurantReservations restaurantReservations) {
+        em.persist(restaurantReservations);
+    }
 }
Index: src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -25,6 +25,5 @@
 
     @Override
-    public void deleteReview(long id) {
-        Reviews review = findReviewById(id);
+    public void deleteReview(Reviews review) {
         em.remove(review);
     }
@@ -36,12 +35,5 @@
 
     @Override
-    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
-        Reviews review = findReviewById(id);
-        review.setDescription(description);
-        review.setHotel(hotel);
-        review.setRestaurant(restaurant);
-        review.setTitle(title);
-        review.setNumStar(numStar);
-        review.setTransport(transport);
+    public void editReview(Reviews review) {
         em.persist(review);
     }
Index: src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -10,5 +10,4 @@
 import org.springframework.stereotype.Service;
 
-import java.util.Collection;
 import java.util.Date;
 import java.util.List;
@@ -22,7 +21,5 @@
     @Override
     @Transactional
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        User u = em.find(User.class, 1);
-        Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
+    public void createTransport(Transport t) {
         em.persist(t);
     }
@@ -30,6 +27,5 @@
     @Override
     @Transactional
-    public void deleteTransport(long transportId) {
-        Transport t=getTransportById(transportId);
+    public void deleteTransport(Transport t) {
         em.remove(t);
     }
@@ -41,6 +37,5 @@
 
     @Override
-    public List<TransportDto> getTransportsByUser(long userId) {
-        User u = em.find(User.class, userId);
+    public List<TransportDto> getTransportsByUser(User u) {
         List<Transport> transports = em.createQuery("select t from Transport t where t.owner = :u").setParameter("u", u).getResultList();
         return transports.stream().map(x -> new TransportDto(
@@ -62,12 +57,18 @@
                         y.getFreeSpace(),
                         y.getTime(),
-                        y.getRoutes()
-                )).toList()
+                        y.getRoutes(),
+                        y.getRoutes().stream()
+                                .mapToDouble(TransportRoute::getPrice)
+                                .max().orElse(0)
+                )).toList(),
+                x.getAvailableRoutes().stream()
+                        .flatMapToDouble(y -> y.getRoutes()
+                                .stream()
+                                .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0)
         )).toList();
     }
 
     @Override
-    public List<RouteListingDto> getRoutesForTransport(long transportId) {
-        Transport t = em.find(Transport.class, transportId);
+    public List<RouteListingDto> getRoutesForTransport(Transport t) {
         List<TransportAvailible> transportsAvailible = em.createQuery("select ta from TransportAvailible ta where ta.transport = :transport").setParameter("transport", t).getResultList();
         return transportsAvailible.stream().map(x -> new RouteListingDto(
@@ -78,5 +79,8 @@
                 x.getFreeSpace(),
                 x.getTime(),
-                x.getRoutes()
+                x.getRoutes(),
+                x.getRoutes().stream()
+                        .mapToDouble(TransportRoute::getPrice)
+                        .max().orElse(0)
         )).toList();
     }
@@ -103,8 +107,16 @@
                         y.getFreeSpace(),
                         y.getTime(),
-                        y.getRoutes()
-                )).toList());
-    }
-
+                        y.getRoutes(),
+                        y.getRoutes().stream()
+                                .mapToDouble(TransportRoute::getPrice)
+                                .max().orElse(0)
+                )).toList(),
+                x.getAvailableRoutes().stream()
+                        .flatMapToDouble(y -> y.getRoutes()
+                                                        .stream()
+                                                        .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0));
+    }
+
+    @Override
     public Transport getTransportById(long transportId)
     {
@@ -114,15 +126,5 @@
     @Override
     @Transactional
-    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        Transport t=getTransportById(transportID);
-        t.setTransportName(transportName);
-        t.setCarBrand(carBrand);
-        t.setCarType(carType);
-        t.setCarManufacturedYear(carManufacturedYear);
-        t.setNoPassengers(noPassengers);
-        t.setNoBags(noBags);
-        t.setEMBG(EMBG);
-        t.setOwner(owner);
-        t.setCarPlate(carPlate);
+    public void editTransport(Transport t) {
         em.persist(t);
     }
@@ -150,8 +152,11 @@
 
     @Override
-    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date) {
+    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers) {
         System.out.println(fromL + " " + toL);
-        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol").setParameter("froml", fromL).
-                setParameter("tol", toL).getResultList();
+        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol and h.freeSpace >= :nump")
+                .setParameter("froml", fromL)
+                .setParameter("tol", toL)
+                .setParameter("nump", numPassengers)
+                .getResultList();
     }
 
@@ -168,37 +173,11 @@
     @Override
     @Transactional
-    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes) {
-        TransportAvailible ta=new TransportAvailible(transport,departureLocation,arrivalLocation,date,noSeats,departureHour);
+    public void createTransportAvailable(TransportAvailible ta) {
         em.persist(ta);
-        List<TransportRoute> routes1 = routes.stream().toList();
-        routes.forEach(x -> {
-            createTransportRoute(ta, x.getFrom(), x.getTo(), x.getPrice(), x.getDeparture(), x.getArrival(), x.getFreeSpace(), x.getOrder());
-        });
-    }
-
-    @Override
-    @Transactional
-    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour)
-    {
-//        TransportReservation tr=findTransportReservationByID(reservationID);
-//        tr.setTransport(transport);
-//        tr.setDepartureLocation(departureLocation);
-//        tr.setArrivalLocation(arrivalLocation);
-//        tr.setDate(date);
-//        tr.setNoSeats(noSeats);
-//        tr.setUser(user);
-//        tr.setDepartureHour(departureHour);
-//        em.persist(tr);
-    }
-
-    @Override
-    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour) {
-        TransportAvailible ta=findTransportAvailableByID(availableID);
-        ta.setTransport(transport);
-        ta.setFrom(departureLocation);
-        ta.setTo(arrivalLocation);
-        ta.setDate(date);
-        ta.setFreeSpace(noSeats);
-        ta.setTime(departureHour);
+
+    }
+
+    @Override
+    public void editTransportAvailable(TransportAvailible ta) {
         em.persist(ta);
     }
@@ -224,4 +203,10 @@
     }
 
+    @Transactional
+    @Override
+    public void saveReservation(TransportReservation transportReservation) {
+        em.persist(transportReservation);
+    }
+
     @Override
     public List<TransportReservation> findReservationByUser(User user) {
@@ -235,6 +220,5 @@
     @Override
     @Transactional
-    public void deleteTransportReservation(long reservationID) {
-        TransportReservation tr=findTransportReservationByID(reservationID);
+    public void deleteTransportReservation(TransportReservation tr) {
         em.remove(tr);
     }
@@ -242,36 +226,32 @@
     @Override
     @Transactional
-    public void deleteTransportAvailable(long availableID) {
-        TransportAvailible ta=findTransportAvailableByID(availableID);
+    public void deleteTransportAvailable(TransportAvailible ta) {
         em.remove(ta);
     }
 
     @Override
-    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        TransportRoute tr = new TransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
+    @Transactional
+    public void createTransportRoute(TransportRoute tr) {
         em.persist(tr);
     }
 
     @Override
-    public void deleteTransportRoute(long transportRouteId) {
-        TransportRoute tr = findTransportRouteById(transportRouteId);
+    public void deleteTransportRoute(TransportRoute tr) {
         em.remove(tr);
     }
 
     @Override
-    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        TransportRoute tr = findTransportRouteById(transportRouteId);
-        tr.setParentRoute(parentRoute);
-        tr.setFrom(from);
-        tr.setTo(to);
-        tr.setPrice(price);
-        tr.setDeparture(departure);
-        tr.setArrival(arrival);
-        tr.setFreeSpace(freeSpace);
-        tr.setOrder(order);
+    public void editTransportRoute(TransportRoute tr) {
         em.persist(tr);
 
     }
 
+    @Override
+    public List<TransportReservation> findTransportReservationByTransportId(Transport t) {
+        return em.createQuery("SELECT tr from TransportReservation tr where tr.transportRoute.parentRoute.transport= :transport")
+                .setParameter("transport", t)
+                .getResultList();
+    }
+
 
 }
Index: src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -28,5 +28,5 @@
     @Override
     public void createUser(String name, String surname, String email, Date birthDate, String address, String contact) {
-        Role r = em.find(Role.class, 1);
+        Role r = em.find(Role.class, 2);
         User user = new User(name, surname, email, passwordEncoder.encode("password"), birthDate, address, contact, r);
         em.persist(user);
@@ -74,4 +74,26 @@
     }
 
+    @Override
+    public List<User> getUnapprovedUsers() {
+        return em.createQuery("select u from User u where not u.enabled").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void approveUserProfile(User u) {
+        u.setEnabled(true);
+        em.persist(u);
+    }
+
+    @Override
+    public Role findById(Long id) {
+        return em.find(Role.class, id);
+    }
+
+    @Override
+    @Transactional
+    public void updateUser(User s) {
+        em.persist(s);
+    }
 
 
Index: src/main/java/com/tourMate/dto/HotelReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelReservationUserDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/HotelReservationUserDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -7,4 +7,5 @@
 
 public class HotelReservationUserDto {
+    private Long reservationId;
     private User user;
     private HotelRoom hotelRoom;
@@ -20,5 +21,6 @@
     private Boolean reviewed;
 
-    public HotelReservationUserDto(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numBeds, String hotelName, String hotelLocation, String hotelAddress, Long hotelId, Boolean reviewed) {
+    public HotelReservationUserDto(Long reservationId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numBeds, String hotelName, String hotelLocation, String hotelAddress, Long hotelId, Boolean reviewed) {
+        this.reservationId = reservationId;
         this.user = user;
         this.hotelRoom = hotelRoom;
@@ -31,4 +33,8 @@
         this.hotelId = hotelId;
         this.reviewed = reviewed;
+    }
+
+    public Long getReservationId() {
+        return reservationId;
     }
 
Index: src/main/java/com/tourMate/dto/RestaurantDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/RestaurantDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -5,4 +5,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 public class RestaurantDto {
@@ -14,9 +15,11 @@
     private String restaurantEdbs;
     private Collection<Menu> menus = new ArrayList<Menu>();
+    private Collection<MenuImages> menuImages;
     private Collection<RestaurantsAvailible> tables;
     private Collection<Reviews> reviews;
     private double averageScore;
     private Collection<RestaurantImages> images;
-    public RestaurantDto(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, Collection<Menu> menus, Collection<RestaurantsAvailible> tables, Collection<Reviews> reviews, double averageScore, Collection<RestaurantImages> images) {
+
+    public RestaurantDto(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, Collection<Menu> menus, Collection<RestaurantsAvailible> tables, Collection<Reviews> reviews, double averageScore, Collection<RestaurantImages> images, Collection<MenuImages> menuImages) {
         this.restaurantID = restaurantID;
         this.restaurantName = restaurantName;
@@ -30,4 +33,8 @@
         this.averageScore = averageScore;
         this.images = images;
+        this.menuImages = menuImages;
+    }
+    public Collection<MenuImages> getMenuImages() {
+        return menuImages;
     }
 
@@ -119,3 +126,4 @@
         this.images = images;
     }
+
 }
Index: src/main/java/com/tourMate/dto/RestaurantReservationDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantReservationDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
+++ src/main/java/com/tourMate/dto/RestaurantReservationDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -0,0 +1,37 @@
+package com.tourMate.dto;
+
+import com.tourMate.entities.HotelRoom;
+import com.tourMate.entities.RestaurantsTable;
+import com.tourMate.entities.User;
+
+import java.util.Date;
+
+public class RestaurantReservationDto {
+    private User user;
+    private RestaurantsTable restaurantsTable;
+    private Date dateFrom;
+    private Date dateTo;
+
+    public RestaurantReservationDto(User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo) {
+        this.user = user;
+        this.restaurantsTable = restaurantsTable;
+        this.dateFrom = dateFrom;
+        this.dateTo = dateTo;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public RestaurantsTable getRestaurantsTable() {
+        return restaurantsTable;
+    }
+
+    public Date getDateFrom() {
+        return dateFrom;
+    }
+
+    public Date getDateTo() {
+        return dateTo;
+    }
+}
Index: src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -8,4 +8,5 @@
 
 public class RestaurantReservationUserDto {
+    private Long reservationId;
     private User user;
     private RestaurantsTable restaurantsTable;
@@ -21,5 +22,6 @@
     private Boolean reviewed;
 
-    public RestaurantReservationUserDto(User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo, Integer numPeople, String restaurantName, String restaurantLocation, String restaurantAddress, Long restaurantId, Boolean reviewed) {
+    public RestaurantReservationUserDto(Long reservationId, User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo, Integer numPeople, String restaurantName, String restaurantLocation, String restaurantAddress, Long restaurantId, Boolean reviewed) {
+        this.reservationId = reservationId;
         this.user = user;
         this.restaurantsTable = restaurantsTable;
@@ -32,4 +34,8 @@
         this.restaurantId = restaurantId;
         this.reviewed = reviewed;
+    }
+
+    public Long getReservationId() {
+        return reservationId;
     }
 
Index: src/main/java/com/tourMate/dto/RouteListingDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RouteListingDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/RouteListingDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -18,6 +18,7 @@
     private Date time;
     private Collection<String> routes;
+    private Double maxPrice;
 
-    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes) {
+    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes, Double maxPrice) {
         this.transportAvailibleId = transportAvailibleId;
         this.from = from;
@@ -27,4 +28,5 @@
         this.time = time;
         this.routes = routes.stream().map(x -> x.getFrom()).distinct().skip(1).toList();
+        this.maxPrice = maxPrice;
     }
 
@@ -84,3 +86,7 @@
         this.routes = routes;
     }
+
+    public Double getMaxPrice() {
+        return maxPrice;
+    }
 }
Index: src/main/java/com/tourMate/dto/TransportDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/TransportDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -16,7 +16,8 @@
     private User owner;
     private String carPlate;
+    private Double maxPrice;
     private Collection<RouteListingDto> availableRoutes;
 
-    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes) {
+    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes, Double maxPrice) {
         this.transportID = transportID;
         this.transportName = transportName;
@@ -30,4 +31,5 @@
         this.carPlate = carPlate;
         this.availableRoutes = availableRoutes;
+        this.maxPrice = maxPrice;
     }
 
Index: src/main/java/com/tourMate/dto/TransportReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportReservationUserDto.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/dto/TransportReservationUserDto.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -10,4 +10,5 @@
 
 public class TransportReservationUserDto {
+    private Long reservationId;
     private User user;
     private TransportRoute transportRoute;
@@ -19,5 +20,6 @@
     private Boolean reviewed;
 
-    public TransportReservationUserDto(User user, TransportRoute transportRoute, Long transportId, Integer numPeople, String carBrand, String carType, User owner, Boolean reviewed) {
+    public TransportReservationUserDto(Long reservationId, User user, TransportRoute transportRoute, Long transportId, Integer numPeople, String carBrand, String carType, User owner, Boolean reviewed) {
+        this.reservationId = reservationId;
         this.user = user;
         this.transportRoute = transportRoute;
@@ -28,4 +30,7 @@
         this.owner = owner;
         this.reviewed = reviewed;
+    }
+    public Long getReservationId() {
+        return reservationId;
     }
 
Index: src/main/java/com/tourMate/entities/Business.java
===================================================================
--- src/main/java/com/tourMate/entities/Business.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/Business.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -88,5 +88,5 @@
     }
 
-    @OneToOne(fetch = FetchType.LAZY)
+    @OneToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "owner_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_biznis_kon_korisnik"))
     public User getUser() {
@@ -107,3 +107,4 @@
         this.approved = approved;
     }
+
 }
Index: src/main/java/com/tourMate/entities/HotelRoom.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoom.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/HotelRoom.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -1,3 +1,2 @@
-<<<<<<< HEAD
 package com.tourMate.entities;
 
@@ -160,140 +159,2 @@
     }
 }
-=======
-package com.tourMate.entities;
-
-import jakarta.persistence.*;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import javax.validation.constraints.NotNull;
-
-@Entity
-@Table(name="hotel_rooms", schema = "public")
-public class HotelRoom {
-    private long hotelRoomId;
-    @JsonIgnore
-    private Hotels hotel;
-    private String hotelRoomDescription;
-    @Enumerated(EnumType.STRING)
-    private String hotelRoomName;
-    private double price;
-    private Boolean kitchenAvailable;
-    private Boolean airConditioning;
-    private Boolean balcony;
-
-    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony) {
-        this.hotelRoomId = hotelRoomId;
-        this.hotel = hotel;
-        this.hotelRoomDescription = hotelRoomDescription;
-        this.hotelRoomName = hotelRoomName;
-        this.price = price;
-        this.kitchenAvailable = kitchenAvailable;
-        this.airConditioning = airConditioning;
-        this.balcony = balcony;
-    }
-
-    public HotelRoom(Hotels hotel, String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        this.hotel = hotel;
-        this.hotelRoomDescription = hotelRoomDescription;
-        this.hotelRoomName = type;
-        this.kitchenAvailable = kitchenAvailable;
-        this.airConditioning = airConditioning;
-        this.balcony = balcony;
-        this.price = price;
-    }
-
-    public HotelRoom(String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        this.hotel = hotel;
-        this.hotelRoomDescription = hotelRoomDescription;
-        this.hotelRoomName = type;
-        this.kitchenAvailable = kitchenAvailable;
-        this.airConditioning = airConditioning;
-        this.balcony = balcony;
-        this.price = price;
-    }
-
-    public HotelRoom() {
-
-    }
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "room_id",unique = true,nullable = false)
-    public long getHotelRoomId() {
-        return hotelRoomId;
-    }
-
-    public void setHotelRoomId(long hotelRoomId) {
-        this.hotelRoomId = hotelRoomId;
-    }
-
-    @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_room_kon_hotel"))
-    public Hotels getHotel() {
-        return hotel;
-    }
-
-    public void setHotel(Hotels hotelId) {
-        this.hotel = hotelId;
-    }
-
-    @Column(name="hotel_room_description",unique = false,nullable = false)
-    @NotNull
-    public String getHotelRoomDescription() {
-        return hotelRoomDescription;
-    }
-
-    public void setHotelRoomDescription(String hotelRoomDescription) {
-        this.hotelRoomDescription = hotelRoomDescription;
-    }
-
-    @Column(name="hotel_room_price",unique = false,nullable = false)
-    @NotNull
-    public double getPrice() {
-        return price;
-    }
-
-    @Column(name="hotel_room_name",unique = false,nullable = false)
-    @NotNull
-    public String getHotelRoomName() {
-        return hotelRoomName;
-    }
-
-
-    public void setHotelRoomName(String name) {
-        this.hotelRoomName = name;
-    }
-    public void setPrice(double type) {
-        this.price = type;
-    }
-    @Column(name="hotel_room_kitchen",unique = false,nullable = false)
-    @NotNull
-    public Boolean getKitchenAvailable() {
-        return kitchenAvailable;
-    }
-
-    public void setKitchenAvailable(Boolean kitchenAvailable) {
-        this.kitchenAvailable = kitchenAvailable;
-    }
-    @Column(name="hotel_room_ac",unique = false,nullable = false)
-    @NotNull
-    public Boolean getAirConditioning() {
-        return airConditioning;
-    }
-
-    public void setAirConditioning(Boolean airConditioning) {
-        this.airConditioning = airConditioning;
-    }
-    @Column(name="hotel_room_balcony",unique = false,nullable = false)
-    @NotNull
-    public Boolean getBalcony() {
-        return balcony;
-    }
-
-    public void setBalcony(Boolean balcony) {
-        this.balcony = balcony;
-    }
-}
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
Index: src/main/java/com/tourMate/entities/HotelRoomReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -43,5 +43,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "room_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_room"))
     public HotelRoom getHotelRoom() {
@@ -59,5 +59,5 @@
     }
 
-    @OneToOne(fetch = FetchType.LAZY)
+    @OneToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_user"))
     public User getUser() {
Index: src/main/java/com/tourMate/entities/MenuImages.java
===================================================================
--- src/main/java/com/tourMate/entities/MenuImages.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
+++ src/main/java/com/tourMate/entities/MenuImages.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -0,0 +1,46 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+@Entity
+public class MenuImages {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private long imageId;
+    @ManyToOne
+    private Menu menu;
+    private String url;
+
+    public MenuImages(Menu menu, String url) {
+        this.menu = menu;
+        this.url = url;
+    }
+
+    public MenuImages() {
+    }
+
+    public long getImageId() {
+        return imageId;
+    }
+
+    public void setImageId(long imageId) {
+        this.imageId = imageId;
+    }
+
+    public Menu getMenu() {
+        return menu;
+    }
+
+    public void setMenu(Menu menu) {
+        this.menu = menu;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}
Index: src/main/java/com/tourMate/entities/RestaurantImages.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantImages.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/RestaurantImages.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -31,5 +31,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name="restaurant_id",unique = false,nullable = false,foreignKey = @ForeignKey(name = "fk_ref_od_restimg_kon_restoran"))
     public Restaurant getRestaurant() {
Index: src/main/java/com/tourMate/entities/RestaurantReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -82,5 +82,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacija_restoran_kon_korisnik"))
     public User getUser() {
Index: src/main/java/com/tourMate/entities/Reviews.java
===================================================================
--- src/main/java/com/tourMate/entities/Reviews.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/Reviews.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -75,5 +75,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
+    @JoinColumn(name = "hotel_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
     public Hotels getHotel () {
         return hotel;
@@ -85,5 +85,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "restaurant_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
     public Restaurant getRestaurant () {
         return restaurant;
@@ -95,5 +95,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "transport_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
+    @JoinColumn(name = "transport_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
     public Transport getTransport () {
         return transport;
Index: src/main/java/com/tourMate/entities/User.java
===================================================================
--- src/main/java/com/tourMate/entities/User.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/entities/User.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -52,5 +52,5 @@
     private Role role;
     @Column(name = "locked", unique = false, nullable = false)
-    boolean locked;
+    boolean locked = false;
 
     @Column(name = "enabled", unique = false, nullable = false)
@@ -96,4 +96,7 @@
     }
 
+    public boolean isLocked() {
+        return locked;
+    }
 
     public long getUserID() {
@@ -162,5 +165,5 @@
     @Override
     public boolean isAccountNonLocked() {
-        return true;
+        return locked;
     }
 
Index: src/main/java/com/tourMate/services/BusinessManager.java
===================================================================
--- src/main/java/com/tourMate/services/BusinessManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/BusinessManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -8,8 +8,12 @@
     public void createBusiness(Business business, long userId);
     public List<Business> getUnapprovedBusinessesOfUser(long userId);
-    public void deleteBusiness(long businessId);
-    public List<Business> getCreatedBusinesses();
+
+    void deleteBusiness(long businessId);
+
+    public List<Business> getUnapprovedBusinesses();
+    public void approveBusiness(Long businessId);
     public Business findBusinessById (long businessId);
-    public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
     public boolean hasBusiness(long userId);
+
+    void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
 }
Index: src/main/java/com/tourMate/services/HotelManager.java
===================================================================
--- src/main/java/com/tourMate/services/HotelManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/HotelManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -2,10 +2,10 @@
 
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 public interface HotelManager {
@@ -24,14 +24,8 @@
     public List<HotelRoom> getRoomsOfHotel (long hotelId);
     public HotelRoom findRoomById (long hotelRoomId);
-<<<<<<< HEAD
     public List<HotelRoomImages> getRoomImages(Long hotelRoom);
     public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
-=======
-    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
     public void deleteRoom(long hotelRoomId);
-    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
     public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
     public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
@@ -40,9 +34,12 @@
     public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
     public List<HotelRoomAvailable> getRoomsAvailibility();
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id);
     public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
-    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds);
+    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
     public void createReservation(Long userId, Long hotelRoomId, Long hotelRoomAvailableId, Date dateFrom, Date dateTo, Integer numberOfBeds);
     public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
     public void deleteReservation(long hotelRoomReservedId);
+    public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId);
+    public List<HotelReservationUserDto> findValidHotelReservationsByUser(Long userId);
     public HotelRoomReservations findReservationById(long hotelRoomReservedId);
     public List<HotelRoomReservations> findReservationByUser(User user);
@@ -54,3 +51,4 @@
 
     void addRoomImage(Long id, List<String> filesToAdd);
+    void setReservationReviewed(Long reservationId);
 }
Index: src/main/java/com/tourMate/services/RestaurantManager.java
===================================================================
--- src/main/java/com/tourMate/services/RestaurantManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/RestaurantManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -2,4 +2,5 @@
 
 import com.tourMate.dto.RestaurantDto;
+import com.tourMate.dto.RestaurantReservationDto;
 import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.entities.*;
@@ -10,46 +11,68 @@
 public interface RestaurantManager {
     public void createRestaurant(Restaurant restaurant, long userId);
-    public void deleteRestaurant(long restaurantID);
+
     public void addMenuToRestaurant(long restaurantId, Menu menu);
+
     public List<Restaurant> getRestaurantsByUser(long userId);
-    void deleteHotel(long restaurantID);
+    public void deleteRestaurant(Long restaurantID);
+
+    void deleteRestaurant(long restaurantID);
 
     public List<Restaurant> getRestaurants();
-    public Restaurant findRestaurantByID (long restaurantID);
+
+    public Restaurant findRestaurantByID(long restaurantID);
+
     public void addRestaurantImage(Long restaurant, List<String> url);
+
     public void removeRestaurantImage(long restaurantImageId);
+
     public RestaurantImages findRestaurantImageById(long restaurantImageId);
 
     public List<RestaurantImages> getRestaurantImages(long restaurantID);
+
     public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
+
+    void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
+
     public List<RestaurantsTable> getRestaurantTables(long restaurantID);
-    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats );
+
+    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
+
     public RestaurantsTable findTableById(long tableId);
+
     public void createTable(Long restaurantId, int noSeats);
+
     public void editTable(Restaurant restaurant, long tableId, int noSeats);
+
     public void deleteTable(long tableId);
 
-    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo);
+    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo, int numTables);
 
     public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
+
     public void deleteTableAvailable(long tableId);
-    public List<RestaurantsTable> getTablesAvailability();
+
     public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
-    public void createReservation(Restaurant restaurant, int noSeats);
+
+    RestaurantsAvailible findAvailableReservationByID(long tableId);
 
     void createReservation(RestaurantsTable rt, Date dateFrom, Date dateTo, User user);
 
-    public void editReservation(long tableId, Restaurant restaurant, int noSeats);
     public void deleteReservation(long tableId);
+
     public RestaurantReservations findReservationByID(long tableId);
-    public List<RestaurantReservations> findAvailableReservationByID();
 
-    List<RestaurantReservations> findAvailableReservationByID(long reservationId);
+//    List<RestaurantReservations> findAvailableReservationByID(long reservationId);
 
     public List<RestaurantReservations> findReservationByUser(User user);
-    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
+
+    public List<RestaurantReservationDto> findReservationByRestaurant(Long restaurant);
+
     public List<RestaurantReservations> getReservations();
+
     public List<Restaurant> searchByRestaurantName(String restaurantName);
+
     public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
+
     public List<RestaurantsTable> searchByNoSeats(int noSeats);
 
@@ -61,3 +84,13 @@
 
     List<RestaurantReservationUserDto> findPastRestaurantReservationsByUser(Long userId);
+
+    List<MenuImages> getMenuImages(Long id);
+
+    void addMenuImage(Long restaurant, List<String> url);
+
+    Menu findMenuById(Long menuId);
+
+    void setReservationReviewed(Long reservationId);
+
+    List<MenuImages> getMenuImagesByRestaurant(long restaurantId);
 }
Index: src/main/java/com/tourMate/services/ReviewManager.java
===================================================================
--- src/main/java/com/tourMate/services/ReviewManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/ReviewManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -9,5 +9,5 @@
 public interface ReviewManager{
 
-    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport);
+    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport, Long reservationId);
     public void deleteReview(long id);
     public Reviews findReviewById(long id);
Index: src/main/java/com/tourMate/services/TransportManager.java
===================================================================
--- src/main/java/com/tourMate/services/TransportManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/TransportManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -13,5 +13,5 @@
 public interface TransportManager {
 
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
 
     public void deleteTransport(long transportId);
@@ -30,4 +30,6 @@
     public TransportReservation findTransportReservationByID(long reservationID);
 
+    List<TransportReservation> findTransportReservationByTransportId(long reservationID);
+
     public List<TransportReservation> getTransportReservations();
 
@@ -35,11 +37,7 @@
     public Transport getTransportById(long transportId);
 
-<<<<<<< HEAD
     List<Reviews> getReviewsForTransport(long transportId);
 
     public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
-=======
-    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date);
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
 
     public List<TransportReservation> getTransportsReservationsByUserID(long userID);
@@ -48,7 +46,4 @@
 
     public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
-
-    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
-
     public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
 
@@ -67,4 +62,6 @@
 
     List<TransportReservationUserDto> findPastTransportReservationsByUser(Long userId);
+
+    void setReservationReviewed(Long reservationId);
 }
 
Index: src/main/java/com/tourMate/services/UsersManager.java
===================================================================
--- src/main/java/com/tourMate/services/UsersManager.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/UsersManager.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -16,3 +16,7 @@
 
     public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact);
+    public List<User> getUnapprovedUsers();
+    public void approveUserProfile(long userId);
+
+    void unlock(Long id);
 }
Index: src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -2,7 +2,10 @@
 
 import com.tourMate.dao.BusinessDao;
+import com.tourMate.dao.UsersDao;
 import com.tourMate.entities.Business;
+import com.tourMate.entities.Role;
 import com.tourMate.entities.User;
 import com.tourMate.services.BusinessManager;
+import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -16,29 +19,54 @@
     @Autowired
     BusinessDao businessDao;
+    @Autowired
+    UsersDao usersDao;
+    @Autowired
+    UsersManager usersManager;
 
     @Override
     public void createBusiness(Business business, long userId) {
-        businessDao.createBusiness(business, userId);
+        User u = usersManager.findUserByID(userId);
+        business.setUser(u);
+        businessDao.createBusiness(business);
     }
 
     @Override
     public List<Business> getUnapprovedBusinessesOfUser(long userId) {
-        return businessDao.getUnapprovedBusinessesOfUser(userId);
+        User u = usersManager.findUserByID(userId);
+        return businessDao.getUnapprovedBusinessesOfUser(u);
     }
 
     @Override
     public void deleteBusiness(long businessId) {
-        businessDao.deleteBusiness(businessId);
+        Business business = businessDao.findBusinessById(businessId);
+        businessDao.deleteBusiness(business);
 
     }
 
     @Override
-    public boolean hasBusiness(long userId){
-        return businessDao.hasBusiness(userId);
+    public List<Business> getUnapprovedBusinesses() {
+        return businessDao.getUnapprovedBusinesses();
     }
 
     @Override
-    public List<Business> getCreatedBusinesses() {
-        return businessDao.getCreatedBusinesses();
+    public void approveBusiness(Long businessId) {
+        Business b = findBusinessById(businessId);
+        b.setApproved(true);
+        businessDao.approveBusiness(b);
+        changeUserRoleBusiness(b.getUser().getUserID());
+    }
+
+    private void changeUserRoleBusiness(Long userId)
+    {
+        User u = usersDao.findUserByID(userId);
+        Role r = usersDao.findById(3L);
+        u.setRole(r);
+        usersDao.updateUser(u);
+    }
+
+    @Override
+    public boolean hasBusiness(long userId){
+        User u = usersManager.findUserByID(userId);
+        return businessDao.hasBusiness(u);
     }
 
@@ -50,5 +78,12 @@
     @Override
     public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved) {
-        businessDao.editBusiness(businessId, name, phone, address, edbs, user, approved);
+        Business business = findBusinessById(businessId);
+        business.setName(name);
+        business.setPhone(phone);
+        business.setAddress(address);
+        business.setEdbs(edbs);
+        business.setUser(user);
+        business.setApproved(approved);
+        businessDao.editBusiness(business);
     }
 
Index: src/main/java/com/tourMate/services/impl/HotelManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -4,12 +4,13 @@
 import com.tourMate.dao.UsersDao;
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
+import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.time.Duration;
-import java.util.Collection;
 import java.util.Date;
 import java.util.List;
@@ -24,5 +25,6 @@
     @Autowired
     UsersDao usersDao;
-
+    @Autowired
+    UsersManager usersManager;
 
     @Override
@@ -33,5 +35,7 @@
     @Override
     public void createHotel(Hotels hotels, long userId) {
-        hotelDao.createHotel(hotels, userId);
+        User u = usersManager.findUserByID(userId);
+        hotels.setOwner(u);
+        hotelDao.createHotel(hotels);
     }
 
@@ -39,5 +43,4 @@
     @Override
     public List<Hotels> getHotels() {
-        List<Hotels> hoteli = hotelDao.getHotels();
         return hotelDao.getHotels();
     }
@@ -45,5 +48,6 @@
     @Override
     public List<Hotels> getHotelsForUser(long userId) {
-        return hotelDao.getHotelsForUser(userId);
+        User u = usersManager.findUserByID(userId);
+        return hotelDao.getHotelsForUser(u);
     }
 
@@ -55,10 +59,19 @@
     @Override
     public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
-        hotelDao.editHotel(hotelId, hotelName, hotelDescripiton, hotelLocation, hotelEDBS, parking, petFriendly, internetAvailable);
+        Hotels hotel = hotelDao.findHotelByID(hotelId);
+        hotel.setHotelName(hotelName);
+        hotel.setHotelDescripiton(hotelDescripiton);
+        hotel.setHotelLocation(hotelLocation);
+        hotel.setHotelEDBS(hotelEDBS);
+        hotel.setParking(parking);
+        hotel.setPetFriendly(petFriendly);
+        hotel.setInternetAvailable(internetAvailable);
+        hotelDao.editHotel(hotel);
     }
 
     @Override
     public void deleteHotel(long hotelId) {
-        hotelDao.deleteHotel(hotelId);
+        Hotels h = findHotelByID(hotelId);
+        hotelDao.deleteHotel(h);
     }
 
@@ -76,5 +89,6 @@
     @Override
     public List<HotelRoom> getRoomsOfHotel(long hotelId) {
-        return hotelDao.getRoomsOfHotel(hotelId);
+        Hotels h = findHotelByID(hotelId);
+        return hotelDao.getRoomsOfHotel(h);
     }
 
@@ -99,5 +113,6 @@
     @Override
     public void deleteHotelImage(long hotelImageId){
-        hotelDao.deleteHotelImage(hotelImageId);
+        HotelsImages hotelsImages = findHotelImageById(hotelImageId);
+        hotelDao.deleteHotelImage(hotelsImages);
     }
 
@@ -108,20 +123,31 @@
 
     @Override
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        hotelDao.createRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
+        hotelDao.createRoom(hotelRoom);
     }
 
     @Override
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        hotelDao.editRoom(hotelRoomId, hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+        HotelRoom hr = findRoomById(hotelRoomId);
+        hr.setHotel(hotel);
+        hr.setHotelRoomDescription(hotelRoomDescription);
+        hr.setHotelRoomName(hotelRoomName);
+        hr.setKitchenAvailable(kitchenAvailable);
+        hr.setAirConditioning(airConditioning);
+        hr.setBalcony(balcony);
+        hr.setPrice(price);
+        hotelDao.editRoom(hr);
     }
 
     @Override
     public void deleteRoom(long hotelRoomId) {
-        hotelDao.deleteRoom(hotelRoomId);
-    }
-
-    @Override
-    public List<HotelRoomAvailable> getRoomsAvailable(Long id) {
+        HotelRoom hr = findRoomById(hotelRoomId);
+        hotelDao.deleteRoom(hr);
+    }
+
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id) {
         return hotelDao.getRoomsAvailable(id);
     }
@@ -129,10 +155,16 @@
     @Override
     public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
-        hotelDao.createRoomAvailible(hotelRoom, dateFrom, dateTo, numberOfBeds);
+        HotelRoomAvailable hra = new HotelRoomAvailable(hotelRoom, dateFrom, dateTo, numberOfBeds);
+        hotelDao.createRoomAvailible(hra);
     }
 
     @Override
     public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
-        hotelDao.editRoomAvailible(hotelRoomAvailableId, hotelRoom, dateFrom, dateTo, numberOfBeds);
+        HotelRoomAvailable hr = findAvailibleRoomById(hotelRoomAvailableId);
+        hr.setHotelRoom(hotelRoom);
+        hr.setDateFrom(dateFrom);
+        hr.setDateTo(dateTo);
+        hr.setNumberOfBeds(numberOfBeds);
+        hotelDao.editRoomAvailible(hr);
     }
 
@@ -142,11 +174,14 @@
         roomAvailable.setNumberOfBeds(numberOfBeds-1);
         HotelRoom room = hotelDao.findRoomById(hotelRoomId);
-        hotelDao.createRoomAvailible(room, roomAvailable.getDateFrom(), from, 1);
-        hotelDao.createRoomAvailible(room, to, roomAvailable.getDateTo(), 1);
+        HotelRoomAvailable hra = new HotelRoomAvailable(room,roomAvailable.getDateFrom(),from,1);
+        hotelDao.createRoomAvailible(hra);
+        HotelRoomAvailable hra1 = new HotelRoomAvailable(room,to,roomAvailable.getDateTo(),1);
+        hotelDao.createRoomAvailible(hra1);
     }
 
     @Override
     public void deleteRoomAvailible(long hotelRoomAvailableId) {
-        hotelDao.deleteRoomAvailible(hotelRoomAvailableId);
+        HotelRoomAvailable hra = findAvailibleRoomById(hotelRoomAvailableId);
+        hotelDao.deleteRoomAvailible(hra);
     }
 
@@ -167,7 +202,7 @@
 
     @Override
-    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
+    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible) {
         long numberOfNights = Duration.between(dateFrom.toInstant(), dateTo.toInstant()).toDays();
-        List<HotelRoomAvailable> roomsAvailible = hotelDao.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numberOfBeds);
+        List<HotelRoomAvailable> roomsAvailible = hotelDao.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numberOfBeds, flexible);
         Map<Hotels, List<HotelRoomAvailable>> roomsByHotels = roomsAvailible.stream().collect(Collectors.groupingBy(x -> x.getHotelRoom().getHotel()));
         List<HotelDto> hotelsList = roomsByHotels.keySet().stream()
@@ -195,20 +230,30 @@
         HotelRoom room = hotelDao.findRoomById(hotelRoomId);
         User user = usersDao.findUserByID(userId);
-        hotelDao.createReservation(user, room, dateFrom, dateTo, numberOfBeds);
+        HotelRoomReservations r = new HotelRoomReservations(user, room, dateFrom, dateTo, numberOfBeds);
         editRoomAvailibleReservation(hotelRoomAvailableId, hotelRoomId, dateFrom, dateTo, numberOfBeds);
+        hotelDao.createReservation(r);
+
     }
 
     @Override
     public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
-        hotelDao.editReservation(hotelRoomReservedId, user, hotelRoom, dateFrom, dateTo, numberOfBeds);
+        HotelRoomReservations hr = findReservationById(hotelRoomReservedId);
+        hr.setUser(user);
+        hr.setHotelRoom(hotelRoom);
+        hr.setDateFrom(dateFrom);
+        hr.setDateTo(dateTo);
+        hr.setNumberOfBeds(numberOfBeds);
+        hotelDao.editReservation(hr);
     }
 
     @Override
     public void deleteReservation(long hotelRoomReservedId) {
-        hotelDao.deleteReservation(hotelRoomReservedId);
-    }
-
-    @Override
-<<<<<<< HEAD
+        HotelRoomReservations r = findReservationById(hotelRoomReservedId);
+        HotelRoomAvailable hra = new HotelRoomAvailable(r.getHotelRoom(), r.getDateFrom(), r.getDateTo(), r.getNumberOfBeds());
+        hotelDao.createRoomAvailible(hra);
+        hotelDao.deleteReservation(r);
+    }
+
+    @Override
     public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId) {
         Hotels hotel = findHotelByID(hotelId);
@@ -230,4 +275,5 @@
         List<HotelRoomReservations> reservations = hotelDao.findReservationByUser(u);
         return reservations.stream().map(x -> new HotelReservationUserDto(
+                x.getHotelRoomReservedId(),
                 x.getUser(),
                 x.getHotelRoom(),
@@ -244,6 +290,4 @@
 
     @Override
-=======
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
     public HotelRoomReservations findReservationById(long hotelRoomReservedId) {
         return hotelDao.findReservationById(hotelRoomReservedId);
@@ -276,4 +320,5 @@
         List<HotelRoomReservations> reservations = hotelDao.findPastReservationByUser(u);
         return reservations.stream().map(x -> new HotelReservationUserDto(
+                x.getHotelRoomReservedId(),
                 x.getUser(),
                 x.getHotelRoom(),
@@ -294,3 +339,10 @@
         filesToAdd.stream().map(file -> new HotelRoomImages(hr, file)).forEach(x -> hotelDao.addRoomImage(x));
     }
+
+    @Override
+    public void setReservationReviewed(Long reservationId) {
+        HotelRoomReservations hotelRoomReservations = findReservationById(reservationId);
+        hotelRoomReservations.setReviewed(true);
+        hotelDao.saveReservation(hotelRoomReservations);
+    }
 }
Index: src/main/java/com/tourMate/services/impl/ImageManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ImageManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/ImageManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -56,4 +56,8 @@
             hotelManager.addRoomImage(id, filesToAdd);
         }
+        else if(type.equals("menu"))
+        {
+            restaurantManager.addMenuImage(id, filesToAdd);
+        }
 
         return filesToAdd;
Index: src/main/java/com/tourMate/services/impl/MenuManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -17,10 +17,11 @@
     @Override
     public void createMenu(String name, String ingredients, double price) {
-        menuDao.createMenu(name, ingredients, price);
+        menuDao.createMenu(new Menu(name, ingredients, price));
     }
 
     @Override
     public void deleteMenu(long menuId) {
-        menuDao.deleteMenu(menuId);
+        Menu menu = findMenuById(menuId);
+        menuDao.deleteMenu(menu);
     }
 
@@ -37,5 +38,9 @@
     @Override
     public void editMenu(long menuId, String name, String ingredients, double price) {
-        menuDao.editMenu(menuId, name, ingredients, price);
+        Menu menu = findMenuById(menuId);
+        menu.setName(name);
+        menu.setIngredients(ingredients);
+        menu.setPrice(price);
+        menuDao.editMenu(menu);
     }
 }
Index: src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -3,4 +3,5 @@
 import com.tourMate.dao.RestaurantDao;
 import com.tourMate.dto.RestaurantDto;
+import com.tourMate.dto.RestaurantReservationDto;
 import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.services.RestaurantManager;
@@ -22,29 +23,35 @@
     @Autowired
     UsersManager usersManager;
+
     @Override
     public void createRestaurant(Restaurant restaurant, long userId) {
-        restaurantDao.createRestaurant(restaurant, userId);
-    }
-
-
+        User u = usersManager.findUserByID(userId);
+        Restaurant r = new Restaurant(restaurant.getRestaurantName(), restaurant.getRestaurantLocation(), restaurant.getCousineType(), restaurant.getRestaurantDescription(), restaurant.getRestaurantEdbs(), u);
+        restaurantDao.createRestaurant(r);
+    }
+
+    @Override
+    public void deleteRestaurant(Long restaurantID) {
+        Restaurant r = findRestaurantByID(restaurantID);
+        restaurantDao.deleteRestaurant(r);
+    }
+
+    @Override
+    public void addMenuToRestaurant(long restaurantId, Menu menu) {
+        Restaurant r = findRestaurantByID(restaurantId);
+        menu.setRestaurant(r);
+        restaurantDao.addMenuToRestaurant(menu);
+    }
+
+    @Override
+    public List<Restaurant> getRestaurantsByUser(long userId) {
+        User u = usersManager.findUserByID(userId);
+        return restaurantDao.getRestaurantsByUser(u);
+    }
 
     @Override
     public void deleteRestaurant(long restaurantID) {
-        restaurantDao.deleteRestaurant(restaurantID);
-    }
-
-    @Override
-    public void addMenuToRestaurant(long restaurantId, Menu menu) {
-        restaurantDao.addMenuToRestaurant(restaurantId, menu);
-    }
-
-    @Override
-    public List<Restaurant> getRestaurantsByUser(long userId) {
-        return restaurantDao.getRestaurantsByUser(userId);
-    }
-
-    @Override
-    public void deleteHotel(long restaurantID) {
-        restaurantDao.deleteRestaurant(restaurantID);
+        Restaurant r = findRestaurantByID(restaurantID);
+        restaurantDao.deleteRestaurant(r);
     }
 
@@ -67,5 +74,6 @@
     @Override
     public void removeRestaurantImage(long restaurantImageId) {
-        restaurantDao.removeRestaurantImage(restaurantImageId);
+        RestaurantImages restaurantImage = findRestaurantImageById(restaurantImageId);
+        restaurantDao.removeRestaurantImage(restaurantImage);
     }
 
@@ -81,5 +89,5 @@
 
     @Override
-    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats){
+    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats) {
         List<RestaurantsAvailible> restaurantsAvailibles = restaurantDao.getTablesByDateAndLocation(restaurantLocation, hourFrom, hourTo, noSeats);
         Map<Restaurant, List<RestaurantsAvailible>> tablesByRestaurants = restaurantsAvailibles.stream().collect(Collectors.groupingBy(x -> x.getRestaurantTable().getRestaurant()));
@@ -96,5 +104,6 @@
                         getReviewsForRestaurant(x.getRestaurantID()),
                         getReviewsForRestaurant(x.getRestaurantID()).stream().mapToDouble(Reviews::getNumStar).average().orElse(0),
-                        getRestaurantImages(x.getRestaurantID())
+                        getRestaurantImages(x.getRestaurantID()),
+                        getMenuImagesByRestaurant(x.getRestaurantID())
                 )).toList();
         return restaurantsList;
@@ -103,5 +112,23 @@
     @Override
     public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner) {
-        restaurantDao.editRestaurant(restaurantID, restaurantName, restaurantLocation, cousineType, restaurantDescription, restaurantEdbs, restaurantOwner);
+        Restaurant res = findRestaurantByID(restaurantID);
+        res.setRestaurantName(restaurantName);
+        res.setRestaurantLocation(restaurantLocation);
+        res.setRestaurantEdbs(restaurantEdbs);
+        res.setRestaurantDescription(restaurantDescription);
+        res.setRestaurantOwner(restaurantOwner);
+        res.setCousineType(cousineType);
+        restaurantDao.createRestaurant(res);
+    }
+
+    @Override
+    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user){
+        RestaurantReservations r = findReservationByID(restaurantsTableId);
+        r.setTable(rt);
+        r.setTimeFrom(hourFrom);
+        r.setTimeTo(hourTo);
+        r.setNoSeats(noSeats);
+        r.setUser(user);
+        restaurantDao.saveReservation(r);
     }
 
@@ -119,26 +146,31 @@
     public void createTable(Long restaurantId, int noSeats) {
         Restaurant r = restaurantDao.findRestaurantByID(restaurantId);
-        restaurantDao.createTable(r, noSeats);
+        RestaurantsTable restaurantsTable = new RestaurantsTable(r, noSeats);
+        restaurantDao.saveTable(restaurantsTable);
     }
 
     @Override
     public void editTable(Restaurant restaurant, long tableId, int noSeats) {
-        restaurantDao.editTable(restaurant, tableId, noSeats);
+        RestaurantsTable resTable = findTableById(tableId);
+        resTable.setRestaurant(restaurant);
+        resTable.setNoSeats(noSeats);
+        restaurantDao.saveTable(resTable);
     }
 
     @Override
     public void deleteTable(long tableId) {
-        restaurantDao.deleteTable(tableId);
-    }
-
-    @Override
-    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo) {
+        RestaurantsTable rt = findTableById(tableId);
+        restaurantDao.deleteTable(rt);
+    }
+
+    @Override
+    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo, int numTables) {
         RestaurantsTable rtabl = findTableById(rt);
-        restaurantDao.createTableAvailable(rtabl, hourFrom, hourTo);
-    }
-
-    @Override
-    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id)
-    {
+        RestaurantsAvailible ra = new RestaurantsAvailible(rtabl, hourFrom, hourTo, numTables);
+        restaurantDao.saveTableAvailable(ra);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id) {
         return restaurantDao.getTablesAvailabilityById(id);
     }
@@ -146,20 +178,19 @@
     @Override
     public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats) {
-        restaurantDao.editTableAvailable(tableId, restaurant, noSeats);
+        RestaurantsTable rt = findTableById(tableId);
+        rt.setRestaurant(restaurant);
+        rt.setNoSeats(noSeats);
+        restaurantDao.saveTable(rt);
     }
 
     @Override
     public void deleteTableAvailable(long tableId) {
-        restaurantDao.deleteTableAvailable(tableId);
-    }
-
-    @Override
-    public List<RestaurantsTable> getTablesAvailability() {
-        return null;
-    }
-
-    @Override
-    public void createReservation(Restaurant restaurant, int noSeats) {
-
+        RestaurantsAvailible ra = findAvailableReservationByID(tableId);
+        restaurantDao.deleteTableAvailable(ra);
+    }
+
+    @Override
+    public RestaurantsAvailible findAvailableReservationByID(long tableId){
+        return restaurantDao.findAvailableReservationByID(tableId);
     }
 
@@ -170,29 +201,17 @@
     }
 
-    @Override
-    public void editReservation(long tableId, Restaurant restaurant, int noSeats) {
-        //restaurantDao.editReservation(tableId, restaurant, noSeats);
-    }
 
     @Override
     public void deleteReservation(long tableId) {
-        restaurantDao.deleteReservation(tableId);
+        RestaurantReservations r = findReservationByID(tableId);
+        RestaurantsAvailible ra = new RestaurantsAvailible(r.getTable(), r.getTimeFrom(), r.getTimeTo(), r.getNoSeats());
+        restaurantDao.saveTableAvailable(ra);
+        restaurantDao.deleteReservation(r);
     }
 
     @Override
     public RestaurantReservations findReservationByID(long tableId) {
-        //return restaurantDao.findReservationByID(tableId);
-        return null;
-    }
-
-    @Override
-    public List<RestaurantReservations> findAvailableReservationByID() {
-        return null;
-    }
-
-    @Override
-    public List<RestaurantReservations> findAvailableReservationByID(long reservationId) {
-        return null;
-        // return restaurantDao.findAvailableReservationByID(reservationId);
+        return restaurantDao.findReservationByID(tableId);
+        //return null;
     }
 
@@ -203,6 +222,13 @@
 
     @Override
-    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant) {
-        return restaurantDao.findReservationByRestaurant(restaurant);
+    public List<RestaurantReservationDto> findReservationByRestaurant(Long restaurant) {
+        Restaurant r = findRestaurantByID(restaurant);
+        List<RestaurantReservations> res = restaurantDao.findReservationByRestaurant(r);
+        return res.stream().map(x -> new RestaurantReservationDto(
+                x.getUser(),
+                x.getTable(),
+                x.getTimeFrom(),
+                x.getTimeTo()
+        )).collect(Collectors.toList());
     }
 
@@ -251,9 +277,11 @@
     }
 
-    public void editTableAvailability(RestaurantsAvailible restaurantsAvailible, RestaurantsTable table, Date dateFrom, Date dateTo)
-    {
+    public void editTableAvailability(RestaurantsAvailible restaurantsAvailible, RestaurantsTable table, Date dateFrom, Date dateTo) {
         restaurantsAvailible.setNumTables(restaurantsAvailible.getNumTables() - 1);
-        restaurantDao.createTableAvailable(table, restaurantsAvailible.getHourFrom(), dateFrom, 1);
-        restaurantDao.createTableAvailable(table, dateTo, restaurantsAvailible.getHourTo(), 1);
+        RestaurantsAvailible ra1 = new RestaurantsAvailible(table, restaurantsAvailible.getHourFrom(), dateFrom, 1);
+        RestaurantsAvailible ra2 = new RestaurantsAvailible(table, dateTo, restaurantsAvailible.getHourTo(), 1);
+
+        restaurantDao.saveTableAvailable(ra1);
+        restaurantDao.saveTableAvailable(ra2);
     }
 
@@ -263,4 +291,5 @@
         List<RestaurantReservations> reservations = restaurantDao.findReservationByUser(u);
         return reservations.stream().map(x -> new RestaurantReservationUserDto(
+                x.getReservationId(),
                 x.getUser(),
                 x.getTable(),
@@ -281,4 +310,5 @@
         List<RestaurantReservations> reservations = restaurantDao.findPastReservationsByUser(u);
         return reservations.stream().map(x -> new RestaurantReservationUserDto(
+                x.getReservationId(),
                 x.getUser(),
                 x.getTable(),
@@ -293,3 +323,32 @@
         )).toList();
     }
+
+    @Override
+    public List<MenuImages> getMenuImages(Long id) {
+        return restaurantDao.getMenuImages(id);
+    }
+
+    @Override
+    public void addMenuImage(Long menuId, List<String> url) {
+        Menu r = restaurantDao.findMenuId(menuId);
+        url.stream().map(file -> new MenuImages(r, file)).forEach(x -> restaurantDao.addMenuImage(x));
+    }
+
+    @Override
+    public Menu findMenuById(Long menuId) {
+        return restaurantDao.findMenuId(menuId);
+    }
+
+    @Override
+    public void setReservationReviewed(Long reservationId) {
+        RestaurantReservations restaurantReservations = findReservationByID(reservationId);
+        restaurantReservations.setReviewed(true);
+        restaurantDao.saveReservation(restaurantReservations);
+    }
+
+    @Override
+    public List<MenuImages> getMenuImagesByRestaurant(long restaurantId) {
+        Restaurant r = findRestaurantByID(restaurantId);
+        return restaurantDao.getMenuImagesByRestaurant(r);
+    }
 }
Index: src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -3,8 +3,5 @@
 import com.tourMate.dao.ReviewDao;
 import com.tourMate.dao.ReviewManager;
-import com.tourMate.entities.Hotels;
-import com.tourMate.entities.Restaurant;
-import com.tourMate.entities.Reviews;
-import com.tourMate.entities.Transport;
+import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
 import com.tourMate.services.RestaurantManager;
@@ -29,5 +26,5 @@
 
     @Override
-    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport) {
+    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport, Long reservationId) {
         Hotels h = null;
         Restaurant r = null;
@@ -36,12 +33,15 @@
         {
             h = hotelManager.findHotelByID(hotel);
+            hotelManager.setReservationReviewed(reservationId);
         }
         if(restaurant != null)
         {
             r = restaurantManager.findRestaurantByID(restaurant);
+            restaurantManager.setReservationReviewed(reservationId);
         }
         if(transport != null)
         {
             t = transportManager.getTransportById(transport);
+            transportManager.setReservationReviewed(reservationId);
         }
         Reviews review = new Reviews (title, numStar, description, h, r, t);
@@ -51,5 +51,6 @@
     @Override
     public void deleteReview(long id) {
-        reviewDao.deleteReview(id);
+        Reviews review = findReviewById(id);
+        reviewDao.deleteReview(review);
     }
 
@@ -61,5 +62,12 @@
     @Override
     public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
-        reviewDao.editReview(id, title, description, numStar, hotel, restaurant, transport);
+        Reviews review = findReviewById(id);
+        review.setDescription(description);
+        review.setHotel(hotel);
+        review.setRestaurant(restaurant);
+        review.setTitle(title);
+        review.setNumStar(numStar);
+        review.setTransport(transport);
+        reviewDao.editReview(review);
     }
 
Index: src/main/java/com/tourMate/services/impl/TransportManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -24,12 +24,16 @@
     UsersManager usersManager;
 
-    @Override
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        transportDao.createTransport(transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, owner, carPlate);
+
+    @Override
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate) {
+        User u = usersManager.findUserByID(userId);
+        Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
+        transportDao.createTransport(t);
     }
 
     @Override
     public void deleteTransport(long transportId) {
-        transportDao.deleteTransport(transportId);
+        Transport t=getTransportById(transportId);
+        transportDao.deleteTransport(t);
     }
 
@@ -41,10 +45,12 @@
     @Override
     public List<TransportDto> getTransportsByUser(long userId) {
-        return transportDao.getTransportsByUser(userId);
+        User u = usersManager.findUserByID(userId);
+        return transportDao.getTransportsByUser(u);
     }
 
     @Override
     public List<RouteListingDto> getRoutesForTransport(long transportId) {
-        return transportDao.getRoutesForTransport(transportId);
+        Transport t = getTransportById(transportId);
+        return transportDao.getRoutesForTransport(t);
     }
 
@@ -61,5 +67,15 @@
     @Override
     public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        transportDao.editTransport(transportID, transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, owner, carPlate);
+        Transport t=getTransportById(transportID);
+        t.setTransportName(transportName);
+        t.setCarBrand(carBrand);
+        t.setCarType(carType);
+        t.setCarManufacturedYear(carManufacturedYear);
+        t.setNoPassengers(noPassengers);
+        t.setNoBags(noBags);
+        t.setEMBG(EMBG);
+        t.setOwner(owner);
+        t.setCarPlate(carPlate);
+        transportDao.editTransport(t);
     }
 
@@ -78,4 +94,10 @@
 
     @Override
+    public List<TransportReservation> findTransportReservationByTransportId(long reservationID) {
+        Transport t = getTransportById(reservationID);
+        return transportDao.findTransportReservationByTransportId(t);
+    }
+
+    @Override
     public List<TransportReservation> getTransportReservations() {
         return transportDao.getTransportReservations();
@@ -93,5 +115,4 @@
 
     @Override
-<<<<<<< HEAD
     public List<Reviews> getReviewsForTransport(long transportId) {
         Transport transport = getTransportById(transportId);
@@ -102,8 +123,4 @@
     public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date, int numPassengers) {
         List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date, numPassengers);
-=======
-    public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date) {
-        List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date);
->>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)
         Map<TransportAvailible, List<TransportRoute>> transportsByTransporter = transportAvailable.stream().collect(Collectors.groupingBy(x -> x.getParentRoute()));
         List<TransportListingDto> transportList = transportsByTransporter.keySet().stream().toList().stream()
@@ -136,40 +153,61 @@
     @Override
     public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes) {
-        transportDao.createTransportAvailable(transport, departureLocation, arrivalLocation, date, noSeats, departureHour, routes);
-    }
-
-    @Override
-    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour) {
-        transportDao.editTransportReservation(transport, reservationID, departureLocation, arrivalLocation, date, noSeats, user, departureHour);
+        TransportAvailible ta=new TransportAvailible(transport,departureLocation,arrivalLocation,date,noSeats,departureHour);
+        transportDao.createTransportAvailable(ta);
+        routes.forEach(x -> {
+            TransportRoute tr = new TransportRoute(ta, x.getFrom(), x.getTo(), x.getPrice(), x.getDeparture(), x.getArrival(), x.getFreeSpace(), x.getOrder());
+            transportDao.createTransportRoute(tr);
+        });
     }
 
     @Override
     public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour) {
-        transportDao.editTransportAvailable(transport, availableID, departureLocation, arrivalLocation, date, noSeats, departureHour);
+        TransportAvailible ta=findTransportAvailableByID(availableID);
+        ta.setTransport(transport);
+        ta.setFrom(departureLocation);
+        ta.setTo(arrivalLocation);
+        ta.setDate(date);
+        ta.setFreeSpace(noSeats);
+        ta.setTime(departureHour);
+        transportDao.editTransportAvailable(ta);
     }
 
     @Override
     public void deleteTransportReservation(long reservationID) {
-        transportDao.deleteTransportReservation(reservationID);
+        TransportReservation tr=findTransportReservationByID(reservationID);
+        transportDao.deleteTransportReservation(tr);
     }
 
     @Override
     public void deleteTransportAvailable(long availableID) {
-        transportDao.deleteTransportAvailable(availableID);
+        TransportAvailible ta=findTransportAvailableByID(availableID);
+        transportDao.deleteTransportAvailable(ta);
     }
 
     @Override
     public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        transportDao.createTransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
+        TransportRoute tr = new TransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
+
+        transportDao.createTransportRoute(tr);
     }
 
     @Override
     public void deleteTransportRoute(long transportRouteId) {
-        transportDao.deleteTransportRoute(transportRouteId);
+        TransportRoute tr = transportDao.findTransportRouteById(transportRouteId);
+        transportDao.deleteTransportRoute(tr);
     }
 
     @Override
     public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        transportDao.editTransportRoute(transportRouteId, parentRoute, from, to, price, departure, arrival, freeSpace, order);
+        TransportRoute tr = transportDao.findTransportRouteById(transportRouteId);
+        tr.setParentRoute(parentRoute);
+        tr.setFrom(from);
+        tr.setTo(to);
+        tr.setPrice(price);
+        tr.setDeparture(departure);
+        tr.setArrival(arrival);
+        tr.setFreeSpace(freeSpace);
+        tr.setOrder(order);
+        transportDao.editTransportRoute(tr);
     }
 
@@ -179,4 +217,5 @@
         List<TransportReservation> reservations = transportDao.findReservationByUser(u);
         return reservations.stream().map(x -> new TransportReservationUserDto(
+                x.getReservationID(),
                 x.getUser(),
                 x.getTransportRoute(),
@@ -195,4 +234,5 @@
         List<TransportReservation> reservations = transportDao.findPastReservationByUser(u);
         return reservations.stream().map(x -> new TransportReservationUserDto(
+                x.getReservationID(),
                 x.getUser(),
                 x.getTransportRoute(),
@@ -206,4 +246,11 @@
     }
 
+    @Override
+    public void setReservationReviewed(Long reservationId) {
+        TransportReservation transportReservation = findTransportReservationByID(reservationId);
+        transportReservation.setReviewed(true);
+        transportDao.saveReservation(transportReservation);
+    }
+
 }
 
Index: src/main/java/com/tourMate/services/impl/UsersManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision 5528b99794e1d3a36baa8eb2f1829125b75f0174)
+++ src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision 07f4e8b52fa18ab7781f9660c09d7982d8cd5a0b)
@@ -45,4 +45,23 @@
 
     @Override
+    public List<User> getUnapprovedUsers() {
+        return usersDao.getUnapprovedUsers();
+    }
+
+    @Override
+    public void approveUserProfile(long userId) {
+        User u = findUserByID(userId);
+        usersDao.approveUserProfile(u);
+    }
+
+    @Override
+    public void unlock(Long id) {
+        User u = findUserByID(id);
+        u.setLocked(!u.isLocked());
+        u.setEnabled(true);
+        usersDao.updateUser(u);
+    }
+
+    @Override
     public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
         return usersDao.findUserByUsername(username);
