Record Class HistorianQueryEntry.AggregatedEntry

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.binding.HistorianQueryEntry.AggregatedEntry
All Implemented Interfaces:
HistorianQueryEntry
Enclosing interface:
HistorianQueryEntry

public static record HistorianQueryEntry.AggregatedEntry(String alias, QualifiedPath source, @Nullable List<AggregateId> aggregateIds, Map<String,Object> parameters, @Nullable FillMode fillMode, boolean appendOnly, @Nullable Interpolation interpolation, @Nullable Double fillValue) extends Record implements HistorianQueryEntry
Aggregated data-point entry: the aggregate identity, optional aggregate parameters, fill, interpolation and constant.

parameters holds aggregate parameters (for example {"percentile": 0.95}) as a plain map so the config round-trips without the aggregate catalog; they are typed at query time through ParameterSchema.fromMap(...). Pass Map.of() for an aggregate with none.

A null aggregateIds inherits the binding-level defaultAggregateId, falling back to AVERAGE; a null fillMode inherits defaultFillMode, falling back to FillMode.AUTO; a null interpolation takes the binding-level interpolation. fillValue is the constant a FillMode.CONSTANT fill gives an empty window. ofInheriting(String, QualifiedPath) builds an entry that inherits everything.

  • Constructor Details

    • AggregatedEntry

      public AggregatedEntry(String alias, QualifiedPath source, @Nullable @Nullable List<AggregateId> aggregateIds, Map<String,Object> parameters, @Nullable @Nullable FillMode fillMode, boolean appendOnly)
      An entry under the binding's interpolation with no constant.
    • AggregatedEntry

      public AggregatedEntry(String alias, QualifiedPath source, @Nullable @Nullable List<AggregateId> aggregateIds, Map<String,Object> parameters, @Nullable @Nullable FillMode fillMode, boolean appendOnly, @Nullable @Nullable Interpolation interpolation, @Nullable @Nullable Double fillValue)
      Creates an instance of a AggregatedEntry record class.
      Parameters:
      alias - the value for the alias record component
      source - the value for the source record component
      aggregateIds - the value for the aggregateIds record component
      parameters - the value for the parameters record component
      fillMode - the value for the fillMode record component
      appendOnly - the value for the appendOnly record component
      interpolation - the value for the interpolation record component
      fillValue - the value for the fillValue record component
  • Method Details

    • aggregateId

      @Nullable public @Nullable AggregateId aggregateId()
      Returns the first aggregate id, or null when the entry inherits the binding-level default. Wide and Tall entries have exactly one; for Calculations entries use aggregateIds() for the full set.
    • withAlias

      public HistorianQueryEntry.AggregatedEntry withAlias(String newAlias)
    • withSource

      public HistorianQueryEntry.AggregatedEntry withSource(QualifiedPath newSource)
    • withFillMode

      public HistorianQueryEntry.AggregatedEntry withFillMode(@Nullable @Nullable FillMode newFillMode)
    • withInterpolation

      public HistorianQueryEntry.AggregatedEntry withInterpolation(@Nullable @Nullable Interpolation newInterpolation)
    • withFillValue

      public HistorianQueryEntry.AggregatedEntry withFillValue(@Nullable @Nullable Double newFillValue)
    • withAppendOnly

      public HistorianQueryEntry.AggregatedEntry withAppendOnly(boolean newAppendOnly)
    • withAggregateIds

      public HistorianQueryEntry.AggregatedEntry withAggregateIds(@Nullable @Nullable List<AggregateId> newAggregateIds)
    • withParameters

      public HistorianQueryEntry.AggregatedEntry withParameters(Map<String,Object> newParameters)
    • of

      public static HistorianQueryEntry.AggregatedEntry of(String alias, QualifiedPath source)
      Creates an entry with the average aggregate, no parameters, FillMode.AUTO, and append-only off.
    • ofInheriting

      public static HistorianQueryEntry.AggregatedEntry ofInheriting(String alias, QualifiedPath source)
      Creates an entry that inherits the binding-level aggregate and fill mode, with no parameters and append-only off.
    • 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.
    • alias

      public String alias()
      Returns the value of the alias record component.
      Specified by:
      alias in interface HistorianQueryEntry
      Returns:
      the value of the alias record component
    • source

      public QualifiedPath source()
      Returns the value of the source record component.
      Specified by:
      source in interface HistorianQueryEntry
      Returns:
      the value of the source record component
    • aggregateIds

      @Nullable public @Nullable List<AggregateId> aggregateIds()
      Returns the value of the aggregateIds record component.
      Returns:
      the value of the aggregateIds record component
    • parameters

      public Map<String,Object> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component
    • fillMode

      @Nullable public @Nullable FillMode fillMode()
      Returns the value of the fillMode record component.
      Returns:
      the value of the fillMode record component
    • appendOnly

      public boolean appendOnly()
      Returns the value of the appendOnly record component.
      Specified by:
      appendOnly in interface HistorianQueryEntry
      Returns:
      the value of the appendOnly record component
    • interpolation

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

      @Nullable public @Nullable Double fillValue()
      Returns the value of the fillValue record component.
      Returns:
      the value of the fillValue record component