Package com.logicaldoc.core.metadata
Class HibernateAttributeSetDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<AttributeSet>
com.logicaldoc.core.metadata.HibernateAttributeSetDAO
- All Implemented Interfaces:
AttributeSetDAO,PersistentObjectDAO<AttributeSet>
public class HibernateAttributeSetDAO
extends HibernatePersistentObjectDAO<AttributeSet>
implements AttributeSetDAO
Hibernate implementation of
TemplateDAO- Since:
- 7.5.0
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long id, int code) This method deletes an entity and you can give a deletion codefindAll()Finds all entities in the databasefindAll(long tenantId) Finds all entities in a specific tenant.findAttributes(long tenantId, Long setId) Returns a TreeMap so the key set is alphabetically orderedfindByName(String name, long tenantId) This method finds a attribute set by namefindByType(int type, long tenantId) This method finds a attribute set by typeload(long tenantId) Retrieves all the attribute sets in a tenantvoidsetOptionsDao(AttributeOptionDAO optionsDao) voidsetTemplateDao(TemplateDAO templateDao) voidstore(AttributeSet set) This method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactoryMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Constructor Details
-
HibernateAttributeSetDAO
public HibernateAttributeSetDAO()
-
-
Method Details
-
findAll
Description copied from interface:PersistentObjectDAOFinds all entities in the database- Specified by:
findAllin interfacePersistentObjectDAO<AttributeSet>- Overrides:
findAllin classHibernatePersistentObjectDAO<AttributeSet>- Returns:
- The list of all entities
-
findAll
Description copied from interface:PersistentObjectDAOFinds all entities in a specific tenant.- Specified by:
findAllin interfacePersistentObjectDAO<AttributeSet>- Overrides:
findAllin classHibernatePersistentObjectDAO<AttributeSet>- Parameters:
tenantId- Identifier of the tenant to search in- Returns:
- The list of all entities
-
findByName
Description copied from interface:AttributeSetDAOThis method finds a attribute set by name- Specified by:
findByNamein interfaceAttributeSetDAO- Parameters:
name- Name of the attribute settenantId- ID of the owning tenant- Returns:
- AttributeSet with given name
-
delete
Description copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
deletein interfacePersistentObjectDAO<AttributeSet>- Overrides:
deletein classHibernatePersistentObjectDAO<AttributeSet>- Parameters:
id- ID of the entity which should be deletedcode- Deletion code- Throws:
PersistenceException- raised in case of errors in the database
-
findByType
Description copied from interface:AttributeSetDAOThis method finds a attribute set by type- Specified by:
findByTypein interfaceAttributeSetDAO- Parameters:
type- Type of the attribute settenantId- ID of the owning tenant- Returns:
- AttributeSet with given type
-
setOptionsDao
-
store
Description copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
storein interfacePersistentObjectDAO<AttributeSet>- Overrides:
storein classHibernatePersistentObjectDAO<AttributeSet>- Parameters:
set- entity to be stored- Throws:
PersistenceException- raised in case of errors in the database
-
setTemplateDao
-
load
Description copied from interface:AttributeSetDAORetrieves all the attribute sets in a tenant- Specified by:
loadin interfaceAttributeSetDAO- Parameters:
tenantId- The tenant- Returns:
- Map ID-AttributeSet
-
findAttributes
Returns a TreeMap so the key set is alphabetically ordered- Specified by:
findAttributesin interfaceAttributeSetDAO- Parameters:
tenantId- The tenant IDsetId- Optional set ID- Returns:
- map of attributes
-