Record Class AggregateDescriptor
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.query.AggregateDescriptor
public record AggregateDescriptor(AggregateId id, LocalizedString displayName, @Nullable DataType returnType, Set<DataType> acceptedInputTypes, ParameterSchema parameterSchema, String computedBy, boolean standard, boolean approximate, List<Interpolation> interpolations, Map<Interpolation, Set<FillMode>> applicableFills, Set<FillMode> legacyFills)
extends Record
Wire descriptor of one aggregate on one source; one per aggregate id per source.
computedBy names the engine that computes the aggregate, or GATEWAY.
standard is true for a platform id (StandardAggregates), which exists on every provider;
any other id is offered only where its engine serves. approximate marks an estimate two
engines may answer differently.
interpolations lists the interpolations offered, the default first;
applicableFills maps each of them to the fills that apply under it. legacyFills are the
fills of the classic tag history calculation, empty where the provider does not run it.
returnType is a nullable reference rather than an Optional so the descriptor
serializes with Gson.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAggregateDescriptor(AggregateId id, LocalizedString displayName, @Nullable DataType returnType, Set<DataType> acceptedInputTypes, ParameterSchema parameterSchema, String computedBy, boolean standard, boolean approximate, List<Interpolation> interpolations, Map<Interpolation, Set<FillMode>> applicableFills, Set<FillMode> legacyFills) Copies the collections, so direct construction cannot be mutated afterwards. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theacceptedInputTypesrecord component.Returns the value of theapplicableFillsrecord component.booleanReturns the value of theapproximaterecord component.Returns the value of thecomputedByrecord component.booleanWhether the gateway computes the aggregate.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.forInputType(DataType type) Returns this descriptor for atypecolumn: withoutInterpolation.SLOPEDfor a Boolean or String, asAggregationType.interpolations(DataType)offers it.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinterpolationsrecord component.legacyCompatibleFor(DataType type) Returns this descriptor fortype, which only the classic tag history calculation calculates:typeis accepted, underInterpolation.NONEwith no modern fills, and with the legacy fills only.Returns the value of thelegacyFillsrecord component.static AggregateDescriptorof(AggregationType t, String computedBy) Returns the value of theparameterSchemarecord component.@Nullable DataTypeReturns the value of thereturnTyperecord component.booleanstandard()Returns the value of thestandardrecord component.final StringtoString()Returns a string representation of this record class.withoutFill(FillMode fill) Returns this descriptor withoutfillunder any interpolation or the legacy route.Returns this descriptor for a provider that does not run the classic tag history calculation: no legacy fills.
-
Field Details
-
GATEWAY
ThecomputedByof an aggregate the gateway folds from raw rows.- See Also:
-
-
Constructor Details
-
AggregateDescriptor
public AggregateDescriptor(AggregateId id, LocalizedString displayName, @Nullable DataType returnType, Set<DataType> acceptedInputTypes, ParameterSchema parameterSchema, String computedBy, boolean standard, boolean approximate, List<Interpolation> interpolations, Map<Interpolation, Set<FillMode>> applicableFills, Set<FillMode> legacyFills) Copies the collections, so direct construction cannot be mutated afterwards.
-
-
Method Details
-
computedByGateway
public boolean computedByGateway()Whether the gateway computes the aggregate. -
withoutLegacyCompatible
Returns this descriptor for a provider that does not run the classic tag history calculation: no legacy fills. -
legacyCompatibleFor
Returns this descriptor fortype, which only the classic tag history calculation calculates:typeis accepted, underInterpolation.NONEwith no modern fills, and with the legacy fills only. -
forInputType
Returns this descriptor for atypecolumn: withoutInterpolation.SLOPEDfor a Boolean or String, asAggregationType.interpolations(DataType)offers it. -
withoutFill
Returns this descriptor withoutfillunder any interpolation or the legacy route. -
of
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
acceptedInputTypes
-
parameterSchema
Returns the value of theparameterSchemarecord component.- Returns:
- the value of the
parameterSchemarecord component
-
computedBy
Returns the value of thecomputedByrecord component.- Returns:
- the value of the
computedByrecord component
-
standard
public boolean standard()Returns the value of thestandardrecord component.- Returns:
- the value of the
standardrecord component
-
approximate
public boolean approximate()Returns the value of theapproximaterecord component.- Returns:
- the value of the
approximaterecord component
-
interpolations
Returns the value of theinterpolationsrecord component.- Returns:
- the value of the
interpolationsrecord component
-
applicableFills
Returns the value of theapplicableFillsrecord component.- Returns:
- the value of the
applicableFillsrecord component
-
legacyFills
-