Package de.xima.fc.dao.impl
Class AppointmentTemplateDao
java.lang.Object
de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
de.xima.fc.dao.impl.GenericDao<E>
de.xima.fc.dao.impl.MandantDependentBaseDao<AppointmentTemplate>
de.xima.fc.dao.impl.AppointmentTemplateDao
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<AppointmentTemplate,
,Long, IEntityContext> IAppointmentTemplateDao
,IGenericDao<AppointmentTemplate>
,IMandantDependentBaseDao<AppointmentTemplate>
public class AppointmentTemplateDao
extends MandantDependentBaseDao<AppointmentTemplate>
implements IAppointmentTemplateDao
Implementation of the
IAppointmentTemplateDao
for reading and writing AppointmentTemplate
entities.- 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 anotherAppointmentTemplate
in the given client.findUniqueName
(IEntityContext ec, Mandant client, String candidate, AppointmentTemplate exclude) Returns a name that is not taken by anotherAppointmentTemplate
in the given client.getAllByClient
(IEntityContext ec, Mandant client) Finds all available appointment templates of the given client.getAllSlotsOfTemplates
(IEntityContext ec, List<AppointmentTemplate> templates, boolean merge) Finds all available appointment slots of the given templates.getByUUID
(IEntityContext ec, Mandant client, String uuid) Returns the template with the given UUIDgetByUUID
(IEntityContext ec, Mandant client, UUID uuid) Returns the template with the given UUIDprotected IFCDaoActionHook<AppointmentTemplate>
boolean
isNameExisiting
(IEntityContext ec, Mandant client, String name) Returns whether or not the given entity name exists within the given clientMethods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPreActionHook, 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
-
Constructor Details
-
AppointmentTemplateDao
public AppointmentTemplateDao()Creates a new, default appointment template DAO.
-
-
Method Details
-
getAllByClient
Description copied from interface:IAppointmentTemplateDao
Finds all available appointment templates of the given client.- Specified by:
getAllByClient
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to useclient
- Client for which to find the appointment templates.- Returns:
- All appointment templates of the given client.
-
getByUUID
Description copied from interface:IAppointmentTemplateDao
Returns the template with the given UUID- Specified by:
getByUUID
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to useclient
- The client for which to find the template. Please note that different clients may have templates with the same UUID.uuid
-String
UUID of the template- Returns:
- The appointment template for the given UUID
-
getByUUID
Description copied from interface:IAppointmentTemplateDao
Returns the template with the given UUID- Specified by:
getByUUID
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to useclient
- The client for which to find the template. Please note that different clients may have templates with the same UUID.uuid
-UUID
UUID of the template- Returns:
- The appointment template for the given UUID
-
findUniqueName
Description copied from interface:IAppointmentTemplateDao
Returns a name that is not taken by anotherAppointmentTemplate
in the given client. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique template name should be generatedcandidate
-String
appointment template name candidate to be made unique- Returns:
- unique appointment template name in the context of the given client
-
findUniqueName
public String findUniqueName(IEntityContext ec, Mandant client, String candidate, AppointmentTemplate exclude) Description copied from interface:IAppointmentTemplateDao
Returns a name that is not taken by anotherAppointmentTemplate
in the given client. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique template name should be generatedcandidate
-String
appointment template name candidate to be made uniqueexclude
-AppointmentTemplate
entity to exclude from search for unique name- Returns:
- unique appointment template name in the context of the given client
-
isNameExisiting
Description copied from interface:IAppointmentTemplateDao
Returns whether or not the given entity name exists within the given client- Specified by:
isNameExisiting
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which to check uniquenessname
-String
name to check- Returns:
- whether or not the given name is unique
-
getPostActionHook
- Overrides:
getPostActionHook
in classGenericDao<AppointmentTemplate>
-
getAllSlotsOfTemplates
public List<AppointmentSlot> getAllSlotsOfTemplates(IEntityContext ec, List<AppointmentTemplate> templates, boolean merge) Description copied from interface:IAppointmentTemplateDao
Finds all available appointment slots of the given templates.- Specified by:
getAllSlotsOfTemplates
in interfaceIAppointmentTemplateDao
- Parameters:
ec
-IEntityContext
to usetemplates
- Templates to use.merge
- Whether to merge overlapping slots.- Returns:
- All appointment slots of the given templates.
-