public class DefaultFeatureQuery extends java.lang.Object implements FeatureQuery
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | SCALE_PARAM_NAME | 
NO_LIMIT| Constructor and Description | 
|---|
| DefaultFeatureQuery()Creates a FeatureQuery which will load all available Features of a type. | 
| DefaultFeatureQuery(FeatureType featureType)Creates a FeatureQuery which will load all available Features of a type. | 
| DefaultFeatureQuery(FeatureType featureType,
                   Evaluator filter)Creates a FeatureQuery with the type of features, a filter and the order
 for the FeatureCollection. | 
| DefaultFeatureQuery(FeatureType featureType,
                   Evaluator filter,
                   double scale)Creates a FeatureQuery with the type of features, a filter, the order for
 the FeatureCollection and the view scale. | 
| DefaultFeatureQuery(java.lang.String storeName) | 
| DefaultFeatureQuery(java.lang.String[] attributeNames)Creates a FeatureQuery which will load a list of attribute names of all
 available Features. | 
| DefaultFeatureQuery(java.lang.String[] attributeNames,
                   Evaluator filter)Creates a FeatureQuery with the list of attribute names of feature, a
 filter and the order for the FeatureCollection. | 
| DefaultFeatureQuery(java.lang.String[] attributeNames,
                   Evaluator filter,
                   double scale)Creates a FeatureQuery with the list of attribute names of feature, a
 filter, the order for the FeatureCollection and the view scale. | 
| 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 evaluator)Adds a filter to apply to the  Features 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() | 
| java.lang.Object | clone()Creates a copy of the object. | 
| void | copyFrom(FeatureQuery query) | 
| void | fromJson(JsonObject json) | 
| java.lang.String | getAggregate(java.lang.String name) | 
| 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()Deprecated.  | 
| FeatureExtraColumns | getExtraColumns()Extra local columns to the query. | 
| java.lang.String | getFeatureTypeId()Returns the  FeatureTypeid of theFeatures to load. | 
| Evaluator | getFilter()Returns the filter to apply to the  Features 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  Features to load. | 
| long | getPageSize()Returns the load page size, as the number of elements to be retrieved in
 block by the data source. | 
| java.lang.Object | getQueryParameter(java.lang.String name)Returns the value of an query parameter. | 
| double | getScale()Returns the scale of the data to load. | 
| 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 | loadFromState(PersistentState state)Set the state of the object from the state passed as parameter. | 
| void | removeAggregateFunction(java.lang.String colname) | 
| void | removeGroupByColumn(java.lang.String colname) | 
| void | retrievesAllAttributes() | 
| void | saveToState(PersistentState state)Saves the internal state of the object on the provided
 PersistentState object. | 
| static void | selfRegister() | 
| void | setAttributeNames(java.lang.String[] attributeNames)Sets the names of the attributes to load from each  Feature. | 
| void | setConstantsAttributeNames(java.lang.String[] constantsAttributeNames)Set of attribute names to be treated as constants for each  Feature. | 
| void | setFeatureType(FeatureType featureType)Sets the  FeatureTypeof theFeatures to load. | 
| void | setFeatureTypeId(java.lang.String featureTypeId)Sets the  FeatureTypeid of theFeatures to load. | 
| void | setFilter(Evaluator filter)Sets the filter to apply to the  Features 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  Features 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 | setQueryParameter(java.lang.String name,
                 java.lang.Object value)Sets the value of an query parameter. | 
| void | setScale(double scale)Sets the scale. | 
| 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. | 
| JsonObjectBuilder | toJsonBuilder() | 
| java.lang.String | toString() | 
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneQuietly, cloneQuietlytoJson, toJson, toJsonBuilderpublic static final java.lang.String SCALE_PARAM_NAME
public DefaultFeatureQuery()
public DefaultFeatureQuery(java.lang.String storeName)
public DefaultFeatureQuery(FeatureType featureType)
featureType - the type of Features of the querypublic DefaultFeatureQuery(FeatureType featureType, Evaluator filter)
featureType - the type of Features of the queryfilter - based on the properties of the Featurespublic DefaultFeatureQuery(FeatureType featureType, Evaluator filter, double scale)
featureType - the type of Features of the queryfilter - based on the properties of the Featuresscale - to view the Features.public DefaultFeatureQuery(java.lang.String[] attributeNames)
attributeNames - the list of attribute names to loadpublic DefaultFeatureQuery(java.lang.String[] attributeNames,
                           Evaluator filter)
