Package com.logicaldoc.core.generic
Class HibernateGenericDAO
- java.lang.Object
- 
- com.logicaldoc.core.HibernatePersistentObjectDAO<Generic>
- 
- com.logicaldoc.core.generic.HibernateGenericDAO
 
 
- 
- All Implemented Interfaces:
- GenericDAO,- PersistentObjectDAO<Generic>
 
 public class HibernateGenericDAO extends HibernatePersistentObjectDAO<Generic> implements GenericDAO Hibernate implementation ofGenericDAO- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
 
- 
- 
Constructor SummaryConstructors Constructor Description HibernateGenericDAO()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete(long genericId, int code)This method deletes an entity and you can give a deletion codeGenericfindByAlternateKey(String type, String subtype, Long qualifier, long tenantId)Finds a Generic by it's alternate keyList<Generic>findByTypeAndSubtype(String type, String subtype, Long qualifier, Long tenantId)Finds a Generic by it's alternate key.voidinitialize(Generic generic)Doesn't do anything by defaultbooleanstore(Generic entity)This method persists the entity object- 
Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory
 - 
Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString
 
- 
 
- 
- 
- 
Method Detail- 
deletepublic boolean delete(long genericId, int code) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
- deletein interface- PersistentObjectDAO<Generic>
- Overrides:
- deletein class- HibernatePersistentObjectDAO<Generic>
- Parameters:
- genericId- ID of the entity which should be deleted
- code- Deletion code
- Returns:
- if the record has been successfully deleted
- Throws:
- PersistenceException- raised in case of errors in the database
 
 - 
findByAlternateKeypublic Generic findByAlternateKey(String type, String subtype, Long qualifier, long tenantId) Description copied from interface:GenericDAOFinds a Generic by it's alternate key- Specified by:
- findByAlternateKeyin interface- GenericDAO
- Parameters:
- type- The type(you can use like jollies and can be null)
- subtype- The sub-type(you can use like jollies and can be null)
- qualifier- the qualifier, can be null
- tenantId- ID of the owning tenant
- Returns:
- Wanted generic or null
 
 - 
findByTypeAndSubtypepublic List<Generic> findByTypeAndSubtype(String type, String subtype, Long qualifier, Long tenantId) Description copied from interface:GenericDAOFinds a Generic by it's alternate key. The search uses the like operator and each parameter can be null.- Specified by:
- findByTypeAndSubtypein interface- GenericDAO
- Parameters:
- type- The type(you can use like jollies and can be null)
- subtype- The sub-type(you can use like jollies and can be null)
- qualifier- the qualifier, can be null
- tenantId- ID of the owning tenant (optional)
- Returns:
- The collection of found Generics
 
 - 
initializepublic void initialize(Generic generic) Description copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
- initializein interface- PersistentObjectDAO<Generic>
- Overrides:
- initializein class- HibernatePersistentObjectDAO<Generic>
- Parameters:
- generic- The entity to be initialised
 
 - 
storepublic boolean store(Generic entity) throws PersistenceException Description copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
- storein interface- PersistentObjectDAO<Generic>
- Overrides:
- storein class- HibernatePersistentObjectDAO<Generic>
- Parameters:
- entity- entity to be stored
- Returns:
- True if successfully stored in a database
- Throws:
- PersistenceException- raised in case of errors in the database
 
 
- 
 
-