Class BookingServiceImpl

java.lang.Object
com.rosivanyshyn.service.impl.BookingServiceImpl
All Implemented Interfaces:
BookingService

public class BookingServiceImpl extends Object implements BookingService
  • Constructor Details

  • Method Details

    • createBooking

      public Boolean createBooking(Booking booking)
      Description copied from interface: BookingService
      Create new booking
      Specified by:
      createBooking in interface BookingService
      Parameters:
      booking - the booking to be added
      Returns:
      operation result
    • findFewBookingAndSort

      public ArrayList<Booking> findFewBookingAndSort(String secondQueryPart, Object... fields)
      Description copied from interface: BookingService
      Find few bookings using second query part conditions and by fields for them
      Specified by:
      findFewBookingAndSort in interface BookingService
      Parameters:
      secondQueryPart - QueryBuilder result string
      fields - fields to insert in second query part statement
      Returns:
      found bookings
    • updateBooking

      public Boolean updateBooking(Booking booking)
      Description copied from interface: BookingService
      Update booking
      Specified by:
      updateBooking in interface BookingService
      Parameters:
      booking - booking to update
      Returns:
      operation result
    • deleteBooking

      public Boolean deleteBooking(Booking booking)
      Description copied from interface: BookingService
      Delete booking
      Specified by:
      deleteBooking in interface BookingService
      Parameters:
      booking - booking to delete
      Returns:
      operation result
    • getRowsNumber

      public int getRowsNumber()
      Description copied from interface: BookingService
      Get last statement rows count
      Specified by:
      getRowsNumber in interface BookingService
      Returns:
      last statement rows count
    • getBookingsDatesFromDB

      public HashMap<Date,Date> getBookingsDatesFromDB(Long apartmentIdOfBookingDates)
      Description copied from interface: BookingService
      Get all booking dates of related apartment
      Specified by:
      getBookingsDatesFromDB in interface BookingService
      Parameters:
      apartmentIdOfBookingDates - related apartment id
      Returns:
      HashMap with check-in-date as key and check-out-date as value