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 theIDirectClientAuthorizationDaofor reading and writingDirectClientAuthorizationentities.- 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.DirectClientAuthorizationgetByInvitationUuid(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.booleanhasUnacceptedClientInvitations(IEntityContext ec, UserProfile userProfile)Checks whether the given user profile has not yet accepted client invitations.booleanhasUnacceptedClientInvitations(IEntityContext ec, String userMail)-
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:IClientAuthorizationDaoFinds all authorizations for a given client scope.- Specified by:
getAllByClientin 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:IDirectClientAuthorizationDaoFinds all authorizations for a given client scope.- Specified by:
getAllByClientin 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:IDirectClientAuthorizationDaoFinds the direct client authorization with the given invitation UUID.- Specified by:
getByInvitationUuidin 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:IDirectClientAuthorizationDaoReturns the direct client authorizations for the given user profile that have not yet been accepted.- Specified by:
getUnacceptedClientInvitationsin 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:IDirectClientAuthorizationDaoChecks whether the given user profile has not yet accepted client invitations.- Specified by:
hasUnacceptedClientInvitationsin interfaceIDirectClientAuthorizationDao- Parameters:
ec- entity context for database transactions.userProfile- to check- Returns:
trueif there are not yet accepted client invitations andfalseotherwise.
-
hasUnacceptedClientInvitations
public boolean hasUnacceptedClientInvitations(IEntityContext ec, String userMail)
- Specified by:
hasUnacceptedClientInvitationsin interfaceIDirectClientAuthorizationDao
-
getPreActionHook
protected IFCDaoActionHook<DirectClientAuthorization> getPreActionHook()
- Overrides:
getPreActionHookin classGenericDao<DirectClientAuthorization>
-
getPostActionHook
protected IFCDaoActionHook<DirectClientAuthorization> getPostActionHook()
- Overrides:
getPostActionHookin classGenericDao<DirectClientAuthorization>
-
-