Record Class CriarRecursoDTO
java.lang.Object
java.lang.Record
br.com.selfmaintenance.app.records.recurso.CriarRecursoDTO
-
Constructor Summary
ConstructorsConstructorDescriptionCriarRecursoDTO(@NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") String nome, @jakarta.validation.constraints.NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") int quantidade, String descricao) Creates an instance of aCriarRecursoDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescricaorecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") Stringnome()Returns the value of thenomerecord component.@jakarta.validation.constraints.NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") intReturns the value of thequantidaderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CriarRecursoDTO
public CriarRecursoDTO(@NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") @NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") String nome, @NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") @jakarta.validation.constraints.NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") int quantidade, String descricao) Creates an instance of aCriarRecursoDTOrecord class.- Parameters:
nome- the value for thenomerecord componentquantidade- the value for thequantidaderecord componentdescricao- the value for thedescricaorecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
nome
@NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") public @NotBlank(message="Nome do recurso n\u00e3o pode ser vazio") String nome()Returns the value of thenomerecord component.- Returns:
- the value of the
nomerecord component
-
quantidade
@NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") public @jakarta.validation.constraints.NotNull(message="Quantidade do recurso n\u00e3o pode ser vazia") int quantidade()Returns the value of thequantidaderecord component.- Returns:
- the value of the
quantidaderecord component
-
descricao
Returns the value of thedescricaorecord component.- Returns:
- the value of the
descricaorecord component
-