Package com.ehealthsystem.doctor
Class DoctorTimeSlot
java.lang.Object
com.ehealthsystem.doctor.DoctorTimeSlot
Class used to represent a time slot (for whatever doctor that is currently shown in the UI)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDoctorTimeSlot
(LocalDate date, LocalTime time, boolean free) Constructor which sets the attributes when creating a new object (Doctor time slot). -
Method Summary
Modifier and TypeMethodDescriptiongetDate()
Return the Date of the Time slot.boolean
getFree()
Return the availability of the Doctor.static ArrayList<DoctorTimeSlot>
getFreeTimeSlots
(LocalDate date, Doctor doctor) Get a list of possible time slots, including whether they are free or notgetTime()
Return the time of the time slot.
-
Field Details
-
date
-
time
-
free
private boolean free
-
-
Constructor Details
-
DoctorTimeSlot
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
Return the Date of the Time slot.- Returns:
- The date is an object of the type LocalDate.
-
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
-