Record Class ReservationDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ReservationDTO
- Record Components:
id- TheReservation.id.applicantId- TheActor.idof theReservation.applicant.requestDate- TheReservation.requestDate.startDate- TheReservation.startDate.endDate- TheReservation.endDate.roomId- TheRoom.idof theReservation.room.requiredIndividualEquipment- TheReservation.requiredIndividualEquipment. The keys are the required IndividualEquipmentTypes, and the values are their corresponding quantities.requiredCommonEquipment- The CommonEquipmentTypes present in theReservation.requiredCommonEquipment.accessibilityRequired- TheReservation.accessibilityRequiredflag.intendedUse- TheReservation.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 Summary
FieldsModifier and TypeFieldDescriptionprivate final BooleanThe field for theaccessibilityRequiredrecord component.private final @NonNull LongThe field for theapplicantIdrecord component.private final @NonNull LocalDateTimeThe field for theendDaterecord component.private final @NonNull LongThe field for theidrecord component.private final @NonNull IntendedUseThe field for theintendedUserecord component.private final @NonNull LocalDateTimeThe field for therequestDaterecord component.private final Set<CommonEquipmentType> The field for therequiredCommonEquipmentrecord component.private final Map<IndividualEquipmentType, Integer> The field for therequiredIndividualEquipmentrecord component.private final @NonNull LongThe field for theroomIdrecord component.private final @NonNull DoubleThe field for thescorerecord component.private final @NonNull LocalDateTimeThe field for thestartDaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionReservationDTO(@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) Creates an instance of aReservationDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessibilityRequiredrecord component.@NonNull LongReturns the value of theapplicantIdrecord component.@NonNull LocalDateTimeendDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull Longid()Returns the value of theidrecord component.@NonNull IntendedUseReturns the value of theintendedUserecord component.@NonNull LocalDateTimeReturns the value of therequestDaterecord component.Returns the value of therequiredCommonEquipmentrecord component.Returns the value of therequiredIndividualEquipmentrecord component.@NonNull LongroomId()Returns the value of theroomIdrecord component.@NonNull Doublescore()Returns the value of thescorerecord component.@NonNull LocalDateTimeReturns the value of thestartDaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
-
applicantId
The field for theapplicantIdrecord component. -
requestDate
The field for therequestDaterecord component. -
startDate
The field for thestartDaterecord component. -
endDate
The field for theendDaterecord component. -
roomId
-
requiredIndividualEquipment
The field for therequiredIndividualEquipmentrecord component. -
requiredCommonEquipment
The field for therequiredCommonEquipmentrecord component. -
accessibilityRequired
The field for theaccessibilityRequiredrecord component. -
intendedUse
The field for theintendedUserecord component. -
score
The field for thescorerecord component.
-
-
Constructor Details
-
ReservationDTO
public ReservationDTO(@NonNull @NonNull Long id, @NonNull @NonNull Long applicantId, @NonNull @NonNull LocalDateTime requestDate, @NonNull @NonNull LocalDateTime startDate, @NonNull @NonNull LocalDateTime endDate, @NonNull @NonNull Long roomId, Map<IndividualEquipmentType, Integer> requiredIndividualEquipment, Set<CommonEquipmentType> requiredCommonEquipment, Boolean accessibilityRequired, @NonNull @NonNull IntendedUse intendedUse, @NonNull @NonNull Double score) Creates an instance of aReservationDTOrecord class.- Parameters:
id- the value for theidrecord componentapplicantId- the value for theapplicantIdrecord componentrequestDate- the value for therequestDaterecord componentstartDate- the value for thestartDaterecord componentendDate- the value for theendDaterecord componentroomId- the value for theroomIdrecord componentrequiredIndividualEquipment- the value for therequiredIndividualEquipmentrecord componentrequiredCommonEquipment- the value for therequiredCommonEquipmentrecord componentaccessibilityRequired- the value for theaccessibilityRequiredrecord componentintendedUse- the value for theintendedUserecord componentscore- the value for thescorerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
id
-
applicantId
Returns the value of theapplicantIdrecord component.- Returns:
- the value of the
applicantIdrecord component
-
requestDate
Returns the value of therequestDaterecord component.- Returns:
- the value of the
requestDaterecord component
-
startDate
-
endDate
-
roomId
-
requiredIndividualEquipment
Returns the value of therequiredIndividualEquipmentrecord component.- Returns:
- the value of the
requiredIndividualEquipmentrecord component
-
requiredCommonEquipment
Returns the value of therequiredCommonEquipmentrecord component.- Returns:
- the value of the
requiredCommonEquipmentrecord component
-
accessibilityRequired
Returns the value of theaccessibilityRequiredrecord component.- Returns:
- the value of the
accessibilityRequiredrecord component
-
intendedUse
Returns the value of theintendedUserecord component.- Returns:
- the value of the
intendedUserecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-