public class UserAdministrationGrantGroupDaoHibernate extends HibernateDao<UserAdministrationGrantToGroup> implements UserAdministrationGrantGroupDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
sessionFactory
Constructor and Description |
---|
UserAdministrationGrantGroupDaoHibernate() |
Modifier and Type | Method and Description |
---|---|
UserAdministrationGrantToGroup |
add(UserAdministrationGrantToGroup grant)
Adds a new group administration grant for a user
|
List<UserAdministrationGrantToGroup> |
findAll() |
List<UserAdministrationGrantToGroup> |
findGrantsToGroup(InternalGroup targetGroup)
Looks for administration grants for a given group
|
Optional<UserAdministrationGrantToGroup> |
findUserGrantForGroup(InternalUser internalUser,
InternalGroup internalGroup)
Checks if an user has a grant to a group
|
List<UserAdministrationGrantToGroup> |
findUserGrants(InternalUser internalUser)
Looks for all administration grants a user has
|
Class<UserAdministrationGrantToGroup> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(Serializable) to work
correctly. |
void |
remove(InternalUser user,
InternalGroup targetGroup)
Remove administration grant for a user to a group
|
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, 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
setSessionFactory, withStatelessSession
public UserAdministrationGrantGroupDaoHibernate()
public UserAdministrationGrantToGroup add(UserAdministrationGrantToGroup grant)
UserAdministrationGrantGroupDao
add
in interface UserAdministrationGrantGroupDao
grant
- the grantpublic List<UserAdministrationGrantToGroup> findGrantsToGroup(InternalGroup targetGroup)
UserAdministrationGrantGroupDao
findGrantsToGroup
in interface UserAdministrationGrantGroupDao
targetGroup
- the grouppublic void remove(InternalUser user, InternalGroup targetGroup)
UserAdministrationGrantGroupDao
remove
in interface UserAdministrationGrantGroupDao
user
- the user who will lose the granttargetGroup
- the group to which grant will be removedpublic List<UserAdministrationGrantToGroup> findUserGrants(InternalUser internalUser)
UserAdministrationGrantGroupDao
findUserGrants
in interface UserAdministrationGrantGroupDao
public Optional<UserAdministrationGrantToGroup> findUserGrantForGroup(InternalUser internalUser, InternalGroup internalGroup)
UserAdministrationGrantGroupDao
findUserGrantForGroup
in interface UserAdministrationGrantGroupDao
internalUser
- the userinternalGroup
- the grouppublic List<UserAdministrationGrantToGroup> findAll()
findAll
in interface UserAdministrationGrantGroupDao
public Class<UserAdministrationGrantToGroup> getPersistentClass()
HibernateDao
HibernateDao.load(Serializable)
to work
correctly.getPersistentClass
in class HibernateDao<UserAdministrationGrantToGroup>
Copyright © 2020 Atlassian. All rights reserved.