Record Class EngineAggregates.Definition

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.EngineAggregates.Definition
All Implemented Interfaces:
AggregationType
Enclosing class:
EngineAggregates

public static record EngineAggregates.Definition(AggregateId id, String labelKey, @Nullable DataType outputType, ParameterSchema parameterSchema, boolean takesWindowFill, boolean counter, boolean oneSampleIsSample, AggregationType.EmptyWindowBound emptyWindowBound, boolean approximate) extends Record implements AggregationType
An engine-own or shared aggregate's definition: its id, label key, output type, parameters and the predicates the pipeline reads. Reads a window's bound only when emptyWindowBound names one.
  • Constructor Details

    • Definition

      public Definition(AggregateId id, String labelKey, @Nullable DataType outputType, ParameterSchema parameterSchema, boolean takesWindowFill, boolean counter, boolean oneSampleIsSample, AggregationType.EmptyWindowBound emptyWindowBound, boolean approximate)
      Creates an instance of a Definition record class.
      Parameters:
      id - the value for the id record component
      labelKey - the value for the labelKey record component
      outputType - the value for the outputType record component
      parameterSchema - the value for the parameterSchema record component
      takesWindowFill - the value for the takesWindowFill record component
      counter - the value for the counter record component
      oneSampleIsSample - the value for the oneSampleIsSample record component
      emptyWindowBound - the value for the emptyWindowBound record component
      approximate - the value for the approximate record component
  • Method Details

    • parameters

      public EngineAggregates.Definition parameters(ParameterSchema schema)
      The same definition with parameterSchema.
    • atBound

      The same definition whose empty window answers the signal's value at side.
    • approximated

      public EngineAggregates.Definition approximated()
      The same definition marked an estimate.
    • labelled

      public EngineAggregates.Definition labelled(String key)
      The same definition labelled from key in the engine's bundle.
    • name

      public String name()
      Description copied from interface: AggregationType
      Returns the aggregate's name.
      Specified by:
      name in interface AggregationType
      Returns:
      the name.
    • description

      public LocalizedString description()
      Description copied from interface: AggregationType
      Returns the aggregate's description.
      Specified by:
      description in interface AggregationType
      Returns:
      the description.
    • dataType

      public Optional<DataType> dataType()
      Description copied from interface: AggregationType
      Returns the data type this aggregate produces regardless of its input.
      Specified by:
      dataType in interface AggregationType
      Returns:
      the type, or empty when the result takes the type of the tag it was computed over.
    • usesBounds

      public boolean usesBounds()
      Description copied from interface: AggregationType
      Returns whether the aggregate reads the signal's values at its window edges.
      Specified by:
      usesBounds in interface AggregationType
    • takesConstant

      public boolean takesConstant()
      Description copied from interface: AggregationType
      Returns whether an empty window may take a constant. Otherwise AggregationType.takesWindowFill().
      Specified by:
      takesConstant in interface AggregationType
    • 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.
    • id

      public AggregateId id()
      Returns the value of the id record component.
      Specified by:
      id in interface AggregationType
      Returns:
      the value of the id record component
    • labelKey

      public String labelKey()
      Returns the value of the labelKey record component.
      Returns:
      the value of the labelKey record component
    • outputType

      public @Nullable DataType outputType()
      Returns the value of the outputType record component.
      Returns:
      the value of the outputType record component
    • parameterSchema

      public ParameterSchema parameterSchema()
      Returns the value of the parameterSchema record component.
      Specified by:
      parameterSchema in interface AggregationType
      Returns:
      the value of the parameterSchema record component
    • takesWindowFill

      public boolean takesWindowFill()
      Returns the value of the takesWindowFill record component.
      Specified by:
      takesWindowFill in interface AggregationType
      Returns:
      the value of the takesWindowFill record component
    • counter

      public boolean counter()
      Returns the value of the counter record component.
      Specified by:
      counter in interface AggregationType
      Returns:
      the value of the counter record component
    • oneSampleIsSample

      public boolean oneSampleIsSample()
      Returns the value of the oneSampleIsSample record component.
      Specified by:
      oneSampleIsSample in interface AggregationType
      Returns:
      the value of the oneSampleIsSample record component
    • emptyWindowBound

      public AggregationType.EmptyWindowBound emptyWindowBound()
      Returns the value of the emptyWindowBound record component.
      Specified by:
      emptyWindowBound in interface AggregationType
      Returns:
      the value of the emptyWindowBound record component
    • approximate

      public boolean approximate()
      Returns the value of the approximate record component.
      Specified by:
      approximate in interface AggregationType
      Returns:
      the value of the approximate record component