Record Class ReservationSummaryDTO

java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ReservationSummaryDTO
Record Components:
id - The Reservation.id.
applicantId - The Actor.id of the Reservation.applicant.
requestDate - The Reservation.requestDate.
startDate - The Reservation.startDate.
endDate - The Reservation.endDate.
roomId - The Room.id of the Reservation.room.

public record ReservationSummaryDTO(@NonNull Long id, @NonNull Long applicantId, @NonNull LocalDateTime requestDate, @NonNull LocalDateTime startDate, @NonNull LocalDateTime endDate, @NonNull Long roomId) extends Record
Data-transfer object representing a Reservation.
  • Field Details

    • id

      @NonNull private final @NonNull Long id
      The field for the id record component.
    • applicantId

      @NonNull private final @NonNull Long applicantId
      The field for the applicantId record component.
    • requestDate

      @NonNull private final @NonNull LocalDateTime requestDate
      The field for the requestDate record component.
    • startDate

      @NonNull private final @NonNull LocalDateTime startDate
      The field for the startDate record component.
    • endDate

      @NonNull private final @NonNull LocalDateTime endDate
      The field for the endDate record component.
    • roomId

      @NonNull private final @NonNull Long roomId
      The field for the roomId record component.
  • Constructor Details

    • ReservationSummaryDTO

      public ReservationSummaryDTO(@NonNull @NonNull Long id, @NonNull @NonNull Long applicantId, @NonNull @NonNull LocalDateTime requestDate, @NonNull @NonNull LocalDateTime startDate, @NonNull @NonNull LocalDateTime endDate, @NonNull @NonNull Long roomId)
      Creates an instance of a ReservationSummaryDTO record class.
      Parameters:
      id - the value for the id record component
      applicantId - the value for the applicantId record component
      requestDate - the value for the requestDate record component
      startDate - the value for the startDate record component
      endDate - the value for the endDate record component
      roomId - the value for the roomId record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @NonNull public @NonNull Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • applicantId

      @NonNull public @NonNull Long applicantId()
      Returns the value of the applicantId record component.
      Returns:
      the value of the applicantId record component
    • requestDate

      @NonNull public @NonNull LocalDateTime requestDate()
      Returns the value of the requestDate record component.
      Returns:
      the value of the requestDate record component
    • startDate

      @NonNull public @NonNull LocalDateTime startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      @NonNull public @NonNull LocalDateTime endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component
    • roomId

      @NonNull public @NonNull Long roomId()
      Returns the value of the roomId record component.
      Returns:
      the value of the roomId record component