Package de.xima.fc.entities
Class AppointmentTemplate
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.AppointmentTemplate
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,IDescriptionProviding
,ILockingVersionProviding
,IMandantDependent
,INameProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class AppointmentTemplate extends AbstractLockableEntity implements INameProviding, IDescriptionProviding, IUUIDEntity, IMandantDependent
An entity for the appointment module of FORMCYCLE. Describes a template with the configuration of the appointments that can be made.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_ALLOW_ICAL
JPA attribute name for theisAllowIcal()
field.static String
ATTR_APPOINTMENT_TYPES
JPA attribute name for thegetAppointmentTypes()
field.static String
ATTR_CAPACITY
JPA attribute name for thegetCapacity()
field.static String
ATTR_CLOSING_TIMES
JPA attribute name for thegetClosingTimes()
field.static String
ATTR_MAXIMUM_ADVANCE_BOOKING
JPA attribute name for thegetMaximumAdvanceBooking()
field.static String
ATTR_MINIMUM_BOOKING_NOTICE
JPA attribute name for thegetMinimumBookingNotice()
field.static String
ATTR_SLOTS
JPA attribute name for thegetSlots()
field.static String
ATTR_ZONE_ID_STRING
JPA attribute name for thegetZoneIdString()
field.protected @NotNull Mandant
client
-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
-
Fields inherited from interface de.xima.fc.entities.interfaces.IMandantDependent
ATTR_MANDANT, COL_CLIENT_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description AppointmentTemplate()
-
Method Summary
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
ATTR_ALLOW_ICAL
public static final String ATTR_ALLOW_ICAL
JPA attribute name for theisAllowIcal()
field.- See Also:
- Constant Field Values
-
ATTR_APPOINTMENT_TYPES
public static final String ATTR_APPOINTMENT_TYPES
JPA attribute name for thegetAppointmentTypes()
field.- See Also:
- Constant Field Values
-
ATTR_CAPACITY
public static final String ATTR_CAPACITY
JPA attribute name for thegetCapacity()
field.- See Also:
- Constant Field Values
-
ATTR_CLOSING_TIMES
public static final String ATTR_CLOSING_TIMES
JPA attribute name for thegetClosingTimes()
field.- See Also:
- Constant Field Values
-
ATTR_MAXIMUM_ADVANCE_BOOKING
public static final String ATTR_MAXIMUM_ADVANCE_BOOKING
JPA attribute name for thegetMaximumAdvanceBooking()
field.- See Also:
- Constant Field Values
-
ATTR_MINIMUM_BOOKING_NOTICE
public static final String ATTR_MINIMUM_BOOKING_NOTICE
JPA attribute name for thegetMinimumBookingNotice()
field.- See Also:
- Constant Field Values
-
ATTR_SLOTS
public static final String ATTR_SLOTS
JPA attribute name for thegetSlots()
field.- See Also:
- Constant Field Values
-
ATTR_ZONE_ID_STRING
public static final String ATTR_ZONE_ID_STRING
JPA attribute name for thegetZoneIdString()
field.- See Also:
- Constant Field Values
-
client
@NotNull protected @NotNull Mandant client
-
-
Method Detail
-
addClosingTime
public void addClosingTime(AppointmentClosingTime closingTime)
Adds a closing time to this template. Use this in favor of adding to thegetClosingTimes()
directly, as this sets cross references properly. An appointment slot describes a time range when no appointments can be booked.- Parameters:
closingTime
- A closing time to add.
-
addClosingTimes
public void addClosingTimes(Iterable<AppointmentClosingTime> closingTimes)
Adds one or more closing times to this template. Use this in favor of adding to thegetClosingTimes()
directly, as this sets cross references properly. An appointment slot describes a time range when no appointments can be booked.- Parameters:
closingTimes
- A sequence of closing times to add.
-
addSlot
public void addSlot(AppointmentSlot slot)
Adds a slot to this template. Use this in favor of adding to thegetSlots()
directly, as this sets cross references properly. Each available slot is a time range where appointments can be booked.- Parameters:
slot
- A slot to add.
-
addSlots
public void addSlots(Iterable<AppointmentSlot> slots)
Adds one ore more slots to this template. Use this in favor of adding to thegetSlots()
directly, as this sets cross references properly. Each available slot is a time range where appointments can be booked.- Parameters:
slots
- A sequence of slots to add.
-
addType
public void addType(AppointmentType type)
Adds a type to this template. Use this in favor of adding to thegetAppointmentTypes()
directly, as this sets cross references properly. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.- Parameters:
type
- A type to add.
-
getAppointmentTypes
public List<AppointmentType> getAppointmentTypes()
- Returns:
- A list of the appointment types of this template. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.
-
getBeschreibung
@Deprecated public String getBeschreibung()
Deprecated.UsegetDescription()
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
- Returns:
- The internal description of this entity that is visible in the backend.
-
getCapacity
public int getCapacity()
- Returns:
- The capacity of this template. The capacity indicates how many appointments can be booked at the same time.
-
getClient
public Mandant getClient()
- Returns:
- The client to which this template belongs to.
-
getClosingTimes
public List<AppointmentClosingTime> getClosingTimes()
- Returns:
- A list of times when no appointments can be booked.
-
getColor
@Nullable public String getColor()
- Returns:
- The CSS color of this calendar. May be
null
or empty when no color was set.
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- The internal description of this entity that is visible in the backend.
-
getMandant
@Deprecated public Mandant getMandant()
Deprecated.UsegetClient()
.- Specified by:
getMandant
in interfaceIMandantDependent
- Returns:
- The client to which this template belongs to.
-
getMaximumAdvanceBooking
public Duration getMaximumAdvanceBooking()
- Returns:
- How far in advance one can book an appointment, relative to the current date time.
-
getMaximumAdvanceBookingWeeks
public long getMaximumAdvanceBookingWeeks()
- Returns:
- The value of
getMaximumAdvanceBooking()
, converted to weeks.
-
getMinimumBookingNotice
public Duration getMinimumBookingNotice()
- Returns:
- The minumum time that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
getMinimumBookingNoticeHours
public long getMinimumBookingNoticeHours()
- Returns:
- The minumum time in hours that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
getMinimumBookingNoticeWeeks
public long getMinimumBookingNoticeWeeks()
- Returns:
- The minumum time in weeks that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
getName
public String getName()
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
getSlots
public List<AppointmentSlot> getSlots()
- Returns:
- The available slots of this template. Each slot is a time range where appointments can be booked.
-
getUUID
public String getUUID()
- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- The UUID of this appointment template. Please note that this UUID is guaranteed to be unique only for a
given
getClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- Returns:
- The UUID of this appointment template. Please note that this UUID is guaranteed to be unique only for a
given
getClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
getZoneId
public ZoneId getZoneId()
- Returns:
- Time zone of this appointment template.
-
getZoneIdString
public String getZoneIdString()
- Returns:
- Time zone of this appointment template.
-
isAllowIcal
public boolean isAllowIcal()
- Returns:
- Whether to allow viewing the appointments of this template via a HTTP iCal URL.
-
setAllowIcal
public void setAllowIcal(boolean allowIcal)
- Parameters:
allowIcal
- Whether to allow viewing the appointments of this template via a HTTP iCal URL.
-
setAppointmentTypes
public void setAppointmentTypes(List<AppointmentType> appointmentTypes)
- Parameters:
appointmentTypes
- A list of the appointment types of this template. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.
-
setBeschreibung
@Deprecated public void setBeschreibung(String description)
Deprecated.- Parameters:
description
- The internal description of this entity that is visible in the backend.
-
setCapacity
public void setCapacity(int capacity)
- Parameters:
capacity
- The capacity of this template. The capacity indicates how many appointments can be booked at the same time.
-
setClient
public void setClient(Mandant client)
- Parameters:
client
- The client to which this template belongs to.
-
setClosingTimes
public void setClosingTimes(List<AppointmentClosingTime> closingTimes)
- Parameters:
closingTimes
- A list of times when no appointments can be booked.
-
setColor
public void setColor(String color)
- Parameters:
color
- The CSS color of this appointment template.
-
setDescription
public void setDescription(String description)
- Parameters:
description
- The internal description of this entity that is visible in the backend.
-
setMandant
@Deprecated public void setMandant(Mandant mandant)
Deprecated.UsesetClient(Mandant)
.- Specified by:
setMandant
in interfaceIMandantDependent
- Parameters:
mandant
- The client to which this template belongs to.
-
setMaximumAdvanceBooking
public void setMaximumAdvanceBooking(Duration maximumAdvanceBooking)
- Parameters:
maximumAdvanceBooking
- How far in advance one can book an appointment, relative to the current date time.
-
setMaximumAdvanceBookingWeeks
public void setMaximumAdvanceBookingWeeks(long maximumAdvanceBookingWeeks)
- Parameters:
maximumAdvanceBookingWeeks
- The new value forgetMaximumAdvanceBooking()
, in weeks.
-
setMinimumBookingNotice
public void setMinimumBookingNotice(Duration minimumBookingNotice)
- Parameters:
minimumBookingNotice
- The minumum time that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
setMinimumBookingNoticeHours
public void setMinimumBookingNoticeHours(long minimumBookingNoticeHours)
- Parameters:
minimumBookingNoticeHours
- The minumum time in hours that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
setMinimumBookingNoticeWeeks
public void setMinimumBookingNoticeWeeks(long minimumBookingNoticeWeeks)
- Parameters:
minimumBookingNoticeWeeks
- The minumum time in weeks that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
-
setName
public void setName(String name)
- Parameters:
name
- The name of this appointment template, as entered in the backend.
-
setSlots
public void setSlots(List<AppointmentSlot> slots)
- Parameters:
slots
- The available slots of this template. Each slot is a time range where appointments can be booked.
-
setUUID
public void setUUID(String uuid)
- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a givengetClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
- Parameters:
uuid
- A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a givengetClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
setZoneId
public void setZoneId(ZoneId zoneId)
- Parameters:
zoneId
- Time zone of this appointment template.
-
setZoneIdString
public void setZoneIdString(String zoneIdString)
- Parameters:
zoneIdString
- Time zone of this appointment template.
-
-