Package de.xima.fc.dao.impl
Class PostfachDao
- java.lang.Object
 - 
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
 - 
- de.xima.fc.dao.impl.GenericDao<E>
 - 
- de.xima.fc.dao.impl.MandantDependentBaseDao<Postfach>
 - 
- de.xima.fc.dao.impl.PostfachDao
 
 
 
 
 
- 
- All Implemented Interfaces:
 de.xima.cmn.dao.interfaces.IAbstractDao<Postfach,Long,IEntityContext>,IGenericDao<Postfach>,IMandantDependentBaseDao<Postfach>,IPostfachDao
public class PostfachDao extends MandantDependentBaseDao<Postfach> implements IPostfachDao
The default implementation ofIPostfachDaothat can be accessed viaDaoProvider.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Constructor Summary
Constructors Constructor Description PostfachDao()Creates a new instance of this DAO. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear(IEntityContext ec, Mandant man, Postfach postfach)Deprecated.voidclear(IEntityContext ec, Postfach postfach)Deletes allform recordsin the given inbox.StringfindUniqueName(IEntityContext ec, Mandant client, String candidate, Postfach exclude)Returns a name that is not taken by anotherPostfachin the given client other than the excluded inbox.List<Postfach>getAllByClient(IEntityContext ec, Mandant client)Returns all inboxes of the given client.List<Postfach>getAllByUserGroups(IEntityContext ec, Collection<? extends BenutzerGruppe> userGroups)Set<String>getAllNamesByUserGroups(IEntityContext ec, Collection<? extends BenutzerGruppe> userGroups)PostfachgetByName(IEntityContext ec, Mandant client, String name)Returns the inbox with the given name, if such an inbox exists.PostfachgetByUUID(IEntityContext ec, Mandant client, String uuid)Returns the inbox with the given UUIDPostfachgetByUUID(IEntityContext ec, Mandant client, UUID uuid)Returns the inbox with the given UUIDSet<de.xima.cmn.dao.interfaces.IEntity<Long>>getEntityRefs(IEntityContext ec, Postfach inbox)Returns a set of entities that reference the given entity and depend on it.protected IFCDaoActionHook<Postfach>getPostActionHook()List<Postfach>getPostfachByBenutzer(IEntityContext ec, Benutzer benutzer)Deprecated.protected IFCDaoActionHook<Postfach>getPreActionHook()booleanisNameExisiting(IEntityContext ec, Mandant client, String name)Returns whether or not the given inbox name exists within the given client- 
Methods inherited from class de.xima.fc.dao.impl.GenericDao
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, read 
- 
Methods inherited from interface de.xima.fc.dao.interfaces.IPostfachDao
getAllByBenutzergruppe, getAllNamesByUserGroup 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
PostfachDao
public PostfachDao()
Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.POSTFACH_DAO. 
 - 
 
- 
Method Detail
- 
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, Postfach inbox)
Description copied from interface:IGenericDaoReturns a set of entities that reference the given entity and depend on it. An entity can usually not be deleted if it is still being referenced by and depended on by other entities.- Specified by:
 getEntityRefsin interfaceIGenericDao<Postfach>- Overrides:
 getEntityRefsin classGenericDao<Postfach>- Parameters:
 ec- entity context for database transactions.inbox- to get references for.- Returns:
 - a set of entities that reference the given entity and depend on it.
 
 
- 
clear
public void clear(IEntityContext ec, Postfach postfach)
Description copied from interface:IPostfachDaoDeletes allform recordsin the given inbox.- Specified by:
 clearin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.postfach- Inbox to clear.
 
- 
clear
@Deprecated public void clear(IEntityContext ec, Mandant man, Postfach postfach)
Deprecated.Description copied from interface:IPostfachDaoDeletes allform recordsin the given inbox.- Specified by:
 clearin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.man- Client to which the inbox belongs.postfach- Inbox to clear.
 
- 
getPostfachByBenutzer
@Deprecated public List<Postfach> getPostfachByBenutzer(IEntityContext ec, Benutzer benutzer)
Deprecated.- Specified by:
 getPostfachByBenutzerin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.benutzer- User for which to find inboxes.- Returns:
 - A list of all inboxes accessible to the given user.
 
 
- 
getPreActionHook
protected IFCDaoActionHook<Postfach> getPreActionHook()
- Overrides:
 getPreActionHookin classGenericDao<Postfach>
 
- 
getPostActionHook
protected IFCDaoActionHook<Postfach> getPostActionHook()
- Overrides:
 getPostActionHookin classGenericDao<Postfach>
 
- 
getAllByUserGroups
public List<Postfach> getAllByUserGroups(IEntityContext ec, Collection<? extends BenutzerGruppe> userGroups)
- Specified by:
 getAllByUserGroupsin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.userGroups- User groups to check.- Returns:
 - All inboxes with access to at least one of the given groups.
 
 
- 
getAllNamesByUserGroups
public Set<String> getAllNamesByUserGroups(IEntityContext ec, Collection<? extends BenutzerGruppe> userGroups)
- Specified by:
 getAllNamesByUserGroupsin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.userGroups- User groups to check.- Returns:
 - The 
namesof all inboxes with access to at least one of the given user groups. 
 
- 
getAllByClient
public List<Postfach> getAllByClient(IEntityContext ec, Mandant client)
Description copied from interface:IPostfachDaoReturns all inboxes of the given client.- Specified by:
 getAllByClientin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client- Client context in which to look for inbox- Returns:
 - A list of inboxes of the given client
 
 
- 
getByUUID
public Postfach getByUUID(IEntityContext ec, Mandant client, String uuid)
Description copied from interface:IPostfachDaoReturns the inbox with the given UUID- Specified by:
 getByUUIDin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client- Client context in which to look for inboxuuid- UUID of the inbox- Returns:
 - The inbox with the given UUID and client, if such an inbox exists.
 
 
- 
getByUUID
public Postfach getByUUID(IEntityContext ec, Mandant client, UUID uuid)
Description copied from interface:IPostfachDaoReturns the inbox with the given UUID- Specified by:
 getByUUIDin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client- Client context in which to look for inboxuuid-UUIDUUID of the inbox- Returns:
 - The inbox with the given UUID and client, if such an inbox exists.
 
 
- 
getByName
public Postfach getByName(IEntityContext ec, Mandant client, String name)
Description copied from interface:IPostfachDaoReturns the inbox with the given name, if such an inbox exists.- Specified by:
 getByNamein interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client-Clientcontext in which to look for inboxname- Name of the inbox.- Returns:
 - The inbox with the given name and client, or null if no such inbox exists.
 
 
- 
findUniqueName
public String findUniqueName(IEntityContext ec, Mandant client, String candidate, Postfach exclude)
Description copied from interface:IPostfachDaoReturns a name that is not taken by anotherPostfachin the given client other than the excluded inbox. An index will be added to the candidate if necessary.- Specified by:
 findUniqueNamein interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client- Client for which a unique inbox name should be generatedcandidate- Inbox name candidate to be made uniqueexclude- Inbox to be excluded from search- Returns:
 - unique inbox name in the context of the given client
 
 
- 
isNameExisiting
public boolean isNameExisiting(IEntityContext ec, Mandant client, String name)
Description copied from interface:IPostfachDaoReturns whether or not the given inbox name exists within the given client- Specified by:
 isNameExisitingin interfaceIPostfachDao- Parameters:
 ec- Entity context to use for interacting with the database.client- Client context in which to look for inboxname- An inbox name to check- Returns:
 - whether or not the given name is unique
 
 
 - 
 
 -