Record Class CriarVeiculoDTO
java.lang.Object
java.lang.Record
br.com.selfmaintenance.app.records.veiculo.CriarVeiculoDTO
public record CriarVeiculoDTO(@NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") String placa, String marca, String modelo, int ano, @NotBlank(message="Chassi n\u00e3o pode ser vazio") String chassi, @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") String renavam, String cor, String tipo)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCriarVeiculoDTO(@NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") String placa, String marca, String modelo, int ano, @NotBlank(message="Chassi n\u00e3o pode ser vazio") String chassi, @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") String renavam, String cor, String tipo) Creates an instance of aCriarVeiculoDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintano()Returns the value of theanorecord component.@NotBlank(message="Chassi n\u00e3o pode ser vazio") Stringchassi()Returns the value of thechassirecord component.cor()Returns the value of thecorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.marca()Returns the value of themarcarecord component.modelo()Returns the value of themodelorecord component.@NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") Stringplaca()Returns the value of theplacarecord component.@Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") Stringrenavam()Returns the value of therenavamrecord component.tipo()Returns the value of thetiporecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CriarVeiculoDTO
public CriarVeiculoDTO(@NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") @NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") String placa, String marca, String modelo, int ano, @NotBlank(message="Chassi n\u00e3o pode ser vazio") @NotBlank(message="Chassi n\u00e3o pode ser vazio") String chassi, @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") String renavam, String cor, String tipo) Creates an instance of aCriarVeiculoDTOrecord class.- Parameters:
placa- the value for theplacarecord componentmarca- the value for themarcarecord componentmodelo- the value for themodelorecord componentano- the value for theanorecord componentchassi- the value for thechassirecord componentrenavam- the value for therenavamrecord componentcor- the value for thecorrecord componenttipo- the value for thetiporecord 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 '=='. -
placa
@NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7, max=7, message="Placa deve ter 7 caracteres") public @NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") String placa()Returns the value of theplacarecord component.- Returns:
- the value of the
placarecord component
-
marca
Returns the value of themarcarecord component.- Returns:
- the value of the
marcarecord component
-
modelo
Returns the value of themodelorecord component.- Returns:
- the value of the
modelorecord component
-
ano
public int ano()Returns the value of theanorecord component.- Returns:
- the value of the
anorecord component
-
chassi
@NotBlank(message="Chassi n\u00e3o pode ser vazio") public @NotBlank(message="Chassi n\u00e3o pode ser vazio") String chassi()Returns the value of thechassirecord component.- Returns:
- the value of the
chassirecord component
-
cor
Returns the value of thecorrecord component.- Returns:
- the value of the
correcord component
-
tipo
Returns the value of thetiporecord component.- Returns:
- the value of the
tiporecord component
-