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.
  • 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