Record Class UsuarioAutenticavelDTO

java.lang.Object
java.lang.Record
br.com.selfmaintenance.app.records.usuario.UsuarioAutenticavelDTO

public record UsuarioAutenticavelDTO(@NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") String nome, @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") String email, @NotBlank(message="Contato n\u00e3o pode ser vazio") String contato, @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") String senha, String role) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    UsuarioAutenticavelDTO(@NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") String nome, @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") String email, @NotBlank(message="Contato n\u00e3o pode ser vazio") String contato, @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") String senha, String role)
    Creates an instance of a UsuarioAutenticavelDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotBlank(message="Contato n\u00e3o pode ser vazio") String
    Returns the value of the contato record component.
    @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") String
    Returns the value of the email record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") String
    Returns the value of the nome record component.
    Returns the value of the role record component.
    @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") String
    Returns the value of the senha record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • UsuarioAutenticavelDTO

      public UsuarioAutenticavelDTO(@NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") @NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") String nome, @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") String email, @NotBlank(message="Contato n\u00e3o pode ser vazio") @NotBlank(message="Contato n\u00e3o pode ser vazio") String contato, @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") String senha, String role)
      Creates an instance of a UsuarioAutenticavelDTO record class.
      Parameters:
      nome - the value for the nome record component
      email - the value for the email record component
      contato - the value for the contato record component
      senha - the value for the senha record component
      role - the value for the role record component
  • 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.
    • nome

      @NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3, max=30, message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") public @NotBlank(message="Nome n\u00e3o pode ser vazio") @Size(min=3,max=30,message="Nome deve ter no m\u00ednimo 3 caracteres e no m\u00e1ximo 30 caracteres") String nome()
      Returns the value of the nome record component.
      Returns:
      the value of the nome record component
    • email

      @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") public @NotBlank(message="Email n\u00e3o pode ser vazio") @Email(message="Email inv\u00e1lido") String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • contato

      @NotBlank(message="Contato n\u00e3o pode ser vazio") public @NotBlank(message="Contato n\u00e3o pode ser vazio") String contato()
      Returns the value of the contato record component.
      Returns:
      the value of the contato record component
    • senha

      @Size(min=6, max=20, message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") public @Size(min=6,max=20,message="Tamanho da senha deve t\u00e1 no intervalo fechado entre 6 e 20") String senha()
      Returns the value of the senha record component.
      Returns:
      the value of the senha record component
    • role

      public String role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component