Package com.esri.arcgisruntime.data
Class StatisticsQueryParameters
- java.lang.Object
-
- com.esri.arcgisruntime.data.StatisticsQueryParameters
-
public final class StatisticsQueryParameters extends Object
Represents the input parameters for defining a statistics query.- Since:
- 100.2.0
-
-
Constructor Summary
Constructors Constructor Description StatisticsQueryParameters(Iterable<StatisticDefinition> statisticDefinitions)
Constructs a StatisticsQueryParameters by a list of statistic definitions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
getGeometry()
Gets the geometry that (along with the spatial relationship) defines features to be included in the statistical query.List<String>
getGroupByFieldNames()
Gets a list of fields by which statistical query results will be grouped.List<QueryParameters.OrderBy>
getOrderByFields()
Gets a list of fields by which statistical query results will be ordered.QueryParameters.SpatialRelationship
getSpatialRelationship()
Gets the spatial relationship that defines features to be included in the statistical query.List<StatisticDefinition>
getStatisticDefinitions()
Gets a list ofStatisticDefinition
objects to include in a statistical query of a table.TimeExtent
getTimeExtent()
Gets the time extent that defines features to be included in the statistics query.String
getWhereClause()
Gets an expression string used in the where clause.void
setGeometry(Geometry geometry)
Sets the geometry that defines features to be included in the statistical query.void
setSpatialRelationship(QueryParameters.SpatialRelationship spatialRelationship)
Sets the spatial relationship that defines features to be included in the statistical query.void
setTimeExtent(TimeExtent timeExtent)
Sets the time extent that defines features to be included in the statistics query.void
setWhereClause(String whereClause)
Sets an expression string used in the where clause.
-
-
-
Constructor Detail
-
StatisticsQueryParameters
public StatisticsQueryParameters(Iterable<StatisticDefinition> statisticDefinitions)
Constructs a StatisticsQueryParameters by a list of statistic definitions.- Parameters:
statisticDefinitions
- the statistic definitions to apply for the query- Throws:
IllegalArgumentException
- if statisticDefinitions is null, or empty- Since:
- 100.2.0
-
-
Method Detail
-
getGeometry
public Geometry getGeometry()
Gets the geometry that (along with the spatial relationship) defines features to be included in the statistical query.- Returns:
- the geometry used for spatial filtering
- Since:
- 100.2.0
-
setGeometry
public void setGeometry(Geometry geometry)
Sets the geometry that defines features to be included in the statistical query.- Parameters:
geometry
- the geometry used for spatial filtering- Throws:
IllegalArgumentException
- if geometry is null- Since:
- 100.2.0
-
getSpatialRelationship
public QueryParameters.SpatialRelationship getSpatialRelationship()
Gets the spatial relationship that defines features to be included in the statistical query.- Returns:
- the spatial relationship type
- Since:
- 100.2.0
-
setSpatialRelationship
public void setSpatialRelationship(QueryParameters.SpatialRelationship spatialRelationship)
Sets the spatial relationship that defines features to be included in the statistical query.- Parameters:
spatialRelationship
- the spatial relationship type- Throws:
IllegalArgumentException
- if spatialRelationship is null- Since:
- 100.2.0
-
getWhereClause
public String getWhereClause()
Gets an expression string used in the where clause. It will be combined with a spatial criteria (geometry) to filter the features evaluated in the statistical query. If no filters are defined, all features in the table are included in the query.- Returns:
- a string of the attribute expression that defines features to be included in the statistics query.
- Since:
- 100.2.0
-
setWhereClause
public void setWhereClause(String whereClause)
Sets an expression string used in the where clause. It will be combined with a spatial criteria (geometry) to filter the features evaluated in the statistical query. If no filters are defined, all features in the table are included in the query.Here some valid examples:
setWhereClause("STATE_NAME LIKE 'Miss%'"); // % means anything setWhereClause("STATE_NAME = 'California'"); //strings must be enclosed within single quotes in where clause setWhereClause("POP2007 > 1000000");
- Parameters:
whereClause
- the where clause string for filtering features- Throws:
IllegalArgumentException
- if whereClause is null- Since:
- 100.2.0
-
getGroupByFieldNames
public List<String> getGroupByFieldNames()
Gets a list of fields by which statistical query results will be grouped.By default the list is empty. Adds valid field names to group the statistical query result. It will affect the result of
StatisticRecord.getGroup()
.- Returns:
- a mutable list of fields by which statistical query results will be grouped
- Since:
- 100.2.0
-
getOrderByFields
public List<QueryParameters.OrderBy> getOrderByFields()
Gets a list of fields by which statistical query results will be ordered.By default the list is empty. Adds valid field names to sort the statistical query result. It will affect the result order of
StatisticsQueryResult.iterator()
.- Returns:
- a mutable list of fields for sort orders
- Since:
- 100.2.0
-
getStatisticDefinitions
public List<StatisticDefinition> getStatisticDefinitions()
Gets a list ofStatisticDefinition
objects to include in a statistical query of a table.By default the list is the same as the definition list constructing the object. Adds or removes a statistic definition to the list to decide the final statistical query result. The list cannot be empty.
- Returns:
- a mutable list of StatisticDefinition objects
- Since:
- 100.2.0
-
setTimeExtent
public void setTimeExtent(TimeExtent timeExtent)
Sets the time extent that defines features to be included in the statistics query. The time extent can be null to indicate an infinite extent.- Parameters:
timeExtent
- the time extent- Since:
- 100.3.0
-
getTimeExtent
public TimeExtent getTimeExtent()
Gets the time extent that defines features to be included in the statistics query.- Returns:
- the time extent, or null if no time extent is set
- Since:
- 100.3.0
-
-