Class AbstractQueryOptions.BaseBuilder<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>, B extends AbstractQueryOptions.BaseBuilder<K,T,B>>
java.lang.Object
com.inductiveautomation.historian.common.model.options.AbstractQueryOptions.BaseBuilder<K,T,B>
- Type Parameters:
K- the query key type.T- the point type.B- the builder type.
- Direct Known Subclasses:
AnnotationQueryOptions.Builder, DataPointQueryOptions.DataQueryBuilder, MetadataQueryOptions.Builder
- Enclosing class:
AbstractQueryOptions<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>
public abstract static class AbstractQueryOptions.BaseBuilder<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>, B extends AbstractQueryOptions.BaseBuilder<K,T,B>>
extends Object
Base builder for
AbstractQueryOptions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> BaddPropertyValue(Property<V> property, V value) Adds an extended property value.addPropertyValues(PropertySet properties) Adds extended property values.addQueryKey(K key) Adds a query key.addQueryKeys(Collection<K> keys) Adds query keys.abstract AbstractQueryOptions<K, T> build()Builds the options.protected @Nullable TimeRangeDerives the time range from the start time, end time and range.Removes all query keys.endTime(long endTime) Sets the end time.Sets the end time.Excludes the bounds from the time range.Includes the bounds in the time range.rangeHours(int hours) Adds hours to the time range.rangeMinutes(int minutes) Adds minutes to the time range.rangeSeconds(int seconds) Adds seconds to the time range.returnSize(@Nullable Integer returnSize) Sets the maximum number of results.protected abstract Bself()startTime(long startTime) Sets the start time.Sets the start time.
-
Field Details
-
queryKeys
-
returnSize
-
-
Constructor Details
-
BaseBuilder
protected BaseBuilder() -
BaseBuilder
-
-
Method Details
-
includeBounds
Includes the bounds in the time range. -
excludeBounds
Excludes the bounds from the time range. -
startTime
-
startTime
Sets the start time.- Parameters:
startTime- the start time in epoch milliseconds.- Returns:
- this builder.
-
endTime
-
endTime
Sets the end time.- Parameters:
endTime- the end time in epoch milliseconds.- Returns:
- this builder.
-
rangeHours
Adds hours to the time range.- Parameters:
hours- the hours to add.- Returns:
- this builder.
-
rangeMinutes
Adds minutes to the time range.- Parameters:
minutes- the minutes to add.- Returns:
- this builder.
-
rangeSeconds
Adds seconds to the time range.- Parameters:
seconds- the seconds to add.- Returns:
- this builder.
-
returnSize
-
addPropertyValue
-
addPropertyValues
Adds extended property values.- Parameters:
properties- the properties to add.- Returns:
- this builder.
-
addQueryKey
-
addQueryKeys
Adds query keys.- Parameters:
keys- the keys.- Returns:
- this builder.
-
clearQueryKeys
-
self
-
build
-
calculateTimeRange
Derives the time range from the start time, end time and range.- Returns:
- the range, or
nullif none can be determined. - Throws:
IllegalArgumentException- if an end time is set without a start time or range.
-