Record Class UserDTO
java.lang.Object
java.lang.Record
com.mirna.hospitalmanagementapi.domain.dtos.auth.UserDTO
public record UserDTO(@NotBlank(message="login cannot be blank") String login, @NotBlank(message="password cannot be blank") String password)
extends Record
Data transfer object used to store the user information requested to perform authentication operations
- Version:
- 1.0
- Author:
- Mirna Gama
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank(message="login cannot be blank") Stringlogin()Returns the value of theloginrecord component.@NotBlank(message="password cannot be blank") Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserDTO
public UserDTO(@NotBlank(message="login cannot be blank") @NotBlank(message="login cannot be blank") String login, @NotBlank(message="password cannot be blank") @NotBlank(message="password cannot be blank") String password) Creates an instance of aUserDTOrecord class.- Parameters:
login- the value for theloginrecord componentpassword- the value for thepasswordrecord 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). -
login
@NotBlank(message="login cannot be blank") public @NotBlank(message="login cannot be blank") String login()Returns the value of theloginrecord component.- Returns:
- the value of the
loginrecord component
-
password
@NotBlank(message="password cannot be blank") public @NotBlank(message="password cannot be blank") String password()Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-