public interface FeatureQuery extends DataQuery, Cloneable, SupportJson
A FeatureQuery is always defined by a FeatureType, or by the list of attribute names of the FeatureStore to return.
The filter allows to select Features whose properties have values with the characteristics defined by the filter.
The order is used to set the order of the result FeatureCollection, based on the values of the properties of the Features.
The scale parameter can be used by the FeatureStore as a hint about the quality or resolution of the data needed to view or operate with the data returned. As an example, the FeatureStore may use the scale to return only a representative subset of the data, or maybe to return Features with less detail, like a point or a line instead of a polygon.
If an implementation of FeatureStore is able to get other parameters to customize the behavior of the getDataCollection methods, there is an option to set more parameters through the setAttribute method.
Modifier and Type | Field and Description |
---|---|
static int |
NO_LIMIT |
Modifier and Type | Method and Description |
---|---|
void |
addAggregate(java.lang.String funcName,
java.lang.String columnName) |
void |
addAttributeName(java.lang.String attributeName)
Adds the name of an attribute that has to be used to load each
Feature . |
void |
addConstantAttributeName(java.lang.String attributeName)
Add an attribute name that will be treated as constant for each
Feature . |
void |
addEssentialAttributeNames(FeatureStore store) |
void |
addFilter(Evaluator filter)
Adds a filter to apply to the
Feature s to load. |
void |
addFilter(Expression filter) |
void |
addFilter(java.lang.String filter) |
void |
addPrimaryKeyAttributeNames(FeatureStore store) |
void |
clearAttributeNames()
Remove all the attribute names specifieds.
|
void |
clearConstantsAttributeNames()
Remove all the names specified as constants attributes.
|
void |
clearFilter() |
void |
clearLimit() |
void |
copyFrom(FeatureQuery query) |
java.lang.String |
getAggregate(java.lang.String name)
Deprecated.
|
java.lang.String |
getAggregate(java.lang.String tableName,
java.lang.String name) |
java.lang.String |
getAggregateFunction(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getAggregateFunctions()
Return the aggregate functions useds for every attribute of the feature.
|
java.lang.String[] |
getAttributeNames()
Returns the names of the attributes to load from each
Feature . |
java.lang.String[] |
getConstantsAttributeNames()
Returns the names of the attributes that are constants in each
Feature . |
FeatureQuery |
getCopy() |
Expression |
getExpressionFilter()
Return the Expression associated to the filter.
|
FeatureExtraColumns |
getExtraColumn() |
FeatureExtraColumns |
getExtraColumns()
Extra local columns to the query.
|
java.lang.String |
getFeatureTypeId()
Returns the
FeatureType id of the Feature s to load. |
Evaluator |
getFilter()
Returns the filter to apply to the
Feature s to load. |
java.util.List<java.lang.String> |
getGroupByColumns()
Return the names of attributes for group the features.
|
long |
getLimit()
Returns the maximum number of elements to return with this query.
|
FeatureQueryOrder |
getOrder()
Returns the order of the
Feature s to load. |
long |
getPageSize()
Returns the load page size, as the number of elements to be retrieved in
block by the data source.
|
MutableSymbolTable |
getSymbolTable() |
boolean |
hasAggregateFunctions() |
boolean |
hasAttributeNames()
Return true if has set attribute names
|
boolean |
hasConstantsAttributeNames()
Return true if has set constants attribute names
|
boolean |
hasFilter()
Returns if a filter has been defined for the query.
|
boolean |
hasGroupByColumns() |
boolean |
hasLimit() |
boolean |
hasOrder()
Returns if an order has been set for the elements returned by the query.
|
boolean |
isAggregate(java.lang.String name) |
boolean |
isAGroupByColumn(java.lang.String name) |
boolean |
isUseSubquery()
Returns true if a subquery should be used.
|
void |
removeAggregateFunction(java.lang.String colname) |
void |
removeGroupByColumn(java.lang.String colname) |
void |
retrievesAllAttributes() |
void |
setAttributeNames(java.lang.String[] attributeNames)
Sets the names of the attributes to load from each
Feature . |
void |
setConstantsAttributeNames(java.lang.String[] attributeNames)
Set of attribute names to be treated as constants for each
Feature . |
void |
setFeatureType(FeatureType featureType)
Sets the
FeatureType of the Feature s to load. |
void |
setFeatureTypeId(java.lang.String featureTypeId)
Sets the
FeatureType id of the Feature s to load. |
void |
setFilter(Evaluator filter)
Sets the filter to apply to the
Feature s to load. |
void |
setFilter(Expression filter) |
void |
setFilter(java.lang.String filter) |
void |
setLimit(long limit)
Sets the maximum number of elements to return with this query.
|
void |
setOrder(FeatureQueryOrder order)
Sets the order of the
Feature s to load. |
void |
setPageSize(long pageSize)
Sets the load page size, as the number of elements to be retrieved in block
by the data source.
|
void |
setSymbolTable(MutableSymbolTable symbolTable) |
void |
setUseSubquery(boolean useSubquery)
Indicates whether to use a subquery or not in case the connection has
an sql indicated.
|
void |
setVar(java.lang.String name,
java.lang.Object value)
Set a variable in the symbol table associated to this searchPanel.
|
getQueryParameter, getScale, setQueryParameter, setScale
loadFromState, saveToState
clone, cloneQuietly, cloneQuietly
fromJson
toJson, toJson, toJsonBuilder, toJsonBuilder
static final int NO_LIMIT
java.lang.String[] getAttributeNames()
Feature
.void setAttributeNames(java.lang.String[] attributeNames)
Feature
.attributeNames
- the attribute names to loadvoid retrievesAllAttributes()
void addAttributeName(java.lang.String attributeName)
Feature
.attributeName
- the attribute name to loadvoid addPrimaryKeyAttributeNames(FeatureStore store)
void addEssentialAttributeNames(FeatureStore store)
boolean hasAttributeNames()
void clearAttributeNames()
java.lang.String[] getConstantsAttributeNames()
Feature
. These attributes will not be charged.void setConstantsAttributeNames(java.lang.String[] attributeNames)
Feature
.attributeNames
- the attribute names to be constantsvoid addConstantAttributeName(java.lang.String attributeName)
Feature
.attributeName
- the attribute name to be treated as constantboolean hasConstantsAttributeNames()
void clearConstantsAttributeNames()
void setFeatureType(FeatureType featureType)
FeatureType
of the Feature
s to load. It may be
used as an alternative way to set a subset of the list of attribute names
to load, by creating a sub-FeatureType.featureType
- the feature type of the data to loadjava.lang.String getFeatureTypeId()
FeatureType
id of the Feature
s to load.FeatureType
id of the Feature
s to loadvoid setFeatureTypeId(java.lang.String featureTypeId)
featureTypeId
- the FeatureType
id of the Feature
s to
loadEvaluator getFilter()
Feature
s to load.Expression getExpressionFilter()
void setFilter(Evaluator filter)
Feature
s to load.filter
- the filter to apply to the Feature
s to loadvoid setFilter(Expression filter)
void setFilter(java.lang.String filter)
void addFilter(Evaluator filter)
Feature
s to load. A query can have
more that one filter and all of them are applied when the query is applied.
If filter is null do nothing.filter
- a filter to apply to the Feature
s to loadvoid addFilter(Expression filter)
void addFilter(java.lang.String filter)
void clearFilter()
boolean hasFilter()
FeatureQueryOrder getOrder()
Feature
s to load.Feature
s to loadvoid setOrder(FeatureQueryOrder order)
Feature
s to load.order
- the order of the Feature
s to loadboolean hasOrder()
FeatureQuery getCopy()
Cloneable.clone()
long getLimit()
NOTE: this value may be ignored by the underlying data source, or only used as a hint, so don't rely on it being used, as you may actually get more values than the limit.
void setLimit(long limit)
NOTE: this value may be ignored by the underlying data source, or only used as a hint, so don't rely on it being used, as you may actually get more values than the limit.
limit
- the maximum number of elements to return with this queryvoid clearLimit()
long getPageSize()
void setPageSize(long pageSize)
pageSize
- the load page sizeboolean isUseSubquery()
void setUseSubquery(boolean useSubquery)
useSubquery
- java.util.List<java.lang.String> getGroupByColumns()
void removeGroupByColumn(java.lang.String colname)
boolean isAGroupByColumn(java.lang.String name)
boolean hasGroupByColumns()
java.util.Map<java.lang.String,java.lang.String> getAggregateFunctions()
void removeAggregateFunction(java.lang.String colname)
java.lang.String getAggregateFunction(java.lang.String name)
void addAggregate(java.lang.String funcName, java.lang.String columnName)
@Deprecated java.lang.String getAggregate(java.lang.String name)
java.lang.String getAggregate(java.lang.String tableName, java.lang.String name)
boolean isAggregate(java.lang.String name)
boolean hasAggregateFunctions()
void copyFrom(FeatureQuery query)
FeatureExtraColumns getExtraColumn()
FeatureExtraColumns getExtraColumns()
MutableSymbolTable getSymbolTable()
void setSymbolTable(MutableSymbolTable symbolTable)
void setVar(java.lang.String name, java.lang.Object value)
name
- value
- boolean hasLimit()