Package de.xima.fc.dao.impl
Class MandantDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<Mandant>
-
- de.xima.fc.dao.impl.MandantDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Mandant,Long,IEntityContext>,IGenericDao<Mandant>,IMandantDao
public class MandantDao extends GenericDao<Mandant> implements IMandantDao
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERSBoolean flag that determines whether to delete all users that are only part of the client when deleting clients.static StringENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_CLIENTSCollection of clients to check for user exclusivity when deleting clients and their users.static StringENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_ERRORComma separated String of all the user names that could not be deleted successfully.static StringENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_SUCCESSComma separated String of all the user names that have been deleted.
-
Constructor Summary
Constructors Constructor Description MandantDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Mandant>getAllByName(IEntityContext ec, String name)Method for determining allclientsby its name (case insensitive).MandantgetByUUID(IEntityContext ec, String uuid)Returns the client with the given UUIDMandantgetByUUID(IEntityContext ec, UUID uuid)Returns the client with the given UUIDLicenseDataSnapshotgetLicenseDataSnapshot(IEntityContext ec, Mandant client)protected IFCDaoActionHook<Mandant>getPostActionHook()protected IFCDaoActionHook<Mandant>getPreActionHook()longgetUsedFileSize(IEntityContext ec, Mandant mandant)booleanisCreationAllowed(IEntityContext ec, Mandant mandant)MandantreadByName(IEntityContext ec, String name)Method for determining aclientsby its name (case insensitive).-
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.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Field Detail
-
ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS
public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS
Boolean flag that determines whether to delete all users that are only part of the client when deleting clients.
-
ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_CLIENTS
public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_CLIENTS
Collection of clients to check for user exclusivity when deleting clients and their users.
-
ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_SUCCESS
public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_SUCCESS
Comma separated String of all the user names that have been deleted.
-
ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_ERROR
public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_ERROR
Comma separated String of all the user names that could not be deleted successfully.
-
-
Method Detail
-
isCreationAllowed
public boolean isCreationAllowed(IEntityContext ec, Mandant mandant)
- Specified by:
isCreationAllowedin interfaceIMandantDao
-
getLicenseDataSnapshot
public LicenseDataSnapshot getLicenseDataSnapshot(IEntityContext ec, Mandant client)
- Specified by:
getLicenseDataSnapshotin interfaceIMandantDao
-
readByName
public Mandant readByName(IEntityContext ec, String name)
Description copied from interface:IMandantDaoMethod for determining aclientsby its name (case insensitive).- Specified by:
readByNamein interfaceIMandantDao- Parameters:
ec- Entity context to use for accessing the database.name- The name of the client to search for (case insensitive).- Returns:
- The client with the given name, or
nullif no such client exists.
-
getAllByName
public List<Mandant> getAllByName(IEntityContext ec, String name)
Description copied from interface:IMandantDaoMethod for determining allclientsby its name (case insensitive).- Specified by:
getAllByNamein interfaceIMandantDao- Parameters:
ec- Entity context to use for accessing the database.name- The name of the client to search for (case insensitive).- Returns:
- All clients with the given name, never
null.
-
getByUUID
public Mandant getByUUID(IEntityContext ec, String uuid)
Description copied from interface:IMandantDaoReturns the client with the given UUID- Specified by:
getByUUIDin interfaceIMandantDao- Parameters:
ec- Entity context to use for accessing the database.uuid-StringUUID of the client- Returns:
- The client with the given UUID, or
nullwhen no such client exists.
-
getByUUID
public Mandant getByUUID(IEntityContext ec, UUID uuid)
Description copied from interface:IMandantDaoReturns the client with the given UUID- Specified by:
getByUUIDin interfaceIMandantDao- Parameters:
ec- Entity context to use for accessing the database.uuid- UUID of the client- Returns:
Mandantfor the given UUID
-
getPreActionHook
protected IFCDaoActionHook<Mandant> getPreActionHook()
- Overrides:
getPreActionHookin classGenericDao<Mandant>
-
getPostActionHook
protected IFCDaoActionHook<Mandant> getPostActionHook()
- Overrides:
getPostActionHookin classGenericDao<Mandant>
-
getUsedFileSize
public long getUsedFileSize(IEntityContext ec, Mandant mandant)
- Specified by:
getUsedFileSizein interfaceIMandantDao
-
-