Package de.xima.fc.dao.impl
Class TextbausteinDao
java.lang.Object
de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Textbaustein,
,Long, IEntityContext> IGenericDao<Textbaustein>
,IMandantDependentBaseDao<Textbaustein>
,ITextbausteinDao
public class TextbausteinDao
extends MandantDependentBaseDao<Textbaustein>
implements ITextbausteinDao
The default implementation of
ITextbausteinDao
that can be accessed via DaoProvider
.- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from class de.xima.cmn.dao.AbstractDao
entityClass, LOG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindUniqueName
(IEntityContext ec, Mandant client, String candidate) Returns a name that is not taken by anotherTextbaustein
in the given client.findUniqueName
(IEntityContext ec, Mandant client, String candidate, Textbaustein exclude) Returns a name that is not taken by anotherTextbaustein
in the given client other than the excluded template.getAll
(IEntityContext ec, Mandant mandant) getAllByKat
(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie) getAllByProject
(IEntityContext ec, Projekt project) Returns all templates that are being used by the given projectgetByKatAndName
(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie, String name) getByMsgCode
(IEntityContext ec, Mandant m, String msgCode) getByName
(IEntityContext ec, Mandant mandant, String name) getByUUID
(IEntityContext ec, Mandant client, String uuid) Returns the template with the given UUID stringgetByUUID
(IEntityContext ec, Mandant client, UUID uuid) Returns the template with the given UUIDgetEntityRefs
(IEntityContext ec, Textbaustein template) Returns a set of entities that reference the given entity and depend on it.protected IFCDaoActionHook<Textbaustein>
protected IFCDaoActionHook<Textbaustein>
getTextbausteinByMsgCode
(IEntityContext ec, Mandant m, ETextbausteinMsgCode msgCode) boolean
isNameExisiting
(IEntityContext ec, Mandant client, String name) Returns whether or not the given template name exists within the given clientMethods 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
-
Constructor Details
-
TextbausteinDao
public TextbausteinDao()Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.TEXTBAUSTEIN_DAO
.
-
-
Method Details
-
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, Textbaustein template) Description copied from interface:IGenericDao
Returns 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:
getEntityRefs
in interfaceIGenericDao<Textbaustein>
- Overrides:
getEntityRefs
in classGenericDao<Textbaustein>
- Parameters:
ec
- entity context for database transactions.template
- to get references for.- Returns:
- a set of entities that reference the given entity and depend on it.
-
getTextbausteinByMsgCode
public Textbaustein getTextbausteinByMsgCode(IEntityContext ec, Mandant m, ETextbausteinMsgCode msgCode) - Specified by:
getTextbausteinByMsgCode
in interfaceITextbausteinDao
-
getAll
- Specified by:
getAll
in interfaceITextbausteinDao
-
getByName
- Specified by:
getByName
in interfaceITextbausteinDao
-
getAllByKat
public List<Textbaustein> getAllByKat(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie) - Specified by:
getAllByKat
in interfaceITextbausteinDao
-
getByMsgCode
- Specified by:
getByMsgCode
in interfaceITextbausteinDao
-
getByKatAndName
public Textbaustein getByKatAndName(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie, String name) - Specified by:
getByKatAndName
in interfaceITextbausteinDao
-
getByUUID
Description copied from interface:ITextbausteinDao
Returns the template with the given UUID string- Specified by:
getByUUID
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to useclient
-Mandant
context in which to look for templateuuid
-String
UUID of the template- Returns:
Textbaustein
for the given UUID and client
-
getByUUID
Description copied from interface:ITextbausteinDao
Returns the template with the given UUID- Specified by:
getByUUID
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to useclient
-Mandant
context in which to look for templateuuid
-UUID
UUID of the template- Returns:
Textbaustein
for the given UUID and client
-
getAllByProject
Description copied from interface:ITextbausteinDao
Returns all templates that are being used by the given project- Specified by:
getAllByProject
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to be usedproject
-Projekt
project to search for templates- Returns:
List
ofTextbaustein
s that are being used by the project
-
findUniqueName
Description copied from interface:ITextbausteinDao
Returns a name that is not taken by anotherTextbaustein
in the given client. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique template name should be generatedcandidate
-String
template name candiate to be made unique- Returns:
- unique template name in the context of the given client
-
findUniqueName
public String findUniqueName(IEntityContext ec, Mandant client, String candidate, Textbaustein exclude) Description copied from interface:ITextbausteinDao
Returns a name that is not taken by anotherTextbaustein
in the given client other than the excluded template. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique template name should be generatedcandidate
-String
template name candiate to be made uniqueexclude
-Textbaustein
template to be excluded from search- Returns:
- unique template name in the context of the given client
-
isNameExisiting
Description copied from interface:ITextbausteinDao
Returns whether or not the given template name exists within the given client- Specified by:
isNameExisiting
in interfaceITextbausteinDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which to check uniquenessname
-String
template name to check- Returns:
- whether or not the given name is unique
-
getPreActionHook
- Overrides:
getPreActionHook
in classGenericDao<Textbaustein>
-
getPostActionHook
- Overrides:
getPostActionHook
in classGenericDao<Textbaustein>
-