Package com.rosivanyshyn.db.dao.implMySQL

# Class ApartmentDAOImpl

java.lang.Object
com.rosivanyshyn.db.dao.implMySQL.GenericDAOImpl<Apartment>
com.rosivanyshyn.db.dao.implMySQL.ApartmentDAOImpl

All Implemented Interfaces:
  `ApartmentDAO`, `GenericDAO<Apartment>`

public class ApartmentDAOImpl extends GenericDAOImpl<Apartment> implements ApartmentDAO
Apartment DAO interface implementation.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.rosivanyshyn.db.dao.implMySQL.GenericDAOImpl

  `GenericDAOImpl.DBStatementOperations<T>, GenericDAOImpl.ExtractEntity<T>, GenericDAOImpl.SetGeneratedValuesToEntity<T>`

- ## Field Summary

  ### Fields inherited from class com.rosivanyshyn.db.dao.implMySQL.GenericDAOImpl

  `className, LOG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApartmentDAOImpl()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ArrayList<Apartment>`
  `getUniqueApartmentsWhichAreBookedWithDynamicQuery(Connection con, String secondQueryPart, Object... fields)`
  Get a list of unique booked apartments and apply to them query-builder part (Sorting, limits, etc.)
  `ArrayList<Apartment>`
  `getUniqueApartmentsWhichAreFree(Connection con, String secondQueryPart, Object... fields)`
  Get a list of unique free (not booked in the future), available (state is true) apartments
  `ArrayList<Apartment>`
  `searchApartments(Connection con, String value, int start, int total)`
  Get objects using direct search algorithms from respective table by relevance.

  ### Methods inherited from class com.rosivanyshyn.db.dao.implMySQL.GenericDAOImpl

  `countRowsInLastQuery, delete, get, getAll, getByField, getFew, getWithDynamicQuery, insert, update`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.rosivanyshyn.db.dao.GenericDAO

  `countRowsInLastQuery, delete, get, getAll, getByField, getFew, getWithDynamicQuery, insert, update`

- ## Constructor Details

  - ### ApartmentDAOImpl

    public ApartmentDAOImpl()

- ## Method Details

  - ### getUniqueApartmentsWhichAreBookedWithDynamicQuery

    public ArrayList<Apartment> getUniqueApartmentsWhichAreBookedWithDynamicQuery(Connection con, String secondQueryPart, Object... fields)
    Description copied from interface: `ApartmentDAO`
    Get a list of unique booked apartments and apply to them query-builder part (Sorting, limits, etc.)
    Specified by:
      `getUniqueApartmentsWhichAreBookedWithDynamicQuery` in interface `ApartmentDAO`
    Parameters:
      `con` - connection to database
      `secondQueryPart` - query builder string part
      `fields` - fields for insertion in query builder string part statement
    Returns:
      ArrayList result array

  - ### getUniqueApartmentsWhichAreFree

    public ArrayList<Apartment> getUniqueApartmentsWhichAreFree(Connection con, String secondQueryPart, Object... fields)
    Description copied from interface: `ApartmentDAO`
    Get a list of unique free (not booked in the future), available (state is true) apartments
    Specified by:
      `getUniqueApartmentsWhichAreFree` in interface `ApartmentDAO`
    Parameters:
      `con` - connection to database
      `secondQueryPart` - query builder string part
      `fields` - fields for insertion in query builder string part statement
    Returns:
      ArrayList result array

  - ### searchApartments

    public ArrayList<Apartment> searchApartments(Connection con, String value, int start, int total)
    Description copied from interface: `ApartmentDAO`
    Get objects using direct search algorithms from respective table by relevance.
    Include tag functionality to regulate relevancy and result set
    Specified by:
      `searchApartments` in interface `ApartmentDAO`
    Parameters:
      `con` - connection to database
      `value` - user value
    Returns:
      ArrayList result array