Package it.univr.passportease.entity
Class OfficeWorkingDay
java.lang.Object
it.univr.passportease.entity.OfficeWorkingDay
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 Summary
FieldsModifier and TypeFieldDescriptionprivate DateThe date and time of the creation of this objectprivate @NonNull DayThe day of the weekprivate @NonNull LocalTimeThe start time and the end time of the second time intervalprivate LocalTimeThe start time and the end time of the second time interval, can benullif the office is open only in the morningprivate UUIDThe unique identifier of anOfficeWorkingDayprivate @NonNull OfficeThe office to which this working day belongsprivate @NonNull LocalTimeThe start time and the end time of the first time intervalprivate LocalTimeThe start time and the end time of the first time interval, can benullif the office is open only in the morningprivate DateThe date and time of the last update of this object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanEqual Method ofOfficeWorkingDayfinal inthashCode()Hash Code Method ofOfficeWorkingDay
-
Field Details
-
id
The unique identifier of anOfficeWorkingDay -
day
The day of the week -
startTime1
The start time and the end time of the first time interval -
endTime1
The start time and the end time of the second time interval -
startTime2
The start time and the end time of the first time interval, can benullif the office is open only in the morning -
endTime2
The start time and the end time of the second time interval, can benullif the office is open only in the morning -
office
The office to which this working day belongs -
createdAt
The date and time of the creation of this object -
updatedAt
The date and time of the last update of this object
-
-
Constructor Details
-
OfficeWorkingDay
public OfficeWorkingDay()
-
-
Method Details
-
equals
Equal Method ofOfficeWorkingDay- Overrides:
equalsin classObject- Parameters:
o- The object to compare with this object.- Returns:
trueif the given object is an instance ofOfficeWorkingDayand has the same id of this object,falseotherwise.
-
hashCode
public final int hashCode()Hash Code Method ofOfficeWorkingDay
-