Class InterestDAO

java.lang.Object
com.openmeet.shared.data.storage.SQLDAO
com.openmeet.shared.data.interest.InterestDAO
All Implemented Interfaces:
DAO<Interest>

public class InterestDAO extends SQLDAO implements DAO<Interest>
  • Constructor Details

    • InterestDAO

      public InterestDAO(DataSource source)
  • Method Details

    • doRetrieveByCondition

      public List<Interest> 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<Interest>
      Parameters:
      condition - the condition to be matched.
      Returns:
      the query results as a list of objects.
      Throws:
      SQLException
    • doRetrieveByCondition

      public List<Interest> 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<Interest>
      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<Interest> 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<Interest>
      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 Interest 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<Interest>
      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<Interest> doRetrieveAll() throws SQLException
      Description copied from interface: DAO
      Returns a list of all objects from the database.
      Specified by:
      doRetrieveAll in interface DAO<Interest>
      Returns:
      the query results as a list of objects.
      Throws:
      SQLException
    • doRetrieveAll

      public List<Interest> 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<Interest>
      Parameters:
      row_count - the number of rows to be returned.
      Returns:
      the query results as a list of objects.
      Throws:
      SQLException
    • doRetrieveAll

      public List<Interest> 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<Interest>
      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(Interest obj) throws SQLException
      Description copied from interface: DAO
      Saves an object in the database.
      Specified by:
      doSave in interface DAO<Interest>
      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<Interest>
      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<Interest>
      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(Interest 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<Interest>
      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<Interest>
      Parameters:
      condition - the condition to be matched.
      Returns:
      a boolean value that indicates if the operation was successful or not.
      Throws:
      SQLException