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 of engineSections and entriesExpr carries the entries:
  • Direct: engineSections is non-empty and entriesExpr is null.
  • Expression: engineSections is empty and entriesExpr is a binding expression the runtime evaluates to produce entries.
Setting both is rejected by the compact constructor; setting neither is allowed and renders no entries.

Defaults

The default* 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 Details

    • CURRENT_VERSION

      public static final int CURRENT_VERSION
      The 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 a HistorianQueryBindingConfig record class.
      Parameters:
      version - the value for the version record component
      engineSections - the value for the engineSections record component
      timeRange - the value for the timeRange record component
      timeWindow - the value for the timeWindow record component
      windowCountHint - the value for the windowCountHint record component
      valueFormat - the value for the valueFormat record component
      returnFormat - the value for the returnFormat record component
      polling - the value for the polling record component
      enableValueCache - the value for the enableValueCache record component
      entriesExpr - the value for the entriesExpr record component
      defaultAggregateId - the value for the defaultAggregateId record component
      defaultFillMode - the value for the defaultFillMode record component
      defaultFillValue - the value for the defaultFillValue record component
      defaultAnnotationsEnabled - the value for the defaultAnnotationsEnabled record component
      defaultMetadataEnabled - the value for the defaultMetadataEnabled record component
      rawCellFillMode - the value for the rawCellFillMode record component
      interpolation - the value for the interpolation record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • engineSections

      public List<EngineQuerySection> engineSections()
      Returns the value of the engineSections record component.
      Returns:
      the value of the engineSections record component
    • timeRange

      public TimeRangeSpec timeRange()
      Returns the value of the timeRange record component.
      Returns:
      the value of the timeRange record component
    • timeWindow

      public TimeWindow timeWindow()
      Returns the value of the timeWindow record component.
      Returns:
      the value of the timeWindow record component
    • windowCountHint

      @Nullable public @Nullable Integer windowCountHint()
      Returns the value of the windowCountHint record component.
      Returns:
      the value of the windowCountHint record component
    • valueFormat

      public ValueFormat valueFormat()
      Returns the value of the valueFormat record component.
      Returns:
      the value of the valueFormat record component
    • returnFormat

      public ReturnFormat returnFormat()
      Returns the value of the returnFormat record component.
      Returns:
      the value of the returnFormat record component
    • polling

      public BindingPollingConfig polling()
      Returns the value of the polling record component.
      Returns:
      the value of the polling record component
    • enableValueCache

      public boolean enableValueCache()
      Returns the value of the enableValueCache record component.
      Returns:
      the value of the enableValueCache record component
    • entriesExpr

      @Nullable public @Nullable String entriesExpr()
      Returns the value of the entriesExpr record component.
      Returns:
      the value of the entriesExpr record component
    • defaultAggregateId

      @Nullable public @Nullable AggregateId defaultAggregateId()
      Returns the value of the defaultAggregateId record component.
      Returns:
      the value of the defaultAggregateId record component
    • defaultFillMode

      @Nullable public @Nullable FillMode defaultFillMode()
      Returns the value of the defaultFillMode record component.
      Returns:
      the value of the defaultFillMode record component
    • defaultFillValue

      @Nullable public @Nullable Double defaultFillValue()
      Returns the value of the defaultFillValue record component.
      Returns:
      the value of the defaultFillValue record component
    • defaultAnnotationsEnabled

      @Nullable public @Nullable Boolean defaultAnnotationsEnabled()
      Returns the value of the defaultAnnotationsEnabled record component.
      Returns:
      the value of the defaultAnnotationsEnabled record component
    • defaultMetadataEnabled

      @Nullable public @Nullable Boolean defaultMetadataEnabled()
      Returns the value of the defaultMetadataEnabled record component.
      Returns:
      the value of the defaultMetadataEnabled record component
    • rawCellFillMode

      @Nullable public @Nullable FillMode rawCellFillMode()
      Returns the value of the rawCellFillMode record component.
      Returns:
      the value of the rawCellFillMode record component
    • interpolation

      @Nullable public @Nullable Interpolation interpolation()
      Returns the value of the interpolation record component.
      Returns:
      the value of the interpolation record component