Class InterestDAO
java.lang.Object
com.openmeet.shared.data.storage.SQLDAO
com.openmeet.shared.data.interest.InterestDAO
-
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeletes objects from the database that match a given condition.Returns a list of all objects from the database.doRetrieveAll(int row_count) Returns a list of objects from the database, limiting the result set to the specified number of rows.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.doRetrieveByCondition(String condition) Returns a list of objects from the database that match a given condition.doRetrieveByCondition(String condition, int row_count) Returns a list of objects from the database that match a given condition.doRetrieveByCondition(String condition, int offset, int row_count) Returns a list of objects from the database that match a given condition.doRetrieveByKey(String key) Returns an object from the database that match a given key.booleanSaves an object in the database.booleanSaves an object in the database populating only the fields contained in values.booleandoSaveOrUpdate(Interest obj) Saves an object to the database if it does not already exist, or updates it if it does.booleanUpdates database objects that match a given condition, using only the values contained in the HashMap
-
Constructor Details
-
InterestDAO
-
-
Method Details
-
doRetrieveByCondition
Description copied from interface:DAOReturns a list of objects from the database that match a given condition.- Specified by:
doRetrieveByConditionin interfaceDAO<Interest>- Parameters:
condition- the condition to be matched.- Returns:
- the query results as a list of objects.
- Throws:
SQLException
-
doRetrieveByCondition
Description copied from interface:DAOReturns a list of objects from the database that match a given condition.- Specified by:
doRetrieveByConditionin interfaceDAO<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:DAOReturns a list of objects from the database that match a given condition.- Specified by:
doRetrieveByConditionin interfaceDAO<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
Description copied from interface:DAOReturns an object from the database that match a given key.- Specified by:
doRetrieveByKeyin interfaceDAO<Interest>- Parameters:
key- the primary key of the object to be retrieved.- Returns:
- the query result as a single object
- Throws:
SQLExceptionInvalidPrimaryKeyException
-
doRetrieveAll
Description copied from interface:DAOReturns a list of all objects from the database.- Specified by:
doRetrieveAllin interfaceDAO<Interest>- Returns:
- the query results as a list of objects.
- Throws:
SQLException
-
doRetrieveAll
Description copied from interface:DAOReturns a list of objects from the database, limiting the result set to the specified number of rows.- Specified by:
doRetrieveAllin interfaceDAO<Interest>- Parameters:
row_count- the number of rows to be returned.- Returns:
- the query results as a list of objects.
- Throws:
SQLException
-
doRetrieveAll
Description copied from interface:DAOReturns 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:
doRetrieveAllin interfaceDAO<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
Description copied from interface:DAOSaves an object in the database populating only the fields contained in values.- Specified by:
doSavein interfaceDAO<Interest>- Parameters:
values- the values to be updated.- Returns:
- a boolean value that indicates if the operation was successful or not.
- Throws:
SQLException
-
doUpdate
Description copied from interface:DAOUpdates database objects that match a given condition, using only the values contained in the HashMap- Specified by:
doUpdatein interfaceDAO<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
-
doDelete
Description copied from interface:DAODeletes objects from the database that match a given condition.- Specified by:
doDeletein interfaceDAO<Interest>- Parameters:
condition- the condition to be matched.- Returns:
- a boolean value that indicates if the operation was successful or not.
- Throws:
SQLException
-