Package com.rosivanyshyn.db.dao

# Interface ResponseToOrderDAO

All Superinterfaces:
  `GenericDAO<ResponseToOrder>`

All Known Implementing Classes:
  `ResponseToOrderDAOImpl`

public interface ResponseToOrderDAO extends GenericDAO<ResponseToOrder>
Response To Order DAO interface.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `deleteResponseApartments(Connection con, Long id)`
  Delete all attached to response-to-order(RTO) apartments by RTO id.
  `ArrayList<Apartment>`
  `getResponseApartments(Connection con, Long id)`
  Get all attached to response-to-order(RTO) apartments by RTO id.
  `boolean`
  `setApartmentToResponse(Connection con, ResponseToOrder rto, Apartment apartment)`
  Set(attach) apartment to response-to-order(RTO).

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

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

- ## Method Details

  - ### setApartmentToResponse

    boolean setApartmentToResponse(Connection con, ResponseToOrder rto, Apartment apartment)
    Set(attach) apartment to response-to-order(RTO).
    Create new reference to the apartment in the RTO
    Parameters:
      `con` - connection to database
      `rto` - response to order
      `apartment` - apartment to set to response
    Returns:
      Boolean operation result

  - ### getResponseApartments

    ArrayList<Apartment> getResponseApartments(Connection con, Long id)
    Get all attached to response-to-order(RTO) apartments by RTO id.
    Parameters:
      `con` - connection to database
      `id` - response to order id
    Returns:
      ArrayList of attached apartments

  - ### deleteResponseApartments

    boolean deleteResponseApartments(Connection con, Long id)
    Delete all attached to response-to-order(RTO) apartments by RTO id.
    Delete only references to apartments
    Parameters:
      `con` - connection to database
      `id` - response to order id
    Returns:
      Boolean operation result