Package com.rosivanyshyn.service.impl
Class BookingServiceImpl
java.lang.Object
com.rosivanyshyn.service.impl.BookingServiceImpl
- All Implemented Interfaces:
BookingService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBooking(Booking booking) Create new bookingdeleteBooking(Booking booking) Delete bookingfindFewBookingAndSort(String secondQueryPart, Object... fields) Find few bookings using second query part conditions and by fields for themgetBookingsDatesFromDB(Long apartmentIdOfBookingDates) Get all booking dates of related apartmentintGet last statement rows countupdateBooking(Booking booking) Update booking
-
Constructor Details
-
BookingServiceImpl
-
-
Method Details
-
createBooking
Description copied from interface:BookingServiceCreate new booking- Specified by:
createBookingin interfaceBookingService- Parameters:
booking- the booking to be added- Returns:
- operation result
-
findFewBookingAndSort
Description copied from interface:BookingServiceFind few bookings using second query part conditions and by fields for them- Specified by:
findFewBookingAndSortin interfaceBookingService- Parameters:
secondQueryPart- QueryBuilder result stringfields- fields to insert in second query part statement- Returns:
- found bookings
-
updateBooking
Description copied from interface:BookingServiceUpdate booking- Specified by:
updateBookingin interfaceBookingService- Parameters:
booking- booking to update- Returns:
- operation result
-
deleteBooking
Description copied from interface:BookingServiceDelete booking- Specified by:
deleteBookingin interfaceBookingService- Parameters:
booking- booking to delete- Returns:
- operation result
-
getRowsNumber
public int getRowsNumber()Description copied from interface:BookingServiceGet last statement rows count- Specified by:
getRowsNumberin interfaceBookingService- Returns:
- last statement rows count
-
getBookingsDatesFromDB
Description copied from interface:BookingServiceGet all booking dates of related apartment- Specified by:
getBookingsDatesFromDBin interfaceBookingService- Parameters:
apartmentIdOfBookingDates- related apartment id- Returns:
- HashMap with check-in-date as key and check-out-date as value
-