Package de.xima.fc.dao.impl
Class TextbausteinDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<E>
-
- de.xima.fc.dao.impl.MandantDependentBaseDao<Textbaustein>
-
- de.xima.fc.dao.impl.TextbausteinDao
-
- 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
-
-
Constructor Summary
Constructors Constructor Description TextbausteinDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
findUniqueName(IEntityContext ec, Mandant client, String candidate)
Returns a name that is not taken by anotherTextbaustein
in the given client.String
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.List<Textbaustein>
getAll(IEntityContext ec, Mandant mandant)
List<Textbaustein>
getAllByKat(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie)
List<Textbaustein>
getAllByProject(IEntityContext ec, Projekt project)
Returns all templates that are being used by the given projectTextbaustein
getByKatAndName(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie, String name)
Textbaustein
getByMsgCode(IEntityContext ec, Mandant m, String msgCode)
Textbaustein
getByName(IEntityContext ec, Mandant mandant, String name)
Textbaustein
getByUUID(IEntityContext ec, Mandant client, String uuid)
Returns the template with the given UUID stringTextbaustein
getByUUID(IEntityContext ec, Mandant client, UUID uuid)
Returns the template with the given UUIDSet<de.xima.cmn.dao.interfaces.IEntity<Long>>
getEntityRefs(IEntityContext ec, Textbaustein template)
protected IFCDaoActionHook<Textbaustein>
getPostActionHook()
protected IFCDaoActionHook<Textbaustein>
getPreActionHook()
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 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
read
-
-
-
-
Method Detail
-
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, Textbaustein template)
- Specified by:
getEntityRefs
in interfaceIGenericDao<Textbaustein>
- Overrides:
getEntityRefs
in classGenericDao<Textbaustein>
-
getTextbausteinByMsgCode
public Textbaustein getTextbausteinByMsgCode(IEntityContext ec, Mandant m, ETextbausteinMsgCode msgCode)
- Specified by:
getTextbausteinByMsgCode
in interfaceITextbausteinDao
-
getAll
public List<Textbaustein> getAll(IEntityContext ec, Mandant mandant)
- Specified by:
getAll
in interfaceITextbausteinDao
-
getByName
public Textbaustein getByName(IEntityContext ec, Mandant mandant, String name)
- Specified by:
getByName
in interfaceITextbausteinDao
-
getAllByKat
public List<Textbaustein> getAllByKat(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie)
- Specified by:
getAllByKat
in interfaceITextbausteinDao
-
getByMsgCode
public Textbaustein getByMsgCode(IEntityContext ec, Mandant m, String msgCode)
- Specified by:
getByMsgCode
in interfaceITextbausteinDao
-
getByKatAndName
public Textbaustein getByKatAndName(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie, String name)
- Specified by:
getByKatAndName
in interfaceITextbausteinDao
-
getByUUID
public Textbaustein getByUUID(IEntityContext ec, Mandant client, String uuid)
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
public Textbaustein getByUUID(IEntityContext ec, Mandant client, UUID uuid)
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
public List<Textbaustein> getAllByProject(IEntityContext ec, Projekt project)
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
public String findUniqueName(IEntityContext ec, Mandant client, String candidate)
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
public boolean isNameExisiting(IEntityContext ec, Mandant client, String name)
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
protected IFCDaoActionHook<Textbaustein> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<Textbaustein>
-
getPostActionHook
protected IFCDaoActionHook<Textbaustein> getPostActionHook()
- Overrides:
getPostActionHook
in classGenericDao<Textbaustein>
-
-