Record Class StatsMetricRequest
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.stats.dto.StatsMetricRequest
- Record Components:
operation- operacao agregada desejadafield- campo numerico alvo quando a operacao exigir um campo explicitoalias- nome opcional e estavel para exposicao na resposta
Define uma metrica agregada solicitada pelos endpoints estatisticos.
O contrato separa a operacao agregada (COUNT, SUM, etc.) do campo alvo e de um
alias opcional. Isso permite que a mesma superficie suporte metrica unica e multi-metrica sem
introduzir formatos paralelos de payload.
-
Constructor Summary
ConstructorsConstructorDescriptionStatsMetricRequest(StatsMetric operation, String field) Construtor de compatibilidade para requests sem alias explicito.StatsMetricRequest(StatsMetric operation, String field, String alias) Creates an instance of aStatsMetricRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the value of thealiasrecord component.Resolve o alias efetivo da metrica.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StatsMetricRequest
Construtor de compatibilidade para requests sem alias explicito. -
StatsMetricRequest
Creates an instance of aStatsMetricRequestrecord class.
-
-
Method Details
-
effectiveAlias
Resolve o alias efetivo da metrica.A precedencia e:
aliasexplicito, depoisfield, e por fim o nome daoperation. Isso permite rotulos consistentes em respostas e contratos derivados.- Returns:
- alias efetivo ou
nullquando a metrica estiver incompleta
-
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). -
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-