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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a CriarVeiculoDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    ano()
    Returns the value of the ano record component.
    @NotBlank(message="Chassi n\u00e3o pode ser vazio") String
    Returns the value of the chassi record component.
    cor()
    Returns the value of the cor record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the marca record component.
    Returns the value of the modelo record component.
    @NotBlank(message="Placa n\u00e3o pode ser vazia") @Size(min=7,max=7,message="Placa deve ter 7 caracteres") String
    Returns the value of the placa record component.
    @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") String
    Returns the value of the renavam record component.
    Returns the value of the tipo 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

    • 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 a CriarVeiculoDTO record class.
      Parameters:
      placa - the value for the placa record component
      marca - the value for the marca record component
      modelo - the value for the modelo record component
      ano - the value for the ano record component
      chassi - the value for the chassi record component
      renavam - the value for the renavam record component
      cor - the value for the cor record component
      tipo - the value for the tipo 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • 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 the placa record component.
      Returns:
      the value of the placa record component
    • marca

      public String marca()
      Returns the value of the marca record component.
      Returns:
      the value of the marca record component
    • modelo

      public String modelo()
      Returns the value of the modelo record component.
      Returns:
      the value of the modelo record component
    • ano

      public int ano()
      Returns the value of the ano record component.
      Returns:
      the value of the ano record 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 the chassi record component.
      Returns:
      the value of the chassi record component
    • renavam

      @Size(min=9, max=11, message="Renavam deve ter entre 9 e 11 caracteres") public @Size(min=9,max=11,message="Renavam deve ter entre 9 e 11 caracteres") String renavam()
      Returns the value of the renavam record component.
      Returns:
      the value of the renavam record component
    • cor

      public String cor()
      Returns the value of the cor record component.
      Returns:
      the value of the cor record component
    • tipo

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