Class OfficeWorkingDay

java.lang.Object
it.univr.passportease.entity.OfficeWorkingDay

@Entity public class OfficeWorkingDay extends Object
This class represents the working days of an office, which are defined by the day of the week, the start time and the end time. The start time and the end time are defined by two time intervals, which are optional. If the office is open only in the morning, the second time interval is not defined. If the office is open only in the afternoon, the first time interval is not defined. If the office is open all day, both time intervals are defined.
  • Field Details

    • id

      private UUID id
      The unique identifier of an OfficeWorkingDay
    • day

      @NonNull private @NonNull Day day
      The day of the week
    • startTime1

      @NonNull private @NonNull LocalTime startTime1
      The start time and the end time of the first time interval
    • endTime1

      @NonNull private @NonNull LocalTime endTime1
      The start time and the end time of the second time interval
    • startTime2

      private LocalTime startTime2
      The start time and the end time of the first time interval, can be null if the office is open only in the morning
    • endTime2

      private LocalTime endTime2
      The start time and the end time of the second time interval, can be null if the office is open only in the morning
    • office

      @NonNull private @NonNull Office office
      The office to which this working day belongs
    • createdAt

      private Date createdAt
      The date and time of the creation of this object
    • updatedAt

      private Date updatedAt
      The date and time of the last update of this object
  • Constructor Details

    • OfficeWorkingDay

      public OfficeWorkingDay()
  • Method Details

    • equals

      public final boolean equals(Object o)
      Equal Method of OfficeWorkingDay
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare with this object.
      Returns:
      true if the given object is an instance of OfficeWorkingDay and has the same id of this object, false otherwise.
    • hashCode

      public final int hashCode()
      Hash Code Method of OfficeWorkingDay
      Overrides:
      hashCode in class Object
      Returns:
      The hash code of this object.