Package de.xima.fc.entities
Class Appointment
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.Appointment
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,IEffectiveAppointmentStatusProviding
,ILockingVersionProviding
,IMandantDependent
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,IVorgangDependent
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class Appointment extends AbstractLockableEntity implements IMandantDependent, IUUIDEntity, IVorgangDependent, IEffectiveAppointmentStatusProviding
Describes a booked appointment. The available times are defined by theAppointmentTemplate
.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_APPOINTMENT_TYPE
JPA attribute name for thegetAppointmentType()
field.static String
ATTR_STATUS
JPA attribute name for thegetStatus()
field.static String
ATTR_TIMESTAMP_FROM
JPA attribute name for thegetInstantFrom()
field.static String
ATTR_TIMESTAMP_UNTIL
JPA attribute name for thegetInstantUntil()
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.IMandantDependent
ATTR_MANDANT, COL_CLIENT_ID
-
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, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IVorgangDependent
ATTR_VORGANG
-
-
Constructor Summary
Constructors Constructor Description Appointment()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AppointmentType
getAppointmentType()
Mandant
getClient()
com.google.common.collect.Range<LocalDateTime>
getDateTime(ZoneId zoneId)
LocalDateTime
getDateTimeFrom(ZoneId zoneId)
LocalDateTime
getDateTimeUntil(ZoneId zoneId)
Duration
getDuration()
Vorgang
getFormRecord()
Long
getId()
com.google.common.collect.Range<Instant>
getInstant()
Instant
getInstantFrom()
Instant
getInstantUntil()
Mandant
getMandant()
Deprecated.UsegetClient()
.EAppointmentStatus
getStatus()
long
getTimestampFrom()
long
getTimestampUntil()
String
getUUID()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUID
getUUIDObject()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.Vorgang
getVorgang()
Deprecated.UsegetFormRecord()
.com.google.common.collect.Range<ZonedDateTime>
getZonedDateTime()
ZonedDateTime
getZonedDateTimeFrom()
ZonedDateTime
getZonedDateTimeUntil()
boolean
hasFormRecord()
void
setAppointmentType(AppointmentType appointmentType)
void
setClient(Mandant client)
void
setFormRecord(Vorgang formRecord)
void
setInstant(com.google.common.collect.Range<Instant> instant)
void
setInstantFrom(Instant instantFrom)
void
setInstantUntil(Instant instantUntil)
void
setMandant(Mandant client)
Deprecated.UsesetClient(Mandant)
.void
setStatus(EAppointmentStatus status)
void
setTimestampFrom(long timestampFrom)
void
setTimestampUntil(long timestampUntil)
void
setUUID(String uuid)
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.void
setUUIDObject(UUID uuid)
void
setVorgang(Vorgang formRecord)
Deprecated.void
setZonedDateTime(com.google.common.collect.Range<ZonedDateTime> dateTime)
void
setZonedDateTimeFrom(ZonedDateTime dateTimeFrom)
void
setZonedDateTimeUntil(ZonedDateTime dateTimeUntil)
-
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
-
Methods inherited from interface de.xima.fc.entities.IEffectiveAppointmentStatusProviding
getEffectiveStatus
-
-
-
-
Field Detail
-
ATTR_APPOINTMENT_TYPE
public static final String ATTR_APPOINTMENT_TYPE
JPA attribute name for thegetAppointmentType()
field.- See Also:
- Constant Field Values
-
ATTR_STATUS
public static final String ATTR_STATUS
JPA attribute name for thegetStatus()
field.- See Also:
- Constant Field Values
-
ATTR_TIMESTAMP_FROM
public static final String ATTR_TIMESTAMP_FROM
JPA attribute name for thegetInstantFrom()
field.- See Also:
- Constant Field Values
-
ATTR_TIMESTAMP_UNTIL
public static final String ATTR_TIMESTAMP_UNTIL
JPA attribute name for thegetInstantUntil()
field.- See Also:
- Constant Field Values
-
client
@NotNull protected @NotNull Mandant client
-
-
Method Detail
-
getAppointmentType
public AppointmentType getAppointmentType()
- Returns:
- The appointment type for which this event was created.
-
getClient
public Mandant getClient()
- Returns:
- The client to which this event belongs.
-
getDateTime
public com.google.common.collect.Range<LocalDateTime> getDateTime(ZoneId zoneId)
- Parameters:
zoneId
- The time zone in which to return the result.- Returns:
- The start and end date and time of this event, in the given time zone.
-
getDateTimeFrom
public LocalDateTime getDateTimeFrom(ZoneId zoneId)
- Parameters:
zoneId
- The time zone in which to return the start time.- Returns:
- The start date and time of this event, in the given time zone.
-
getDateTimeUntil
public LocalDateTime getDateTimeUntil(ZoneId zoneId)
- Parameters:
zoneId
- The time zone in which to return the end time.- Returns:
- The end date and time of this event, in the given time zone.
-
getDuration
public Duration getDuration()
- Returns:
- The duration of this appointment.
-
getFormRecord
public Vorgang getFormRecord()
- Returns:
- The form record where this appointment was booked. This may be
null
when the form record was deleted.
-
getInstant
public com.google.common.collect.Range<Instant> getInstant()
- Returns:
- The start and end point of this appointment.
-
getInstantFrom
public Instant getInstantFrom()
- Returns:
- The start point of this appointment.
-
getInstantUntil
public Instant getInstantUntil()
- Returns:
- The end point of this appointment.
-
getMandant
@Deprecated public Mandant getMandant()
Deprecated.UsegetClient()
.- Specified by:
getMandant
in interfaceIMandantDependent
- Returns:
- The client to which this event belongs.
-
getStatus
public EAppointmentStatus getStatus()
- Specified by:
getStatus
in interfaceIEffectiveAppointmentStatusProviding
- Returns:
- The current status of this appointment, e.g. whether it is booked, canceled etc.
-
getTimestampFrom
public long getTimestampFrom()
- Returns:
- The start point of this appointment as an epoch (unix timestamp) in milliseconds.
-
getTimestampUntil
public long getTimestampUntil()
- Returns:
- The end point of this appointment as an epoch (unix timestamp) in milliseconds.
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntity
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
getVorgang
@Deprecated public Vorgang getVorgang()
Deprecated.UsegetFormRecord()
.- Specified by:
getVorgang
in interfaceIVorgangDependent
- Returns:
- The form record where this appointment was booked. This may be
null
when the form record was deleted.
-
getZonedDateTime
public com.google.common.collect.Range<ZonedDateTime> getZonedDateTime()
- Returns:
- The date and time range of this event, with the time zone.
-
getZonedDateTimeFrom
public ZonedDateTime getZonedDateTimeFrom()
- Returns:
- The start date and time of this event, with the time zone.
-
getZonedDateTimeUntil
public ZonedDateTime getZonedDateTimeUntil()
- Returns:
- The end date and time of this event, with a time zone (UTC).
-
hasFormRecord
public boolean hasFormRecord()
- Specified by:
hasFormRecord
in interfaceIEffectiveAppointmentStatusProviding
- Returns:
- Whether this appointment is associated with an existing form record.
-
setAppointmentType
public void setAppointmentType(AppointmentType appointmentType)
- Parameters:
appointmentType
- The appointment type for which this event was created.
-
setClient
public void setClient(Mandant client)
- Parameters:
client
- The client to which this event belongs.
-
setFormRecord
public void setFormRecord(Vorgang formRecord)
- Parameters:
formRecord
- The form record where this appointment was booked. This may benull
when the form record was deleted.
-
setInstant
public void setInstant(com.google.common.collect.Range<Instant> instant)
- Parameters:
instant
- The new start and end point of this appointment.
-
setInstantFrom
public void setInstantFrom(Instant instantFrom)
- Parameters:
instantFrom
- The new start point of this appointment.
-
setInstantUntil
public void setInstantUntil(Instant instantUntil)
- Parameters:
instantUntil
- The new end point of this appointment.
-
setMandant
@Deprecated public void setMandant(Mandant client)
Deprecated.UsesetClient(Mandant)
.- Specified by:
setMandant
in interfaceIMandantDependent
- Parameters:
client
- The client to which this event belongs.
-
setStatus
public void setStatus(EAppointmentStatus status)
- Parameters:
status
- The current status of this appointment, e.g. whether it is booked, canceled etc.
-
setTimestampFrom
public void setTimestampFrom(long timestampFrom)
- Parameters:
timestampFrom
- The start point of this appointment as an epoch (unix timestamp) in milliseconds.
-
setTimestampUntil
public void setTimestampUntil(long timestampUntil)
- Parameters:
timestampUntil
- The end point of this appointment as an epoch (unix timestamp) in milliseconds.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntity
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopes
orproject scope
.- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- The UUID of the entity.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
- Parameters:
uuid
- The new UUID of this appointment.
-
setVorgang
@Deprecated public void setVorgang(Vorgang formRecord)
Deprecated.- Parameters:
formRecord
- The form record where this appointment was booked. This may benull
when the form record was deleted.
-
setZonedDateTime
public void setZonedDateTime(com.google.common.collect.Range<ZonedDateTime> dateTime)
- Parameters:
dateTime
- The start and end date time of this appointment.
-
setZonedDateTimeFrom
public void setZonedDateTimeFrom(ZonedDateTime dateTimeFrom)
- Parameters:
dateTimeFrom
- The start date time of this appointment.
-
setZonedDateTimeUntil
public void setZonedDateTimeUntil(ZonedDateTime dateTimeUntil)
- Parameters:
dateTimeUntil
- The end date time of this appointment.
-
-