Record Class UserRequestDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.user.UserRequestDTO
- Record Components:
name- String referente ao nome do usuárioemail- String referente ao email do usuáriopassword- String referente a senha do usuário
public record UserRequestDTO(@NotBlank(message="name is required") String name, @NotBlank(message="email is required") @Email String email, @NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") String password)
extends Record
Informações referentes a um usuário criado ou atualizados requeridos dentro do sistema
- Author:
- Pedro Henrique Pereira de Oliveira
-
Constructor Summary
ConstructorsConstructorDescriptionUserRequestDTO(@NotBlank(message="name is required") String name, @NotBlank(message="email is required") @Email String email, @NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") String password) Creates an instance of aUserRequestDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank(message="email is required") @Email Stringemail()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank(message="name is required") Stringname()Returns the value of thenamerecord component.@NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserRequestDTO
public UserRequestDTO(@NotBlank(message="name is required") @NotBlank(message="name is required") String name, @NotBlank(message="email is required") @Email @NotBlank(message="email is required") @Email String email, @NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") @NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") String password) Creates an instance of aUserRequestDTOrecord class.
-
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
email
@NotBlank(message="email is required") @Email public @NotBlank(message="email is required") @Email String email()Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
password
@NotBlank(message="password is required") @Size(min=8, max=12, message="password must have size 8 - 12") public @NotBlank(message="password is required") @Size(min=8,max=12,message="password must have size 8 - 12") String password()Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-