Record Class StatsFieldDescriptor
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.stats.StatsFieldDescriptor
- Record Components:
field- campo canonico exposto pela APIpropertyPath- caminho de propriedade usado nas agregacoes internasmetrics- metricas agregadas permitidas para o campogroupByEligible- indica se o campo pode ser usado como bucket de group-bytimeSeriesEligible- indica se o campo pode ser usado como eixo temporaldistributionTermsEligible- indica se o campo pode ser usado em distribuicao por termosdistributionHistogramEligible- indica se o campo pode ser usado em distribuicao por histogramametricFieldEligible- indica se o campo pode ser usado comometric.field
public record StatsFieldDescriptor(String field, String propertyPath, Set<StatsMetric> metrics, boolean groupByEligible, boolean timeSeriesEligible, boolean distributionTermsEligible, boolean distributionHistogramEligible, boolean metricFieldEligible)
extends Record
Descreve um campo elegivel para stats filtrados.
O descritor conecta o nome canonico exposto na API ao propertyPath usado internamente
nas agregacoes, e declara em quais superficies estatisticas o campo pode aparecer: buckets,
eixo temporal, distribuicao ou campo de metrica.
-
Constructor Summary
ConstructorsConstructorDescriptionStatsFieldDescriptor(String field, String propertyPath, Set<StatsMetric> metrics) StatsFieldDescriptor(String field, String propertyPath, Set<StatsMetric> metrics, boolean groupByEligible, boolean timeSeriesEligible, boolean distributionTermsEligible, boolean distributionHistogramEligible, boolean metricFieldEligible) Normaliza a colecao de metricas para um conjunto imutavel. -
Method Summary
Modifier and TypeMethodDescriptionstatic StatsFieldDescriptorcategoricalGroupByBucket(String field, String propertyPath) static StatsFieldDescriptorcategoricalTermsBucket(String field, String propertyPath) booleanReturns the value of thedistributionHistogramEligiblerecord component.static StatsFieldDescriptordistributionTermsBucket(String field, String propertyPath, Set<StatsMetric> metrics) booleanReturns the value of thedistributionTermsEligiblerecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.static StatsFieldDescriptorgroupByBucket(String field, String propertyPath, Set<StatsMetric> metrics) booleanReturns the value of thegroupByEligiblerecord component.final inthashCode()Returns a hash code value for this object.static StatsFieldDescriptorhistogramField(String field, String propertyPath, Set<StatsMetric> metrics) static StatsFieldDescriptormetricField(String field, String propertyPath, Set<StatsMetric> metrics) booleanReturns the value of themetricFieldEligiblerecord component.metrics()Returns the value of themetricsrecord component.static StatsFieldDescriptornumericHistogramMeasureField(String field, String propertyPath) static StatsFieldDescriptornumericMeasureField(String field, String propertyPath) Returns the value of thepropertyPathrecord component.booleansupports(StatsMetric metric) Verifica se o campo suporta a metrica agregada informada.static StatsFieldDescriptortemporalTimeSeriesField(String field, String propertyPath) booleanReturns the value of thetimeSeriesEligiblerecord component.static StatsFieldDescriptortimeSeriesField(String field, String propertyPath) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StatsFieldDescriptor
public StatsFieldDescriptor(String field, String propertyPath, Set<StatsMetric> metrics, boolean groupByEligible, boolean timeSeriesEligible, boolean distributionTermsEligible, boolean distributionHistogramEligible, boolean metricFieldEligible) Normaliza a colecao de metricas para um conjunto imutavel. -
StatsFieldDescriptor
-
-
Method Details
-
groupByBucket
public static StatsFieldDescriptor groupByBucket(String field, String propertyPath, Set<StatsMetric> metrics) -
timeSeriesField
-
metricField
public static StatsFieldDescriptor metricField(String field, String propertyPath, Set<StatsMetric> metrics) -
histogramField
public static StatsFieldDescriptor histogramField(String field, String propertyPath, Set<StatsMetric> metrics) -
distributionTermsBucket
public static StatsFieldDescriptor distributionTermsBucket(String field, String propertyPath, Set<StatsMetric> metrics) -
categoricalGroupByBucket
-
categoricalTermsBucket
-
temporalTimeSeriesField
-
numericMeasureField
-
numericHistogramMeasureField
-
supports
Verifica se o campo suporta a metrica agregada informada.- Parameters:
metric- metrica desejada- Returns:
truequando a metrica estiver habilitada no descritor
-
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 '=='. -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
propertyPath
Returns the value of thepropertyPathrecord component.- Returns:
- the value of the
propertyPathrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-
groupByEligible
public boolean groupByEligible()Returns the value of thegroupByEligiblerecord component.- Returns:
- the value of the
groupByEligiblerecord component
-
timeSeriesEligible
public boolean timeSeriesEligible()Returns the value of thetimeSeriesEligiblerecord component.- Returns:
- the value of the
timeSeriesEligiblerecord component
-
distributionTermsEligible
public boolean distributionTermsEligible()Returns the value of thedistributionTermsEligiblerecord component.- Returns:
- the value of the
distributionTermsEligiblerecord component
-
distributionHistogramEligible
public boolean distributionHistogramEligible()Returns the value of thedistributionHistogramEligiblerecord component.- Returns:
- the value of the
distributionHistogramEligiblerecord component
-
metricFieldEligible
public boolean metricFieldEligible()Returns the value of themetricFieldEligiblerecord component.- Returns:
- the value of the
metricFieldEligiblerecord component
-