Class Request

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

@Entity public class Request extends Object
The Request class is an entity that represents a request made by a Worker to the RequestType of his choice. It contains the Worker that made the request, the RequestType of the request, the duration of the request, the start and end date and time of the request, and the creation and update date of the request.
  • Field Details

    • id

      private UUID id
      The unique identifier of the Request.
    • duration

      private long duration
      The duration of the Request.
    • startDate

      @NonNull private @NonNull Date startDate
      The start date of the Request.
    • endDate

      @NonNull private @NonNull Date endDate
      The end date of the Request.
    • startTime

      @NonNull private @NonNull LocalTime startTime
      The start time of the Request.
    • endTime

      @NonNull private @NonNull LocalTime endTime
      The end time of the Request.
    • worker

      @NonNull private @NonNull Worker worker
      The Worker that made the Request.
    • requestType

      @NonNull private @NonNull RequestType requestType
      The RequestType of the Request.
    • createdAt

      private Date createdAt
      The creation date of the Request.
    • updatedAt

      private Date updatedAt
      The last update date of the Request.
  • Constructor Details

    • Request

      public Request()
  • Method Details

    • equals

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

      public final int hashCode()
      Hash code method for Request.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code of this Request.