public Page<Booking> findBookings(SearchCriteria searchCriteria, String username) { if (username != null) { int page = searchCriteria.getPage(); int size = searchCriteria.getPageSize(); Page<Booking> bookingPage = bookingRepository.findBookings(username, new PageRequest(page, size)); return bookingPage; } return null; }
public void deleteBooking(Long id) { bookingRepository.delete(id); }
public Booking save(Booking booking) { return bookingRepository.save(booking); }