Package com.openmeet.shared.data.storage

# Interface DAO<T>

All Known Implementing Classes:
  `BanDAO`, `ImageDAO`, `InterestDAO`, `Meeter_InterestDAO`, `MeeterDAO`, `MessageDAO`, `RatingDAO`, `ReportDAO`

public interface DAO<T>
It contains all the methods that should be implemented by the DAOs.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DO_DELETE`
  `static final String`
  `DO_RETRIEVE_ALL`
  `static final String`
  `DO_RETRIEVE_ALL_LIMIT`
  `static final String`
  `DO_RETRIEVE_ALL_LIMIT_OFFSET`
  `static final String`
  `DO_RETRIEVE_BY_CONDITION`
  `static final String`
  `DO_RETRIEVE_BY_CONDITION_LIMIT`
  `static final String`
  `DO_RETRIEVE_BY_CONDITION_LIMIT_OFFSET`
  `static final String`
  `DO_RETRIEVE_BY_KEY`
  `static final String`
  `DO_SAVE`
  `static final String`
  `DO_SAVE_OR_UPDATE`
  `static final String`
  `DO_SAVE_PARTIAL`
  `static final String`
  `DO_UPDATE`
  `static final Logger`
  `logger`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `doDelete(String condition)`
  Deletes objects from the database that match a given condition.
  `List<T>`
  `doRetrieveAll()`
  Returns a list of all objects from the database.
  `List<T>`
  `doRetrieveAll(int row_count)`
  Returns a list of objects from the database, limiting the result set to the specified number of rows.
  `List<T>`
  `doRetrieveAll(int offset, int row_count)`
  Returns a list of objects from the database, starting at a specified offset and limiting the result set to the specified number of rows.
  `List<T>`
  `doRetrieveByCondition(String condition)`
  Returns a list of objects from the database that match a given condition.
  `List<T>`
  `doRetrieveByCondition(String condition, int row_count)`
  Returns a list of objects from the database that match a given condition.
  `List<T>`
  `doRetrieveByCondition(String condition, int offset, int row_count)`
  Returns a list of objects from the database that match a given condition.
  `T`
  `doRetrieveByKey(String key)`
  Returns an object from the database that match a given key.
  `boolean`
  `doSave(HashMap<String,?> values)`
  Saves an object in the database populating only the fields contained in values.
  `boolean`
  `doSave(T obj)`
  Saves an object in the database.
  `boolean`
  `doSaveOrUpdate(T obj)`
  Saves an object to the database if it does not already exist, or updates it if it does.
  `boolean`
  `doUpdate(HashMap<String,?> values, String condition)`
  Updates database objects that match a given condition, using only the values contained in the HashMap

- ## Field Details

  - ### DO_RETRIEVE_BY_CONDITION

    static final String DO_RETRIEVE_BY_CONDITION
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_BY_CONDITION_LIMIT

    static final String DO_RETRIEVE_BY_CONDITION_LIMIT
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_BY_CONDITION_LIMIT_OFFSET

    static final String DO_RETRIEVE_BY_CONDITION_LIMIT_OFFSET
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_BY_KEY

    static final String DO_RETRIEVE_BY_KEY
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_ALL

    static final String DO_RETRIEVE_ALL
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_ALL_LIMIT

    static final String DO_RETRIEVE_ALL_LIMIT
    See Also:
      - Constant Field Values

  - ### DO_RETRIEVE_ALL_LIMIT_OFFSET

    static final String DO_RETRIEVE_ALL_LIMIT_OFFSET
    See Also:
      - Constant Field Values

  - ### DO_SAVE

    static final String DO_SAVE
    See Also:
      - Constant Field Values

  - ### DO_SAVE_PARTIAL

    static final String DO_SAVE_PARTIAL
    See Also:
      - Constant Field Values

  - ### DO_UPDATE

    static final String DO_UPDATE
    See Also:
      - Constant Field Values

  - ### DO_SAVE_OR_UPDATE

    static final String DO_SAVE_OR_UPDATE
    See Also:
      - Constant Field Values

  - ### DO_DELETE

    static final String DO_DELETE
    See Also:
      - Constant Field Values

  - ### logger

    static final Logger logger

- ## Method Details

  - ### doRetrieveByCondition

    List<T> doRetrieveByCondition(String condition) throws SQLException
    Returns a list of objects from the database that match a given condition.
    Parameters:
      `condition` - the condition to be matched.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveByCondition

    List<T> doRetrieveByCondition(String condition, int row_count) throws SQLException
    Returns a list of objects from the database that match a given condition.
    Parameters:
      `condition` - the condition to be matched.
      `row_count` - the number of rows to return.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveByCondition

    List<T> doRetrieveByCondition(String condition, int offset, int row_count) throws SQLException
    Returns a list of objects from the database that match a given condition.
    Parameters:
      `condition` - the condition to be matched.
      `offset` - the offset position.
      `row_count` - the number of rows to return.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveByKey

    T doRetrieveByKey(String key) throws SQLException, InvalidPrimaryKeyException
    Returns an object from the database that match a given key.
    Parameters:
      `key` - the primary key of the object to be retrieved.
    Returns:
      the query result as a single object
    Throws:
      `SQLException`
      `InvalidPrimaryKeyException`

  - ### doRetrieveAll

    List<T> doRetrieveAll() throws SQLException
    Returns a list of all objects from the database.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveAll

    List<T> doRetrieveAll(int row_count) throws SQLException
    Returns a list of objects from the database, limiting the result set to the specified number of rows.
    Parameters:
      `row_count` - the number of rows to be returned.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveAll

    List<T> doRetrieveAll(int offset, int row_count) throws SQLException
    Returns a list of objects from the database, starting at a specified offset and limiting the result set to the specified number of rows.
    Parameters:
      `offset` - the offset to start the query from.
      `row_count` - the number of rows to be returned.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doSave

    boolean doSave(T obj) throws SQLException
    Saves an object in the database.
    Parameters:
      `obj` - the object to be saved.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`

  - ### doSave

    boolean doSave(HashMap<String,?> values) throws SQLException
    Saves an object in the database populating only the fields contained in values.
    Parameters:
      `values` - the values to be updated.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`

  - ### doUpdate

    boolean doUpdate(HashMap<String,?> values, String condition) throws SQLException
    Updates database objects that match a given condition, using only the values contained in the HashMap
    Parameters:
      `values` - the values to be updated.
      `condition` - the condition to be matched.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`

  - ### doSaveOrUpdate

    boolean doSaveOrUpdate(T obj) throws SQLException
    Saves an object to the database if it does not already exist, or updates it if it does.
    Parameters:
      `obj` - the object to be saved or updated.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`

  - ### doDelete

    boolean doDelete(String condition) throws SQLException
    Deletes objects from the database that match a given condition.
    Parameters:
      `condition` - the condition to be matched.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`