Class DoctorTimeSlot

java.lang.Object
com.ehealthsystem.doctor.DoctorTimeSlot

public class DoctorTimeSlot extends Object
Class used to represent a time slot (for whatever doctor that is currently shown in the UI)
  • Field Details

  • Constructor Details

    • DoctorTimeSlot

      public DoctorTimeSlot(LocalDate date, LocalTime time, boolean free)
      Constructor which sets the attributes when creating a new object (Doctor time slot).
      Parameters:
      date - set the date of the time slot.
      time - set the time of the time slot.
      free - set the availability of the doctor.
  • Method Details

    • getDate

      public LocalDate getDate()
      Return the Date of the Time slot.
      Returns:
      The date is an object of the type LocalDate.
    • getTime

      public LocalTime getTime()
      Return the time of the time slot.
      Returns:
      The time is an object of the type LocalTime.
    • getFree

      public boolean getFree()
      Return the availability of the Doctor.
      Returns:
      The availability as a Boolean.
    • getFreeTimeSlots

      public static ArrayList<DoctorTimeSlot> getFreeTimeSlots(LocalDate date, Doctor doctor) throws SQLException, javax.activation.UnsupportedDataTypeException
      Get a list of possible time slots, including whether they are free or not
      Parameters:
      date - The date for which time slots shall be returned.
      doctor - The doctor whose schedule shall be taken.
      Returns:
      list of time slots
      Throws:
      SQLException
      javax.activation.UnsupportedDataTypeException