Record Class GroupByStatsResponse
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.stats.dto.GroupByStatsResponse
public record GroupByStatsResponse(String field, StatsMetricRequest metric, List<GroupByBucket> buckets, List<StatsMetricRequest> metrics)
extends Record
Contrato canonico de resposta para agregacoes
group-by.
A resposta informa o campo agrupado, a metrica principal e a colecao de buckets retornados.
Quando a operacao roda em modo multi-metrica, metrics carrega a lista completa de
metricas efetivamente aplicadas.
-
Constructor Summary
ConstructorsConstructorDescriptionGroupByStatsResponse(String field, StatsMetricRequest metric, List<GroupByBucket> buckets) Construtor de compatibilidade para respostas de metrica unica.GroupByStatsResponse(String field, StatsMetricRequest metric, List<GroupByBucket> buckets, List<StatsMetricRequest> metrics) Creates an instance of aGroupByStatsResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuckets()Returns the value of thebucketsrecord component.Retorna a lista efetiva de metricas presentes na resposta.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.metric()Returns the value of themetricrecord component.metrics()Returns the value of themetricsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroupByStatsResponse
Construtor de compatibilidade para respostas de metrica unica. -
GroupByStatsResponse
public GroupByStatsResponse(String field, StatsMetricRequest metric, List<GroupByBucket> buckets, List<StatsMetricRequest> metrics) Creates an instance of aGroupByStatsResponserecord class.- Parameters:
field- the value for thefieldrecord componentmetric- the value for themetricrecord componentbuckets- the value for thebucketsrecord componentmetrics- the value for themetricsrecord component
-
-
Method Details
-
effectiveMetrics
Retorna a lista efetiva de metricas presentes na resposta.- Returns:
- lista efetiva de metricas, com fallback para
metric
-
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). -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
metric
Returns the value of themetricrecord component.- Returns:
- the value of the
metricrecord component
-
buckets
Returns the value of thebucketsrecord component.- Returns:
- the value of the
bucketsrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-