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 anotherTextbausteinin the given client.findUniqueName(IEntityContext ec, Mandant client, String candidate, Textbaustein exclude) Returns a name that is not taken by anotherTextbausteinin 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) booleanisNameExisiting(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
readMethods 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, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateMethods 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: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<Textbaustein>- Overrides:
getEntityRefsin 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:
getTextbausteinByMsgCodein interfaceITextbausteinDao
-
getAll
- Specified by:
getAllin interfaceITextbausteinDao
-
getByName
- Specified by:
getByNamein interfaceITextbausteinDao
-
getAllByKat
public List<Textbaustein> getAllByKat(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie) - Specified by:
getAllByKatin interfaceITextbausteinDao
-
getByMsgCode
- Specified by:
getByMsgCodein interfaceITextbausteinDao
-
getByKatAndName
public Textbaustein getByKatAndName(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie, String name) - Specified by:
getByKatAndNamein interfaceITextbausteinDao
-
getByUUID
Description copied from interface:ITextbausteinDaoReturns the template with the given UUID string- Specified by:
getByUUIDin interfaceITextbausteinDao- Parameters:
ec-IEntityContextto useclient-Mandantcontext in which to look for templateuuid-StringUUID of the template- Returns:
Textbausteinfor the given UUID and client
-
getByUUID
Description copied from interface:ITextbausteinDaoReturns the template with the given UUID- Specified by:
getByUUIDin interfaceITextbausteinDao- Parameters:
ec-IEntityContextto useclient-Mandantcontext in which to look for templateuuid-UUIDUUID of the template- Returns:
Textbausteinfor the given UUID and client
-
getAllByProject
Description copied from interface:ITextbausteinDaoReturns all templates that are being used by the given project- Specified by:
getAllByProjectin interfaceITextbausteinDao- Parameters:
ec-IEntityContextto be usedproject-Projektproject to search for templates- Returns:
ListofTextbausteins that are being used by the project
-
findUniqueName
Description copied from interface:ITextbausteinDaoReturns a name that is not taken by anotherTextbausteinin the given client. An index will be added to the candidate if necessary.- Specified by:
findUniqueNamein interfaceITextbausteinDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique template name should be generatedcandidate-Stringtemplate 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:ITextbausteinDaoReturns a name that is not taken by anotherTextbausteinin the given client other than the excluded template. An index will be added to the candidate if necessary.- Specified by:
findUniqueNamein interfaceITextbausteinDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique template name should be generatedcandidate-Stringtemplate name candiate to be made uniqueexclude-Textbausteintemplate to be excluded from search- Returns:
- unique template name in the context of the given client
-
isNameExisiting
Description copied from interface:ITextbausteinDaoReturns whether or not the given template name exists within the given client- Specified by:
isNameExisitingin interfaceITextbausteinDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which to check uniquenessname-Stringtemplate name to check- Returns:
- whether or not the given name is unique
-
getPreActionHook
- Overrides:
getPreActionHookin classGenericDao<Textbaustein>
-
getPostActionHook
- Overrides:
getPostActionHookin classGenericDao<Textbaustein>
-