Class ExtendedAppointmentFreeSlot

java.lang.Object
de.xima.fc.appointment.ExtendedAppointmentFreeSlot

public final class ExtendedAppointmentFreeSlot extends Object
POJO helper class for the appointment free slot query result builder. Simliar to a AppointmentSlot, but with more info.
Since:
6.5.0
Author:
XIMA MEDIA GmbH
  • Constructor Details

    • ExtendedAppointmentFreeSlot

      public ExtendedAppointmentFreeSlot(ZonedDateTime dateTimeFrom, ZonedDateTime dateTimeUntil, long capacity)
      Creates a new slot starting at the given time and lasting for the given duration.
      Parameters:
      dateTimeFrom - Start time of the slot.
      dateTimeUntil - End time of the slot.
      capacity - Capacity of the slot, i.e. how many appointments can be booked at once for this slot.
  • Method Details

    • getCapacity

      public long getCapacity()
      Returns:
      Capacity of the slot, i.e. how many appointments can be booked at once for this slot.
    • getDateFrom

      public LocalDate getDateFrom()
      Returns:
      The start date of this slot.
    • getDateTimeUntil

      public LocalDateTime getDateTimeUntil()
      Returns:
      The end date time of this slot.
    • getDateUntil

      public LocalDate getDateUntil()
      Returns:
      The end date of this slot.
    • getInstant

      public com.google.common.collect.Range<Instant> getInstant()
      Returns:
      The start and end point of this slot.
    • getInstantFrom

      public Instant getInstantFrom()
      Returns:
      The start point of this slot.
    • getTimeFrom

      public LocalTime getTimeFrom()
      Returns:
      The start time of this slot.
    • withReducedCapacity

      public ExtendedAppointmentFreeSlot withReducedCapacity(long amountToReduce)
      Parameters:
      amountToReduce - Amount by which to reduce the capacity.
      Returns:
      A new slot, with the capacity reduced by the given amount.