Record Class HistorianQueryBindingConfig
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.binding.HistorianQueryBindingConfig
public record HistorianQueryBindingConfig(int version, List<EngineQuerySection> engineSections, TimeRangeSpec timeRange, TimeWindow timeWindow, @Nullable Integer windowCountHint, ValueFormat valueFormat, ReturnFormat returnFormat, BindingPollingConfig polling, boolean enableValueCache, @Nullable String entriesExpr, @Nullable AggregateId defaultAggregateId, @Nullable FillMode defaultFillMode, @Nullable Double defaultFillValue, @Nullable Boolean defaultAnnotationsEnabled, @Nullable Boolean defaultMetadataEnabled, @Nullable FillMode rawCellFillMode, @Nullable Interpolation interpolation)
extends Record
Top-level config of the
historian.query Perspective binding, persisted in the view JSON.
Cache & Share keys off this record's equals and hashCode.
Each engine section maps to one engine of the runtime MultiEngineQueryOptions; EngineQuerySection.engineHistprov() pins the engine, and the section's entries must resolve to
that histprov.
Entry mode
Exactly one ofengineSections and entriesExpr carries the entries:
- Direct:
engineSectionsis non-empty andentriesExprisnull. - Expression:
engineSectionsis empty andentriesExpris a binding expression the runtime evaluates to produce entries.
Defaults
Thedefault* fields supply values when an expression-resolved entry omits a facet. In
Direct mode the per-entry values on HistorianQueryEntry.AggregatedEntry, HistorianQueryEntry.AnnotationEntry and HistorianQueryEntry.MetadataEntry take
precedence.
interpolation applies to every aggregated entry with none of its own; null
means each aggregate's default. defaultFillValue is the finite constant used by an entry
that inherits a CONSTANT defaultFillMode, which requires it.
Versioning
version() starts at 1 and is bumped by breaking config-shape changes (renamed or removed
field, changed meaning); adding an optional field does not bump it.
Immutable and thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe current wire-format version. -
Constructor Summary
ConstructorsConstructorDescriptionHistorianQueryBindingConfig(int version, List<EngineQuerySection> engineSections, TimeRangeSpec timeRange, TimeWindow timeWindow, @Nullable Integer windowCountHint, ValueFormat valueFormat, ReturnFormat returnFormat, BindingPollingConfig polling, boolean enableValueCache, @Nullable String entriesExpr, @Nullable AggregateId defaultAggregateId, @Nullable FillMode defaultFillMode, @Nullable Boolean defaultAnnotationsEnabled, @Nullable Boolean defaultMetadataEnabled, @Nullable FillMode rawCellFillMode, @Nullable Interpolation interpolation) A config with no default constant.HistorianQueryBindingConfig(int version, List<EngineQuerySection> engineSections, TimeRangeSpec timeRange, TimeWindow timeWindow, @Nullable Integer windowCountHint, ValueFormat valueFormat, ReturnFormat returnFormat, BindingPollingConfig polling, boolean enableValueCache, @Nullable String entriesExpr, @Nullable AggregateId defaultAggregateId, @Nullable FillMode defaultFillMode, @Nullable Double defaultFillValue, @Nullable Boolean defaultAnnotationsEnabled, @Nullable Boolean defaultMetadataEnabled, @Nullable FillMode rawCellFillMode, @Nullable Interpolation interpolation) Creates an instance of aHistorianQueryBindingConfigrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable AggregateIdReturns the value of thedefaultAggregateIdrecord component.@Nullable BooleanReturns the value of thedefaultAnnotationsEnabledrecord component.@Nullable FillModeReturns the value of thedefaultFillModerecord component.@Nullable DoubleReturns the value of thedefaultFillValuerecord component.@Nullable BooleanReturns the value of thedefaultMetadataEnabledrecord component.booleanReturns the value of theenableValueCacherecord component.Returns the value of theengineSectionsrecord component.@Nullable StringReturns the value of theentriesExprrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable InterpolationReturns the value of theinterpolationrecord component.polling()Returns the value of thepollingrecord component.@Nullable FillModeReturns the value of therawCellFillModerecord component.Returns the value of thereturnFormatrecord component.Returns the value of thetimeRangerecord component.Returns the value of thetimeWindowrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalueFormatrecord component.intversion()Returns the value of theversionrecord component.@Nullable IntegerReturns the value of thewindowCountHintrecord component.
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSIONThe current wire-format version.- See Also:
-
-
Constructor Details
-
HistorianQueryBindingConfig
public HistorianQueryBindingConfig(int version, List<EngineQuerySection> engineSections, TimeRangeSpec timeRange, TimeWindow timeWindow, @Nullable @Nullable Integer windowCountHint, ValueFormat valueFormat, ReturnFormat returnFormat, BindingPollingConfig polling, boolean enableValueCache, @Nullable @Nullable String entriesExpr, @Nullable @Nullable AggregateId defaultAggregateId, @Nullable @Nullable FillMode defaultFillMode, @Nullable @Nullable Boolean defaultAnnotationsEnabled, @Nullable @Nullable Boolean defaultMetadataEnabled, @Nullable @Nullable FillMode rawCellFillMode, @Nullable @Nullable Interpolation interpolation) A config with no default constant. -
HistorianQueryBindingConfig
public HistorianQueryBindingConfig(int version, List<EngineQuerySection> engineSections, TimeRangeSpec timeRange, TimeWindow timeWindow, @Nullable @Nullable Integer windowCountHint, ValueFormat valueFormat, ReturnFormat returnFormat, BindingPollingConfig polling, boolean enableValueCache, @Nullable @Nullable String entriesExpr, @Nullable @Nullable AggregateId defaultAggregateId, @Nullable @Nullable FillMode defaultFillMode, @Nullable @Nullable Double defaultFillValue, @Nullable @Nullable Boolean defaultAnnotationsEnabled, @Nullable @Nullable Boolean defaultMetadataEnabled, @Nullable @Nullable FillMode rawCellFillMode, @Nullable @Nullable Interpolation interpolation) Creates an instance of aHistorianQueryBindingConfigrecord class.- Parameters:
version- the value for theversionrecord componentengineSections- the value for theengineSectionsrecord componenttimeRange- the value for thetimeRangerecord componenttimeWindow- the value for thetimeWindowrecord componentwindowCountHint- the value for thewindowCountHintrecord componentvalueFormat- the value for thevalueFormatrecord componentreturnFormat- the value for thereturnFormatrecord componentpolling- the value for thepollingrecord componentenableValueCache- the value for theenableValueCacherecord componententriesExpr- the value for theentriesExprrecord componentdefaultAggregateId- the value for thedefaultAggregateIdrecord componentdefaultFillMode- the value for thedefaultFillModerecord componentdefaultFillValue- the value for thedefaultFillValuerecord componentdefaultAnnotationsEnabled- the value for thedefaultAnnotationsEnabledrecord componentdefaultMetadataEnabled- the value for thedefaultMetadataEnabledrecord componentrawCellFillMode- the value for therawCellFillModerecord componentinterpolation- the value for theinterpolationrecord component
-
-
Method Details
-
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. -
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
engineSections
Returns the value of theengineSectionsrecord component.- Returns:
- the value of the
engineSectionsrecord component
-
timeRange
Returns the value of thetimeRangerecord component.- Returns:
- the value of the
timeRangerecord component
-
timeWindow
Returns the value of thetimeWindowrecord component.- Returns:
- the value of the
timeWindowrecord component
-
windowCountHint
Returns the value of thewindowCountHintrecord component.- Returns:
- the value of the
windowCountHintrecord component
-
valueFormat
Returns the value of thevalueFormatrecord component.- Returns:
- the value of the
valueFormatrecord component
-
returnFormat
Returns the value of thereturnFormatrecord component.- Returns:
- the value of the
returnFormatrecord component
-
polling
Returns the value of thepollingrecord component.- Returns:
- the value of the
pollingrecord component
-
enableValueCache
public boolean enableValueCache()Returns the value of theenableValueCacherecord component.- Returns:
- the value of the
enableValueCacherecord component
-
entriesExpr
Returns the value of theentriesExprrecord component.- Returns:
- the value of the
entriesExprrecord component
-
defaultAggregateId
Returns the value of thedefaultAggregateIdrecord component.- Returns:
- the value of the
defaultAggregateIdrecord component
-
defaultFillMode
Returns the value of thedefaultFillModerecord component.- Returns:
- the value of the
defaultFillModerecord component
-
defaultFillValue
Returns the value of thedefaultFillValuerecord component.- Returns:
- the value of the
defaultFillValuerecord component
-
defaultAnnotationsEnabled
Returns the value of thedefaultAnnotationsEnabledrecord component.- Returns:
- the value of the
defaultAnnotationsEnabledrecord component
-
defaultMetadataEnabled
Returns the value of thedefaultMetadataEnabledrecord component.- Returns:
- the value of the
defaultMetadataEnabledrecord component
-
rawCellFillMode
Returns the value of therawCellFillModerecord component.- Returns:
- the value of the
rawCellFillModerecord component
-
interpolation
Returns the value of theinterpolationrecord component.- Returns:
- the value of the
interpolationrecord component
-