Package com.openmeet.shared.data.ban

# Class BanDAO

java.lang.Object
com.openmeet.shared.data.storage.SQLDAO
com.openmeet.shared.data.ban.BanDAO

All Implemented Interfaces:
  `DAO<Ban>`

public class BanDAO extends SQLDAO implements DAO<Ban>

- ## Field Summary

  ### Fields inherited from class com.openmeet.shared.data.storage.SQLDAO

  `source`

  ### Fields inherited from interface com.openmeet.shared.data.storage.DAO

  `DO_DELETE, DO_RETRIEVE_ALL, DO_RETRIEVE_ALL_LIMIT, DO_RETRIEVE_ALL_LIMIT_OFFSET, DO_RETRIEVE_BY_CONDITION, DO_RETRIEVE_BY_CONDITION_LIMIT, DO_RETRIEVE_BY_CONDITION_LIMIT_OFFSET, DO_RETRIEVE_BY_KEY, DO_SAVE, DO_SAVE_OR_UPDATE, DO_SAVE_PARTIAL, DO_UPDATE, logger`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BanDAO(DataSource source)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `doDelete(String condition)`
  Deletes objects from the database that match a given condition.
  `List<Ban>`
  `doRetrieveAll()`
  Returns a list of all objects from the database.
  `List<Ban>`
  `doRetrieveAll(int row_count)`
  Returns a list of objects from the database, limiting the result set to the specified number of rows.
  `List<Ban>`
  `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<Ban>`
  `doRetrieveByCondition(String condition)`
  Returns a list of objects from the database that match a given condition.
  `List<Ban>`
  `doRetrieveByCondition(String condition, int row_count)`
  Returns a list of objects from the database that match a given condition.
  `List<Ban>`
  `doRetrieveByCondition(String condition, int offset, int row_count)`
  Returns a list of objects from the database that match a given condition.
  `Ban`
  `doRetrieveByKey(String key)`
  Returns an object from the database that match a given key.
  `boolean`
  `doSave(Ban obj)`
  Saves an object in the database.
  `boolean`
  `doSave(HashMap<String,?> values)`
  Saves an object in the database populating only the fields contained in values.
  `boolean`
  `doSaveOrUpdate(Ban 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

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

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

- ## Constructor Details

  - ### BanDAO

    public BanDAO(DataSource source)

- ## Method Details

  - ### doRetrieveByCondition

    public List<Ban> doRetrieveByCondition(String condition) throws SQLException
    Description copied from interface: `DAO`
    Returns a list of objects from the database that match a given condition.
    Specified by:
      `doRetrieveByCondition` in interface `DAO<Ban>`
    Parameters:
      `condition` - the condition to be matched.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveByCondition

    public List<Ban> doRetrieveByCondition(String condition, int row_count) throws SQLException
    Description copied from interface: `DAO`
    Returns a list of objects from the database that match a given condition.
    Specified by:
      `doRetrieveByCondition` in interface `DAO<Ban>`
    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

    public List<Ban> doRetrieveByCondition(String condition, int offset, int row_count) throws SQLException
    Description copied from interface: `DAO`
    Returns a list of objects from the database that match a given condition.
    Specified by:
      `doRetrieveByCondition` in interface `DAO<Ban>`
    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

    public Ban doRetrieveByKey(String key) throws SQLException, InvalidPrimaryKeyException
    Description copied from interface: `DAO`
    Returns an object from the database that match a given key.
    Specified by:
      `doRetrieveByKey` in interface `DAO<Ban>`
    Parameters:
      `key` - the primary key of the object to be retrieved.
    Returns:
      the query result as a single object
    Throws:
      `SQLException`
      `InvalidPrimaryKeyException`

  - ### doRetrieveAll

    public List<Ban> doRetrieveAll() throws SQLException
    Description copied from interface: `DAO`
    Returns a list of all objects from the database.
    Specified by:
      `doRetrieveAll` in interface `DAO<Ban>`
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveAll

    public List<Ban> doRetrieveAll(int row_count) throws SQLException
    Description copied from interface: `DAO`
    Returns a list of objects from the database, limiting the result set to the specified number of rows.
    Specified by:
      `doRetrieveAll` in interface `DAO<Ban>`
    Parameters:
      `row_count` - the number of rows to be returned.
    Returns:
      the query results as a list of objects.
    Throws:
      `SQLException`

  - ### doRetrieveAll

    public List<Ban> doRetrieveAll(int offset, int row_count) throws SQLException
    Description copied from interface: `DAO`
    Returns a list of objects from the database, starting at a specified offset and limiting the result set to the specified number of rows.
    Specified by:
      `doRetrieveAll` in interface `DAO<Ban>`
    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

    public boolean doSave(Ban obj) throws SQLException
    Description copied from interface: `DAO`
    Saves an object in the database.
    Specified by:
      `doSave` in interface `DAO<Ban>`
    Parameters:
      `obj` - the object to be saved.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`

  - ### doSave

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

  - ### doUpdate

    public boolean doUpdate(HashMap<String,?> values, String condition) throws SQLException
    Description copied from interface: `DAO`
    Updates database objects that match a given condition, using only the values contained in the HashMap
    Specified by:
      `doUpdate` in interface `DAO<Ban>`
    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

    public boolean doSaveOrUpdate(Ban obj) throws SQLException
    Description copied from interface: `DAO`
    Saves an object to the database if it does not already exist, or updates it if it does.
    Specified by:
      `doSaveOrUpdate` in interface `DAO<Ban>`
    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

    public boolean doDelete(String condition) throws SQLException
    Description copied from interface: `DAO`
    Deletes objects from the database that match a given condition.
    Specified by:
      `doDelete` in interface `DAO<Ban>`
    Parameters:
      `condition` - the condition to be matched.
    Returns:
      a boolean value that indicates if the operation was successful or not.
    Throws:
      `SQLException`