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, extendingTemporalPointType
andQueryablePointType
.
- 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 class
AbstractQueryOptions.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 PropertySet
protected final Integer
protected final TimeRange
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractQueryOptions
(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, wait
Methods 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:QueryOptions
Retrieves the list of query keys associated with the query.- Specified by:
getQueryKeys
in interfaceQueryOptions<K extends QueryKey<T>,
T extends TemporalPointType & QueryablePointType<T>> - Returns:
- A
List
of query keys of typeK
.
-
getTimeRange
Description copied from interface:QueryOptions
Retrieves the optional time range for the query.- Specified by:
getTimeRange
in interfaceQueryOptions<K extends QueryKey<T>,
T extends TemporalPointType & QueryablePointType<T>> - Returns:
- An
Optional
containing theTimeRange
, or empty if not specified.
-
getReturnSize
Description copied from interface:QueryOptions
Retrieves the optional return size for the query.- Specified by:
getReturnSize
in interfaceQueryOptions<K extends QueryKey<T>,
T extends TemporalPointType & QueryablePointType<T>> - Returns:
- An
Optional
containing the return size as anInteger
, or empty if not specified.
-
toString
-
getExtendedProperties
Retrieves the extended properties of the query options.- Returns:
- The
PropertySet
containing 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
Optional
containing the property value, or empty if not set.
-