attributeNames - the list of attribute names to loadfilter - based on the properties of the Featurespublic DefaultFeatureQuery(java.lang.String[] attributeNames,
                           Evaluator filter,
                           double scale)
attributeNames - the list of attribute names to loadfilter - based on the properties of the Featuresscale - to view the Features.public double getScale()
DataQuerypublic final void setScale(double scale)
DataQuerypublic java.lang.Object getQueryParameter(java.lang.String name)
DataQuerygetQueryParameter in interface DataQueryname - of the parameterpublic void setQueryParameter(java.lang.String name,
                              java.lang.Object value)
DataQuerysetQueryParameter in interface DataQueryname - of the query parametervalue - for the query parameterpublic final void setFeatureType(FeatureType featureType)
FeatureQueryFeatureType of the Features 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.setFeatureType in interface FeatureQueryfeatureType - the feature type of the data to loadpublic java.lang.String[] getAttributeNames()
FeatureQueryFeature.getAttributeNames in interface FeatureQuerypublic final void setAttributeNames(java.lang.String[] attributeNames)
FeatureQueryFeature.setAttributeNames in interface FeatureQueryattributeNames - the attribute names to loadpublic void retrievesAllAttributes()
retrievesAllAttributes in interface FeatureQuerypublic void addAttributeName(java.lang.String attributeName)
FeatureQueryFeature.addAttributeName in interface FeatureQueryattributeName - the attribute name to loadpublic void addEssentialAttributeNames(FeatureStore store)
addEssentialAttributeNames in interface FeatureQuerypublic void addPrimaryKeyAttributeNames(FeatureStore store)
addPrimaryKeyAttributeNames in interface FeatureQuerypublic boolean hasAttributeNames()
FeatureQueryhasAttributeNames in interface FeatureQuerypublic void clearAttributeNames()
FeatureQueryclearAttributeNames in interface FeatureQuerypublic Evaluator getFilter()
FeatureQueryFeatures to load.getFilter in interface FeatureQuerypublic Expression getExpressionFilter()
FeatureQuerygetExpressionFilter in interface FeatureQuerypublic void setFilter(Expression filter)
setFilter in interface FeatureQuerypublic void setFilter(java.lang.String filter)
setFilter in interface FeatureQuerypublic void setFilter(Evaluator filter)
FeatureQueryFeatures to load.setFilter in interface FeatureQueryfilter - the filter to apply to the Features to loadpublic void addFilter(java.lang.String filter)
addFilter in interface FeatureQuerypublic void addFilter(Expression filter)
addFilter in interface FeatureQuerypublic void addFilter(Evaluator evaluator)
FeatureQueryFeatures 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.addFilter in interface FeatureQueryevaluator - a filter to apply to the Features to loadpublic void clearFilter()
clearFilter in interface FeatureQuerypublic FeatureQueryOrder getOrder()
FeatureQueryFeatures to load.getOrder in interface FeatureQueryFeatures to loadpublic void setOrder(FeatureQueryOrder order)
FeatureQueryFeatures to load.setOrder in interface FeatureQueryorder - the order of the Features to loadpublic boolean hasFilter()
FeatureQueryhasFilter in interface FeatureQuerypublic boolean hasLimit()
hasLimit in interface FeatureQuerypublic boolean hasOrder()
FeatureQueryhasOrder in interface FeatureQuerypublic java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
 be cloned. As this is extending Cloneable so its sure
 it implements it, so this exception may be used for problems on specific
 object instances.Object#clone()}.public FeatureQuery getCopy()
