Class AbstractQueryOptions<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>>
java.lang.Object
com.inductiveautomation.historian.common.model.options.AbstractQueryOptions<K,T>
- Type Parameters:
K- The type of the query key, extendingQueryKey.T- The type of the temporal point, extendingTemporalPointTypeandQueryablePointType.
- All Implemented Interfaces:
QueryOptions<K,T>
- Direct Known Subclasses:
AnnotationQueryOptions,DataPointQueryOptions,MetadataQueryOptions
public abstract class AbstractQueryOptions<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>>
extends Object
implements QueryOptions<K,T>
Abstract base class for query options in the historian system.
This class provides a framework for defining query options, including query keys, extended properties, time range, and return size. It ensures that query keys are not empty and provides methods to retrieve these properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractQueryOptions.BaseBuilder<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>, B extends AbstractQueryOptions.BaseBuilder<K, T, B>> Abstract base class for buildingAbstractQueryOptions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PropertySetprotected final Integerprotected final TimeRange -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractQueryOptions(AbstractQueryOptions.BaseBuilder<K, T, B> builder) Constructs an instance ofAbstractQueryOptions. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the extended properties of the query options.<V> Optional<V>getExtendedPropertyValue(Property<V> property) Retrieves the value of a specific extended property.Retrieves the list of query keys associated with the query.Retrieves the optional return size for the query.Retrieves the optional time range for the query.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.historian.common.model.options.QueryOptions
getPointType
-
Field Details
-
queryKeys
-
extendedProperties
-
timeRange
-
returnSize
-
-
Constructor Details
-
AbstractQueryOptions
Constructs an instance ofAbstractQueryOptions.Validates that the query keys are not empty and initializes the time range, return size, query keys, and extended properties.
- Parameters:
builder- The builder used to construct the query options.- Throws:
IllegalArgumentException- If the query keys are empty.
-
-
Method Details
-
getQueryKeys
Description copied from interface:QueryOptionsRetrieves the list of query keys associated with the query.- Specified by:
getQueryKeysin interfaceQueryOptions<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>> - Returns:
- A
Listof query keys of typeK.
-
getTimeRange
Description copied from interface:QueryOptionsRetrieves the optional time range for the query.- Specified by:
getTimeRangein interfaceQueryOptions<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>> - Returns:
- An
Optionalcontaining theTimeRange, or empty if not specified.
-
getReturnSize
Description copied from interface:QueryOptionsRetrieves the optional return size for the query.- Specified by:
getReturnSizein interfaceQueryOptions<K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>> - Returns:
- An
Optionalcontaining the return size as anInteger, or empty if not specified.
-
toString
-
getExtendedProperties
Retrieves the extended properties of the query options.- Returns:
- The
PropertySetcontaining the extended properties.
-
getExtendedPropertyValue
Retrieves the value of a specific extended property.- Type Parameters:
V- The type of the property value.- Parameters:
property- The property to retrieve.- Returns:
- An
Optionalcontaining the property value, or empty if not set.
-