Package com.rosivanyshyn.service

# Interface BookingService

All Known Implementing Classes:
  `BookingServiceImpl`

public interface BookingService
Booking Service interface.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Boolean`
  `createBooking(Booking booking)`
  Create new booking
  `Boolean`
  `deleteBooking(Booking booking)`
  Delete booking
  `ArrayList<Booking>`
  `findFewBookingAndSort(String secondQueryPart, Object... fields)`
  Find few bookings using second query part conditions and by fields for them
  `HashMap<Date,Date>`
  `getBookingsDatesFromDB(Long apartmentIdOfBookingDates)`
  Get all booking dates of related apartment
  `int`
  `getRowsNumber()`
  Get last statement rows count
  `Boolean`
  `updateBooking(Booking booking)`
  Update booking

- ## Method Details

  - ### createBooking

    Boolean createBooking(Booking booking)
    Create new booking
    Parameters:
      `booking` - the booking to be added
    Returns:
      operation result

  - ### findFewBookingAndSort

    ArrayList<Booking> findFewBookingAndSort(String secondQueryPart, Object... fields)
    Find few bookings using second query part conditions and by fields for them
    Parameters:
      `secondQueryPart` - QueryBuilder result string
      `fields` - fields to insert in second query part statement
    Returns:
      found bookings

  - ### updateBooking

    Boolean updateBooking(Booking booking)
    Update booking
    Parameters:
      `booking` - booking to update
    Returns:
      operation result

  - ### deleteBooking

    Boolean deleteBooking(Booking booking)
    Delete booking
    Parameters:
      `booking` - booking to delete
    Returns:
      operation result

  - ### getBookingsDatesFromDB

    HashMap<Date,Date> getBookingsDatesFromDB(Long apartmentIdOfBookingDates)
    Get all booking dates of related apartment
    Parameters:
      `apartmentIdOfBookingDates` - related apartment id
    Returns:
      HashMap with check-in-date as key and check-out-date as value

  - ### getRowsNumber

    int getRowsNumber()
    Get last statement rows count
    Returns:
      last statement rows count