Package de.xima.fc.dao.impl
Class DirectClientAuthorizationDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<DirectClientAuthorization>
-
- de.xima.fc.dao.impl.DirectClientAuthorizationDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<DirectClientAuthorization,Long,IEntityContext>
,IClientAuthorizationDao<DirectClientAuthorization>
,IDirectClientAuthorizationDao
,IGenericDao<DirectClientAuthorization>
public class DirectClientAuthorizationDao extends GenericDao<DirectClientAuthorization> implements IDirectClientAuthorizationDao
Implementation of theIDirectClientAuthorizationDao
for reading and writingDirectClientAuthorization
entities.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description DirectClientAuthorizationDao()
Creates a new instance of this DAO.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DirectClientAuthorization>
getAllByClient(IEntityContext ec, Mandant client)
Finds all authorizations for a given client scope.List<DirectClientAuthorization>
getAllByClient(IEntityContext ec, Mandant client, boolean acceptedOnly)
Finds all authorizations for a given client scope.DirectClientAuthorization
getByInvitationUuid(IEntityContext ec, UUID invitationUuid)
Finds the direct client authorization with the given invitation UUID.protected IFCDaoActionHook<DirectClientAuthorization>
getPostActionHook()
protected IFCDaoActionHook<DirectClientAuthorization>
getPreActionHook()
List<DirectClientAuthorization>
getUnacceptedClientInvitations(IEntityContext ec, UserProfile userProfile)
Returns the direct client authorizations for the given user profile that have not yet been accepted.boolean
hasUnacceptedClientInvitations(IEntityContext ec, UserProfile userProfile)
Checks whether the given user profile has not yet accepted client invitations.-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IClientAuthorizationDao
getByUuid, getByUuid
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Constructor Detail
-
DirectClientAuthorizationDao
public DirectClientAuthorizationDao()
Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.DIRECTCLIENTAUTHORIZATION_DAO
.
-
-
Method Detail
-
getAllByClient
public List<DirectClientAuthorization> getAllByClient(IEntityContext ec, Mandant client)
Description copied from interface:IClientAuthorizationDao
Finds all authorizations for a given client scope.- Specified by:
getAllByClient
in interfaceIClientAuthorizationDao<DirectClientAuthorization>
- Parameters:
ec
- Entity context for accessing the databaseclient
- Client scope where to look for users.- Returns:
- A list with all authorizations from the given client scope.
-
getAllByClient
public List<DirectClientAuthorization> getAllByClient(IEntityContext ec, Mandant client, boolean acceptedOnly)
Description copied from interface:IDirectClientAuthorizationDao
Finds all authorizations for a given client scope.- Specified by:
getAllByClient
in interfaceIDirectClientAuthorizationDao
- Parameters:
ec
- Entity context for accessing the databaseclient
- Client scope where to look for users.acceptedOnly
- Iftrue
, returns only those users that have accepted the invitation, seeDirectClientAuthorization.isInvitationAccepted()
.- Returns:
- A list with all authorizations from the given client scope.
-
getByInvitationUuid
public DirectClientAuthorization getByInvitationUuid(IEntityContext ec, UUID invitationUuid)
Description copied from interface:IDirectClientAuthorizationDao
Finds the direct client authorization with the given invitation UUID.- Specified by:
getByInvitationUuid
in interfaceIDirectClientAuthorizationDao
- Parameters:
ec
- Entity context for database transactions.invitationUuid
- invitation UUID of the client authorization.- Returns:
- The direct client authorization with the given invitation UUID.
-
getUnacceptedClientInvitations
public List<DirectClientAuthorization> getUnacceptedClientInvitations(IEntityContext ec, UserProfile userProfile)
Description copied from interface:IDirectClientAuthorizationDao
Returns the direct client authorizations for the given user profile that have not yet been accepted.- Specified by:
getUnacceptedClientInvitations
in interfaceIDirectClientAuthorizationDao
- Parameters:
ec
- entity context for database transactions.userProfile
- to check- Returns:
- List of not yet accepted direct client authorizations.
-
hasUnacceptedClientInvitations
public boolean hasUnacceptedClientInvitations(IEntityContext ec, UserProfile userProfile)
Description copied from interface:IDirectClientAuthorizationDao
Checks whether the given user profile has not yet accepted client invitations.- Specified by:
hasUnacceptedClientInvitations
in interfaceIDirectClientAuthorizationDao
- Parameters:
ec
- entity context for database transactions.userProfile
- to check- Returns:
true
if there are not yet accepted client invitations andfalse
otherwise.
-
getPreActionHook
protected IFCDaoActionHook<DirectClientAuthorization> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<DirectClientAuthorization>
-
getPostActionHook
protected IFCDaoActionHook<DirectClientAuthorization> getPostActionHook()
- Overrides:
getPostActionHook
in classGenericDao<DirectClientAuthorization>
-
-