Class UserAdministrationGrantGroupDaoHibernate
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.StatelessDao
com.atlassian.crowd.util.persistence.hibernate.HibernateDao<UserAdministrationGrantToGroup>
com.atlassian.crowd.dao.permission.UserAdministrationGrantGroupDaoHibernate
- All Implemented Interfaces:
UserAdministrationGrantGroupDao
public class UserAdministrationGrantGroupDaoHibernate
extends HibernateDao<UserAdministrationGrantToGroup>
implements UserAdministrationGrantGroupDao
-
Field Summary
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
sessionFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new group administration grant for a userfindAll()
findGrantsToGroup
(InternalGroup targetGroup) Looks for administration grants for a given groupfindUserGrantForGroup
(InternalUser internalUser, InternalGroup internalGroup) Checks if an user has a grant to a groupfindUserGrants
(InternalUser internalUser) Looks for all administration grants a user hasAll subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.void
remove
(InternalUser user, InternalGroup targetGroup) Remove administration grant for a user to a groupMethods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, findAllInternal, findByProperties, findByPropertiesOptional, findByProperty, findByProperty, findByPropertyOptional, findByPropertyOrThrow, getCountByProperties, load, load, loadOptional, loadReference, loadReference, remove, removeByIdIfPresent, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, toPredicates, update
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
setSessionFactory, withStatelessSession
-
Constructor Details
-
UserAdministrationGrantGroupDaoHibernate
public UserAdministrationGrantGroupDaoHibernate()
-
-
Method Details
-
add
Description copied from interface:UserAdministrationGrantGroupDao
Adds a new group administration grant for a user- Specified by:
add
in interfaceUserAdministrationGrantGroupDao
- Parameters:
grant
- the grant- Returns:
- the newly persisted grant
-
findGrantsToGroup
Description copied from interface:UserAdministrationGrantGroupDao
Looks for administration grants for a given group- Specified by:
findGrantsToGroup
in interfaceUserAdministrationGrantGroupDao
- Parameters:
targetGroup
- the group- Returns:
- Grants found for this group
-
remove
Description copied from interface:UserAdministrationGrantGroupDao
Remove administration grant for a user to a group- Specified by:
remove
in interfaceUserAdministrationGrantGroupDao
- Parameters:
user
- the user who will lose the granttargetGroup
- the group to which grant will be removed
-
findUserGrants
Description copied from interface:UserAdministrationGrantGroupDao
Looks for all administration grants a user has- Specified by:
findUserGrants
in interfaceUserAdministrationGrantGroupDao
- Returns:
- found grants
-
findUserGrantForGroup
public Optional<UserAdministrationGrantToGroup> findUserGrantForGroup(InternalUser internalUser, InternalGroup internalGroup) Description copied from interface:UserAdministrationGrantGroupDao
Checks if an user has a grant to a group- Specified by:
findUserGrantForGroup
in interfaceUserAdministrationGrantGroupDao
- Parameters:
internalUser
- the userinternalGroup
- the group- Returns:
- a mapping, if found any
-
findAll
- Specified by:
findAll
in interfaceUserAdministrationGrantGroupDao
- Returns:
- all the group administration grants assigned to users
-
getPersistentClass
Description copied from class:HibernateDao
All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.- Specified by:
getPersistentClass
in classHibernateDao<UserAdministrationGrantToGroup>
- Returns:
- the entity class for this DAO
-