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>>
@Entity public class AppointmentSlot extends AbstractLockableEntity
Describes an available slot (time range) of anAppointmentTemplate.- Since:
 - 6.5.0
 - Author:
 - XIMA MEDIA GmbH
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringATTR_APPOINTMENT_TEMPLATEJPA attribute name for thegetAppointmentTemplate()field.static StringATTR_DAY_OF_WEEKJPA attribute name for thegetDayOfWeek()field.static StringATTR_TIME_FROMJPA attribute name for thegetTimeFrom()field.static StringATTR_TIME_UNTILJPA attribute name for thegetTimeUntil()field.static StringCOL_APPOINTMENT_TEMPLATEDatabase column name for thegetAppointmentTemplate()field.static StringCOL_DAY_OF_WEEKDatabase column name for thegetDayOfWeek()field.static StringCOL_TIME_FROMDatabase column name for thegetTimeFrom()field.static StringCOL_TIME_UNTILDatabase column name for thegetTimeUntil()field.- 
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.ITransferableEntity
IMPORT_ID, INVALID_ID 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AppointmentSlot() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AppointmentTemplategetAppointmentTemplate()DayOfWeekgetDayOfWeek()LonggetId()StringgetKey()com.google.common.collect.Range<LocalTime>getTime()LocalTimegetTimeFrom()LocalTimegetTimeUntil()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, 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_APPOINTMENT_TEMPLATE
public static final String ATTR_APPOINTMENT_TEMPLATE
JPA attribute name for thegetAppointmentTemplate()field.- See Also:
 - Constant Field Values
 
 
- 
ATTR_DAY_OF_WEEK
public static final String ATTR_DAY_OF_WEEK
JPA attribute name for thegetDayOfWeek()field.- See Also:
 - Constant Field Values
 
 
- 
ATTR_TIME_FROM
public static final String ATTR_TIME_FROM
JPA attribute name for thegetTimeFrom()field.- See Also:
 - Constant Field Values
 
 
- 
ATTR_TIME_UNTIL
public static final String ATTR_TIME_UNTIL
JPA attribute name for thegetTimeUntil()field.- See Also:
 - Constant Field Values
 
 
- 
COL_APPOINTMENT_TEMPLATE
public static final String COL_APPOINTMENT_TEMPLATE
Database column name for thegetAppointmentTemplate()field.- See Also:
 - Constant Field Values
 
 
- 
COL_DAY_OF_WEEK
public static final String COL_DAY_OF_WEEK
Database column name for thegetDayOfWeek()field.- See Also:
 - Constant Field Values
 
 
- 
COL_TIME_FROM
public static final String COL_TIME_FROM
Database column name for thegetTimeFrom()field.- See Also:
 - Constant Field Values
 
 
- 
COL_TIME_UNTIL
public static final String COL_TIME_UNTIL
Database column name for thegetTimeUntil()field.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getId
public Long getId()
 
- 
getAppointmentTemplate
public AppointmentTemplate getAppointmentTemplate()
- Returns:
 - The appointment template for which this slot was created.
 
 
- 
getDayOfWeek
public DayOfWeek getDayOfWeek()
- Returns:
 - The week day of this slot, from Monday to Sunday. Each slot can be assigned to one day only.
 
 
- 
getKey
public String getKey()
- Returns:
 - A unique ID of this appointment slot. Two appointment slots objects are equal if and only if their IDs are equal.
 
 
- 
getTime
public com.google.common.collect.Range<LocalTime> 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
public LocalTime getTimeFrom()
- Returns:
 - The start of this appointment slot, on the 
getDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate(). 
 
- 
getTimeUntil
public LocalTime getTimeUntil()
- Returns:
 - The end time of this appointment slot, on the 
getDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate(). 
 
- 
setAppointmentTemplate
public void setAppointmentTemplate(AppointmentTemplate appointmentTemplate)
- Parameters:
 appointmentTemplate- The appointment template for which this slot was created.
 
- 
setDayOfWeek
public void setDayOfWeek(DayOfWeek dayOfWeek)
- 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
public void setTimeFrom(LocalTime timeFrom)
- 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
public void setTimeUntil(LocalTime timeUntil)
- Parameters:
 timeUntil- The start of this appointment slot, on thegetDayOfWeek(). This is in the time zone defined by correspondingAppointmentTemplate.getZoneId()(seegetAppointmentTemplate().
 
 - 
 
 -