Class HibernateGroupDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Group>
com.logicaldoc.core.security.user.HibernateGroupDAO
- All Implemented Interfaces:
- PersistentObjectDAO<Group>,- GroupDAO
@Repository("groupDAO")
@Transactional
public class HibernateGroupDAO
extends HibernatePersistentObjectDAO<Group>
implements GroupDAO
Hibernate implementation of 
GroupDAO- Since:
- 3.0
- Author:
- Alessandro Gasparini - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionintcount()Counts the total number of groupsvoiddelete(long groupId, int code) This method deletes an entity and you can give a deletion codebooleanfindAllGroupNames(long tenantId) This method selects all group namesfindByLikeName(String name, long tenantId) This method finds a Group by name.findByName(String name, long tenantId) Finds a group by name.voidfixGuestPermissions(Group group) If the user is guest, we remove not admitted permissionsvoidinheritACLs(Group group, long parentGroupId) This method replicates all ACLs of the parent group to another group.voidinitialize(Group group) Doesn't do anything by defaultvoidThis method persists a new group object.voidsetMenuDAO(MenuDAO menuDAO) voidThis method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, setSessionFactoryMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString
- 
Method Details- 
getMenuDAO
- 
deleteDescription copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
- deletein interface- PersistentObjectDAO<Group>
- Overrides:
- deletein class- HibernatePersistentObjectDAO<Group>
- Parameters:
- groupId- ID of the entity which should be deleted
- code- Deletion code
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
exists- Throws:
- PersistenceException
 
- 
findAllGroupNamesDescription copied from interface:GroupDAOThis method selects all group names- Specified by:
- findAllGroupNamesin interface- GroupDAO
- Parameters:
- tenantId- identifier of the tenant
- Returns:
- collection of all the group names
- Throws:
- PersistenceException- Error in the database
 
- 
findByNameDescription copied from interface:GroupDAOFinds a group by name.- Specified by:
- findByNamein interface- GroupDAO
- Parameters:
- name- name of wanted group.
- tenantId- ID of the owning tenant
- Returns:
- Wanted group or null.
- Throws:
- PersistenceException- Error in the database
 
- 
insertDescription copied from interface:GroupDAOThis method persists a new group object. All permissions and extended attributes of the parent group will be replicated.- Specified by:
- insertin interface- GroupDAO
- Parameters:
- group- Group which should be stored in a database.
- parentGroupId- ID of the group this group inherits ACLs from
- Throws:
- PersistenceException- Error in the database
 
- 
inheritACLsDescription copied from interface:GroupDAOThis method replicates all ACLs of the parent group to another group.Attention: The group(groupId) ACLs will be discarded. - Specified by:
- inheritACLsin interface- GroupDAO
- Parameters:
- group- The group to be altered.
- parentGroupId- The group whose ACLs will be inherited.
- Throws:
- PersistenceException- Error in the database
 
- 
findByLikeNameDescription copied from interface:GroupDAOThis method finds a Group by name.- Specified by:
- findByLikeNamein interface- GroupDAO
- Parameters:
- name- The name of wanted Group.
- tenantId- ID of the owning tenant
- Returns:
- Collection of selected groups.
- Throws:
- PersistenceException- Error in the database
 
- 
countDescription copied from interface:GroupDAOCounts the total number of groups- Specified by:
- countin interface- GroupDAO
- Returns:
- total number of groups
- Throws:
- PersistenceException- Error in the database
 
- 
initializeDescription copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
- initializein interface- GroupDAO
- Specified by:
- initializein interface- PersistentObjectDAO<Group>
- Overrides:
- initializein class- HibernatePersistentObjectDAO<Group>
- Parameters:
- group- The entity to be initialised
 
- 
storeDescription copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
- storein interface- PersistentObjectDAO<Group>
- Overrides:
- storein class- HibernatePersistentObjectDAO<Group>
- Parameters:
- group- entity to be stored
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
fixGuestPermissionsIf the user is guest, we remove not admitted permissions- Specified by:
- fixGuestPermissionsin interface- GroupDAO
- Throws:
- PersistenceException- Error in the DB
- NumberFormatException
 
 
-