Package org.praxisplatform.uischema.dto
Record Class OptionDTO<ID>
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.dto.OptionDTO<ID>
- Type Parameters:
ID- tipo do identificador- Record Components:
id- valor identificadorlabel- rotulo legivel ao usuarioextra- atributos adicionais opcionais
Projecao leve canonica para opcoes de selecao.
OptionDTO e o payload padrao retornado pelos endpoints /options/filter,
/options/by-ids e pelas option-sources derivadas. Ele existe para reduzir trafego,
evitar exposicao desnecessaria do DTO completo e padronizar o contrato consumido por selects,
multiselects e combos dependentes.
Uso em DTOs (@UISchema): referencie /options/filter no
endpoint e mapeie valueField/displayField para id/label.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.extra()Returns the value of theextrarecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.label()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
extra
Returns the value of theextrarecord component.- Returns:
- the value of the
extrarecord component
-