getCopy in interface FeatureQueryCloneable.clone()public java.lang.String getFeatureTypeId()
FeatureQueryFeatureType id of the Features to load.getFeatureTypeId in interface FeatureQueryFeatureType id of the Features to loadpublic void setFeatureTypeId(java.lang.String featureTypeId)
FeatureQuerysetFeatureTypeId in interface FeatureQueryfeatureTypeId - the FeatureType id of the Features to
 loadpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic static void selfRegister()
public long getLimit()
FeatureQueryNOTE: 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.
getLimit in interface FeatureQuerypublic long getPageSize()
FeatureQuerygetPageSize in interface FeatureQuerypublic void setLimit(long limit)
FeatureQueryNOTE: 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.
setLimit in interface FeatureQuerylimit - the maximum number of elements to return with this querypublic void clearLimit()
clearLimit in interface FeatureQuerypublic void setPageSize(long pageSize)
FeatureQuerysetPageSize in interface FeatureQuerypageSize - the load page sizepublic java.lang.String[] getConstantsAttributeNames()
FeatureQueryFeature. These attributes will not be charged.getConstantsAttributeNames in interface FeatureQuerypublic void setConstantsAttributeNames(java.lang.String[] constantsAttributeNames)
FeatureQueryFeature.setConstantsAttributeNames in interface FeatureQueryconstantsAttributeNames - the attribute names to be constantspublic void addConstantAttributeName(java.lang.String attributeName)
FeatureQueryFeature.addConstantAttributeName in interface FeatureQueryattributeName - the attribute name to be treated as constantpublic boolean hasConstantsAttributeNames()
FeatureQueryhasConstantsAttributeNames in interface FeatureQuerypublic void clearConstantsAttributeNames()
FeatureQueryclearConstantsAttributeNames in interface FeatureQuerypublic boolean isAGroupByColumn(java.lang.String name)
isAGroupByColumn in interface FeatureQuerypublic java.util.List<java.lang.String> getGroupByColumns()
FeatureQuerygetGroupByColumns in interface FeatureQuerypublic void removeGroupByColumn(java.lang.String colname)
removeGroupByColumn in interface FeatureQuerypublic void addAggregate(java.lang.String funcName,
                         java.lang.String columnName)
addAggregate in interface FeatureQuerypublic java.util.Map<java.lang.String,java.lang.String> getAggregateFunctions()
FeatureQuerygetAggregateFunctions in interface FeatureQuerypublic void removeAggregateFunction(java.lang.String colname)
removeAggregateFunction in interface FeatureQuerypublic java.lang.String getAggregateFunction(java.lang.String name)
getAggregateFunction in interface FeatureQuerypublic java.lang.String getAggregate(java.lang.String name)
getAggregate in interface FeatureQuerypublic java.lang.String getAggregate(java.lang.String tableName,
                                     java.lang.String name)
getAggregate in interface FeatureQuerypublic boolean isAggregate(java.lang.String name)
isAggregate in interface FeatureQuerypublic boolean hasAggregateFunctions()
hasAggregateFunctions in interface FeatureQuerypublic boolean hasGroupByColumns()
hasGroupByColumns in interface FeatureQuerypublic void copyFrom(FeatureQuery query)
copyFrom in interface FeatureQuerypublic FeatureExtraColumns getExtraColumns()
FeatureQuerygetExtraColumns in interface FeatureQuery@Deprecated public FeatureExtraColumns getExtraColumn()
getExtraColumn in interface FeatureQuerypublic MutableSymbolTable getSymbolTable()
getSymbolTable in interface FeatureQuerypublic void setSymbolTable(MutableSymbolTable symbolTable)
setSymbolTable in interface FeatureQuerypublic void setVar(java.lang.String name,
                   java.lang.Object value)
FeatureQuerysetVar in interface FeatureQuerypublic boolean isUseSubquery()
FeatureQueryisUseSubquery in interface FeatureQuerypublic void setUseSubquery(boolean useSubquery)
FeatureQuerysetUseSubquery in interface FeatureQuerypublic void fromJson(JsonObject json)
fromJson in interface SupportFromJsonpublic JsonObjectBuilder toJsonBuilder()
toJsonBuilder in interface SupportToJsonpublic java.lang.String toString()
toString in class java.lang.Object