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
 
 public class HibernateGroupDAO extends HibernatePersistentObjectDAO<Group> implements GroupDAO - Since:
- 3.0
- Author:
- Alessandro Gasparini - LogicalDOC
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcount()Counts the total number of groupsbooleandelete(long groupId, int code)This method deletes an entity and you can give a deletion codebooleanexists(String groupname, long tenantId)Collection<String>findAllGroupNames(long tenantId)This method selects all group namesCollection<Group>findByLikeName(String name, long tenantId)This method finds a Group by name.GroupfindByName(String name, long tenantId)Finds a group by name.voidfixGuestPermissions(Group group)If the user is guest, we remove not admitted permissionsMenuDAOgetMenuDAO()voidinheritACLs(Group group, long parentGroupId)This method replicates all ACLs of the parent group to another group.voidinitialize(Group group)Doesn't do anything by defaultbooleaninsert(Group group, long parentGroupId)This method persists a new group object.voidsetMenuDAO(MenuDAO menuDAO)booleanstore(Group group)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- 
getMenuDAOpublic MenuDAO getMenuDAO() 
 - 
setMenuDAOpublic void setMenuDAO(MenuDAO menuDAO) 
 - 
deletepublic boolean delete(long groupId, int code)Description 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
- Returns:
- if the record has been successfully deleted
 
 - 
existspublic boolean exists(String groupname, long tenantId) 
 - 
findAllGroupNamespublic Collection<String> findAllGroupNames(long tenantId) Description 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
 
 - 
findByNamepublic Group findByName(String name, long tenantId) Description 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.
 
 - 
insertpublic boolean insert(Group group, long parentGroupId) Description copied from interface:GroupDAOThis method persists a new group object. All permissions and extended attributes of the parent group will be replicated.
 - 
inheritACLspublic void inheritACLs(Group group, long parentGroupId) 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 interface- GroupDAO
- Parameters:
- group- The group to be altered.
- parentGroupId- The group whose ACLs will be inherited.
 
 - 
findByLikeNamepublic Collection<Group> findByLikeName(String name, long tenantId) Description 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.
 
 - 
countpublic int count() Description copied from interface:GroupDAOCounts the total number of groups
 - 
initializepublic void initialize(Group group) Description 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
 
 - 
storepublic boolean store(Group group) throws PersistenceException Description 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
- Returns:
- True if successfully stored in a database
- Throws:
- PersistenceException- raised in case of errors in the database
 
 - 
fixGuestPermissionspublic void fixGuestPermissions(Group group) If the user is guest, we remove not admitted permissions- Specified by:
- fixGuestPermissionsin interface- GroupDAO
 
 
- 
 
-