Class HibernateSearchDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<SavedSearch>
com.logicaldoc.core.searchengine.saved.HibernateSearchDAO
- All Implemented Interfaces:
PersistentObjectDAO<SavedSearch>
,SearchDAO
public class HibernateSearchDAO
extends HibernatePersistentObjectDAO<SavedSearch>
implements SearchDAO
Hibernate implementation of
SearchDAO
- Since:
- 8.6.1
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long id, int code) This method deletes an entity and you can give a deletion codefindByUserId
(long userId) Gets all the searches of a given user ordered by name ascfindByUserIdAndName
(long userId, String name) Gets the search using the alternate keyvoid
store
(SavedSearch search) This method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactory
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Method Details
-
findByUserId
Description copied from interface:SearchDAO
Gets all the searches of a given user ordered by name asc- Specified by:
findByUserId
in interfaceSearchDAO
- Parameters:
userId
- Identifier of the user- Returns:
- orderer list of searches
- Throws:
PersistenceException
- Error in the database
-
findByUserIdAndName
Description copied from interface:SearchDAO
Gets the search using the alternate key- Specified by:
findByUserIdAndName
in interfaceSearchDAO
- Parameters:
userId
- Identifier of the username
- The name of the search- Returns:
- the found search gridRecord, if any
- Throws:
PersistenceException
- Error in the database
-
delete
Description copied from interface:PersistentObjectDAO
This method deletes an entity and you can give a deletion code- Specified by:
delete
in interfacePersistentObjectDAO<SavedSearch>
- Overrides:
delete
in classHibernatePersistentObjectDAO<SavedSearch>
- Parameters:
id
- ID of the entity which should be deletedcode
- Deletion code- Throws:
PersistenceException
- raised in case of errors in the database
-
store
Description copied from interface:PersistentObjectDAO
This method persists the entity object- Specified by:
store
in interfacePersistentObjectDAO<SavedSearch>
- Overrides:
store
in classHibernatePersistentObjectDAO<SavedSearch>
- Parameters:
search
- entity to be stored- Throws:
PersistenceException
- raised in case of errors in the database
-