Record Class AggregatedQueryKey

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.options.AggregatedQueryKey
Record Components:
source - The QualifiedPath representing the source of the data point.
aggregationType - The AggregationType used for the query.
fillMode - The FillMode specifying how missing data should be handled.
All Implemented Interfaces:
DataPointQueryKey, QueryKey<DataPointType>

public record AggregatedQueryKey(QualifiedPath source, AggregationType aggregationType, FillMode fillMode) extends Record implements DataPointQueryKey
Represents a key for querying aggregated data points.

This record encapsulates the source, aggregation type, and fill mode for an aggregated query. It implements the DataPointQueryKey interface and provides methods to retrieve the point type and create instances of the key with default or specified fill modes.

  • Constructor Details

    • AggregatedQueryKey

      public AggregatedQueryKey(QualifiedPath source, AggregationType aggregationType, FillMode fillMode)
      Creates an instance of a AggregatedQueryKey record class.
      Parameters:
      source - the value for the source record component
      aggregationType - the value for the aggregationType record component
      fillMode - the value for the fillMode record component
  • Method Details

    • pointType

      public DataPointType pointType()
      Retrieves the type of the data point.
      Specified by:
      pointType in interface QueryKey<DataPointType>
      Returns:
      The DataPointType, which is always StandardDataPointType.AGGREGATED.
    • of

      public static AggregatedQueryKey of(QualifiedPath source, AggregationType aggregationType)
      Creates a new AggregatedQueryKey with the specified source and aggregation type.

      The fill mode is set to FillMode.DERIVED by default.

      Parameters:
      source - The QualifiedPath representing the source of the data point.
      aggregationType - The AggregationType used for the query.
      Returns:
      A new AggregatedQueryKey instance.
    • of

      public static AggregatedQueryKey of(QualifiedPath source, AggregationType aggregationType, FillMode fillMode)
      Creates a new AggregatedQueryKey with the specified source, aggregation type, and fill mode.
      Parameters:
      source - The QualifiedPath representing the source of the data point.
      aggregationType - The AggregationType used for the query.
      fillMode - The FillMode specifying how missing data should be handled.
      Returns:
      A new AggregatedQueryKey instance.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • source

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

      public AggregationType aggregationType()
      Returns the value of the aggregationType record component.
      Returns:
      the value of the aggregationType record component
    • fillMode

      public FillMode fillMode()
      Returns the value of the fillMode record component.
      Returns:
      the value of the fillMode record component