Package com.logicaldoc.core.security.dao
Class HibernateGroupDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Group>
com.logicaldoc.core.security.dao.HibernateGroupDAO
- All Implemented Interfaces:
PersistentObjectDAO<Group>,GroupDAO
- Since:
- 3.0
- Author:
- Alessandro Gasparini - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier 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 defaultbooleanThis method persists a new group object.voidsetMenuDAO(MenuDAO menuDAO) voidThis 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, 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, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Method Details
-
getMenuDAO
-
setMenuDAO
-
delete
Description copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
deletein interfacePersistentObjectDAO<Group>- Overrides:
deletein classHibernatePersistentObjectDAO<Group>- Parameters:
groupId- ID of the entity which should be deletedcode- Deletion code- Throws:
PersistenceException- raised in case of errors in the database
-
exists
-
findAllGroupNames
Description copied from interface:GroupDAOThis method selects all group names- Specified by:
findAllGroupNamesin interfaceGroupDAO- Parameters:
tenantId- identifier of the tenant- Returns:
- collection of all the group names
-
findByName
Description copied from interface:GroupDAOFinds a group by name.- Specified by:
findByNamein interfaceGroupDAO- Parameters:
name- name of wanted group.tenantId- ID of the owning tenant- Returns:
- Wanted group or null.
-
insert
Description copied from interface:GroupDAOThis method persists a new group object. All permissions and extended attributes of the parent group will be replicated. -
inheritACLs
Description 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 interfaceGroupDAO- Parameters:
group- The group to be altered.parentGroupId- The group whose ACLs will be inherited.
-
findByLikeName
Description copied from interface:GroupDAOThis method finds a Group by name.- Specified by:
findByLikeNamein interfaceGroupDAO- Parameters:
name- The name of wanted Group.tenantId- ID of the owning tenant- Returns:
- Collection of selected groups.
-
count
public int count()Description copied from interface:GroupDAOCounts the total number of groups -
initialize
Description copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
initializein interfaceGroupDAO- Specified by:
initializein interfacePersistentObjectDAO<Group>- Overrides:
initializein classHibernatePersistentObjectDAO<Group>- Parameters:
group- The entity to be initialised
-
store
Description copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
storein interfacePersistentObjectDAO<Group>- Overrides:
storein classHibernatePersistentObjectDAO<Group>- Parameters:
group- entity to be stored- Throws:
PersistenceException- raised in case of errors in the database
-
fixGuestPermissions
If the user is guest, we remove not admitted permissions- Specified by:
fixGuestPermissionsin interfaceGroupDAO
-