Record Class ReservationDTO

java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ReservationDTO
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.
requiredIndividualEquipment - The Reservation.requiredIndividualEquipment. The keys are the required IndividualEquipmentTypes, and the values are their corresponding quantities.
requiredCommonEquipment - The CommonEquipmentTypes present in the Reservation.requiredCommonEquipment.
accessibilityRequired - The Reservation.accessibilityRequired flag.
intendedUse - The Reservation.intendedUse.

public record ReservationDTO(@NonNull Long id, @NonNull Long applicantId, @NonNull LocalDateTime requestDate, @NonNull LocalDateTime startDate, @NonNull LocalDateTime endDate, @NonNull Long roomId, Map<IndividualEquipmentType, Integer> requiredIndividualEquipment, Set<CommonEquipmentType> requiredCommonEquipment, Boolean accessibilityRequired, @NonNull IntendedUse intendedUse, @NonNull Double score) 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.
    • requiredIndividualEquipment

      private final Map<IndividualEquipmentType, Integer> requiredIndividualEquipment
      The field for the requiredIndividualEquipment record component.
    • requiredCommonEquipment

      private final Set<CommonEquipmentType> requiredCommonEquipment
      The field for the requiredCommonEquipment record component.
    • accessibilityRequired

      private final Boolean accessibilityRequired
      The field for the accessibilityRequired record component.
    • intendedUse

      @NonNull private final @NonNull IntendedUse intendedUse
      The field for the intendedUse record component.
    • score

      @NonNull private final @NonNull Double score
      The field for the score record component.
  • Constructor Details

  • 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
    • requiredIndividualEquipment

      public Map<IndividualEquipmentType, Integer> requiredIndividualEquipment()
      Returns the value of the requiredIndividualEquipment record component.
      Returns:
      the value of the requiredIndividualEquipment record component
    • requiredCommonEquipment

      public Set<CommonEquipmentType> requiredCommonEquipment()
      Returns the value of the requiredCommonEquipment record component.
      Returns:
      the value of the requiredCommonEquipment record component
    • accessibilityRequired

      public Boolean accessibilityRequired()
      Returns the value of the accessibilityRequired record component.
      Returns:
      the value of the accessibilityRequired record component
    • intendedUse

      @NonNull public @NonNull IntendedUse intendedUse()
      Returns the value of the intendedUse record component.
      Returns:
      the value of the intendedUse record component
    • score

      @NonNull public @NonNull Double score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component