Record Class ConsultationCanceledDTO
java.lang.Object
java.lang.Record
com.mirna.hospitalmanagementapi.domain.dtos.consultation.ConsultationCanceledDTO
public record ConsultationCanceledDTO(@NotNull Long consultationId, @NotNull ReasonCancellation reasonCancellation)
extends Record
Data transfer object used to transfer data about cancellation that will be updated in a Consultation entity
- Version:
- 1.0
- Author:
- Mirna Gama
-
Constructor Summary
ConstructorsConstructorDescriptionConsultationCanceledDTO(@NotNull Long consultationId, @NotNull ReasonCancellation reasonCancellation) Creates an instance of aConsultationCanceledDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull LongReturns the value of theconsultationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull ReasonCancellationReturns the value of thereasonCancellationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConsultationCanceledDTO
public ConsultationCanceledDTO(@NotNull @NotNull Long consultationId, @NotNull @NotNull ReasonCancellation reasonCancellation) Creates an instance of aConsultationCanceledDTOrecord class.- Parameters:
consultationId- the value for theconsultationIdrecord componentreasonCancellation- the value for thereasonCancellationrecord component
-
-
Method Details
-
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. -
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. -
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). -
consultationId
Returns the value of theconsultationIdrecord component.- Returns:
- the value of the
consultationIdrecord component
-
reasonCancellation
Returns the value of thereasonCancellationrecord component.- Returns:
- the value of the
reasonCancellationrecord component
-