Class Appointment

java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
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>>

Describes a booked appointment. The available times are defined by the AppointmentTemplate.
Since:
6.5.0
Author:
XIMA MEDIA GmbH
See Also:
  • Field Details

  • Constructor Details

    • Appointment

      public Appointment()
  • Method Details

    • 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.
    • getId

      public Long getId()
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
    • 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.
      Specified by:
      getMandant in interface IMandantDependent
      Returns:
      The client to which this event belongs.
    • getStatus

      public EAppointmentStatus getStatus()
      Specified by:
      getStatus in interface IEffectiveAppointmentStatusProviding
      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()
      Specified by:
      getUUID in interface IUUIDEntity
      Returns:
      UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context, e.g. Mandant, Projekt, ...
    • getUUIDObject

      public UUID getUUIDObject()
      Specified by:
      getUUIDObject in interface IUUIDEntity
    • getVorgang

      @Deprecated public Vorgang getVorgang()
      Deprecated.
      Specified by:
      getVorgang in interface IVorgangDependent
      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 interface IEffectiveAppointmentStatusProviding
      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 be null 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.
      Specified by:
      setMandant in interface IMandantDependent
      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)
      Specified by:
      setUUID in interface IUUIDEntity
    • 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 be null 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.