Class FeatureQuery
- All Implemented Interfaces:
AutoCloseable
It is a combination of:
All of these are optional.The query implementation must use all settings on the Query instance. For example, if both a bounds and a condition are specified, the query implementation must take both the bounds and the condition into account.
Create an empty Query to get all objects. When both a condition and feature ids are provided in the Query the objects need to fulfill both.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilderto create a FeatureQuery.static final classSortOperatorclass contains a list of properties that must be taken into account for sorting.static enumSort order.static final classSortPropertyclass defines the property name and the sort order for theSortOperator. -
Method Summary
Modifier and TypeMethodDescriptionstatic FeatureQueryall()This method is a convenience factory method that creates a query to retrieve all features.voidclose()protected voidfinalize()Returns the bounds the queried features must interact with.Returns the query cancellation token.Returns the condition that should be applied on the query, if any.Returns the features to retrieve by id.getLimit()Returns the maximum number of elements to query, if any.Returns the scale level index.Returns the sorting order that should be applied on the query, if any.Returns the maximum number of features that can be handled byIFeatureModel#querywithout terminating the query.static FeatureQuery.BuilderReturns the builder class for creation of the feature query.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Returns the builder class for creation of the feature query.- Returns:
- the builder class for creation of the feature query.
-
all
This method is a convenience factory method that creates a query to retrieve all features.- Returns:
- a query to retrieve all features.
-
getBounds
Returns the bounds the queried features must interact with.- Returns:
- the bounds the queried features must interact with.
-
getCondition
Returns the condition that should be applied on the query, if any.- Returns:
- the condition that should be applied on the query, if any.
-
getFeatureIds
Returns the features to retrieve by id.- Returns:
- the features to retrieve by id.
-
getSortBy
Returns the sorting order that should be applied on the query, if any.- Returns:
- the sorting order that should be applied on the query, if any.
-
getLimit
Returns the maximum number of elements to query, if any.- Returns:
- the maximum number of elements to query, if any.
-
getScaleLevelIndex
Returns the scale level index.If
null, the model should return features from all scale levels that match the query.If you configure a
FeatureLayerto have scale breaks using aFeatureQueryConfiguration, the layer may include the index of the chosen scale level when querying your model.- Returns:
- the scale level index, if any.
- Since:
- 2025.0.04
-
getTooManyFeaturesCount
Returns the maximum number of features that can be handled byIFeatureModel#querywithout terminating the query.If the query corresponds to more features than this number, the model should abort the query as soon as possible, preferably at the start of the
IFeatureModel#querycall and without returning any features. Before terminating, the feature model should callIFeatureQueryCallback#handleTerminationwith aFeatureQueryTerminationthat has as reasonTooManyFeatures.- Returns:
- the maximum number of features this query can handle.
- Since:
- 2026.0
-
getCancellationToken
Returns the query cancellation token.- Returns:
- the query cancellation token.
- Since:
- 2026.0
-