Package de.xima.fc.entities
Class AppointmentSlot
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.AppointmentSlot
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,ILockingVersionProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
Describes an available slot (time range) of an
AppointmentTemplate.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJPA attribute name for thegetAppointmentTemplate()field.static final StringJPA attribute name for thegetDayOfWeek()field.static final StringJPA attribute name for thegetTimeFrom()field.static final StringJPA attribute name for thegetTimeUntil()field.static final StringDatabase column name for thegetAppointmentTemplate()field.static final StringDatabase column name for thegetDayOfWeek()field.static final StringDatabase column name for thegetTimeFrom()field.static final StringDatabase column name for thegetTimeUntil()field.Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, idFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()getKey()com.google.common.collect.Range<LocalTime>getTime()voidsetAppointmentTemplate(AppointmentTemplate appointmentTemplate) voidsetDayOfWeek(DayOfWeek dayOfWeek) voidsetTimeFrom(int hours, int minutes) Sets the start time of this appointment slot, on thegetDayOfWeek().voidsetTimeFrom(LocalTime timeFrom) voidsetTimeUntil(int hours, int minutes) Sets the end time of this appointment slot, on thegetDayOfWeek().voidsetTimeUntil(LocalTime timeUntil) Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersisted, setId
-
Field Details
-
ATTR_APPOINTMENT_TEMPLATE
JPA attribute name for thegetAppointmentTemplate()field.- See Also:
-
ATTR_DAY_OF_WEEK
JPA attribute name for thegetDayOfWeek()field.- See Also:
-
ATTR_TIME_FROM
JPA attribute name for thegetTimeFrom()field.- See Also:
-
ATTR_TIME_UNTIL
JPA attribute name for thegetTimeUntil()field.- See Also:
-
COL_APPOINTMENT_TEMPLATE
Database column name for thegetAppointmentTemplate()field.- See Also:
-
COL_DAY_OF_WEEK
Database column name for thegetDayOfWeek()field.- See Also:
-
COL_TIME_FROM
Database column name for thegetTimeFrom()field.- See Also:
-
COL_TIME_UNTIL
Database column name for thegetTimeUntil()field.- See Also:
-
-
Constructor Details
-
AppointmentSlot
public AppointmentSlot()
-
-
Method Details
-
getId
-
getAppointmentTemplate
- Returns:
- The appointment template for which this slot was created.
-
getDayOfWeek
- Returns:
- The week day of this slot, from Monday to Sunday. Each slot can be assigned to one day only.
-
getKey
- Returns:
- A unique ID of this appointment slot. Two appointment slots objects are equal if and only if their IDs are equal.
-
getTime
- Returns:
- The start and end time of this appointment slot, on the
getDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
-
getTimeFrom
- Returns:
- The start of this appointment slot, on the
getDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
-
getTimeUntil
- Returns:
- The end time of this appointment slot, on the
getDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
-
setAppointmentTemplate
- Parameters:
appointmentTemplate- The appointment template for which this slot was created.
-
setDayOfWeek
- Parameters:
dayOfWeek- The week day of this slot, from Monday to Sunday. Each slot can be assigned to one day only.
-
setTimeFrom
public void setTimeFrom(int hours, int minutes) Sets the start time of this appointment slot, on thegetDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().- Parameters:
hours- The hours part of the start time of this slot.minutes- The minutes part of the start time of this slot.s
-
setTimeFrom
- Parameters:
timeFrom- The start time of this appointment slot, on thegetDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
-
setTimeUntil
public void setTimeUntil(int hours, int minutes) Sets the end time of this appointment slot, on thegetDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().- Parameters:
hours- The hours part of the end time of this slot.minutes- The minutes part of the end time of this slot.s
-
setTimeUntil
- Parameters:
timeUntil- The start of this appointment slot, on thegetDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
-