public class Query
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Class and Description |
---|---|
static class |
Query.SpatialRelationshipType |
Modifier and Type | Method and Description |
---|---|
static Query |
create()
Creates a new Query object used to execute a query on the layer resource identified by the URL.
|
Geometry |
getGeometry()
The geometry to apply to the spatial filter.
|
com.google.gwt.core.client.JsArrayString |
getGroupByFieldsForStatistics()
One or more field names that will be used to group the statistics.
|
double |
getMaxAllowableOffset()
The maximum allowable offset used for generalizing geometries returned by the query operation.
|
com.google.gwt.core.client.JsArrayInteger |
getObjectIds()
A comma delimited list of ObjectIds for the features in the layer/table that you want to query.
|
com.google.gwt.core.client.JsArrayString |
getOrderByFields()
One or more field names that will be used to order the query results.
|
com.google.gwt.core.client.JsArrayString |
getOutFields()
Attribute fields to include in the FeatureSet.
|
SpatialReference |
getOutSpatialReference()
The spatial reference for the returned geometry.
|
com.google.gwt.core.client.JsArray<StatisticDefinition> |
getOutStatistics()
The definitions for one or more field-based statistic to be calculated.
|
java.lang.String |
getRelationParam()
The 'Shape Comparison Language' string to evaluate.
|
Query.SpatialRelationshipType |
getSpatialRelationship()
The spatial relationship to be applied on the input geometry while performing the
query.
|
java.lang.String |
getText()
Shorthand for a where clause using "like".
|
TimeExtent |
getTimeExtent()
Time extent for the query.
|
java.lang.String |
getWhere()
A where clause for the query.
|
boolean |
returnGeometry()
If "true", each feature in the FeatureSet includes the geometry.
|
void |
setGeometry(Geometry geometry)
Set the geometry to apply to the spatial filter.
|
void |
setGroupByFieldsForStatistics(java.lang.String[] groupByFieldsForStatistics)
Set the groupByFieldsForStatistics parameter.
|
void |
setMaxAllowableOffset(double maxAllowableOffset)
Set the maximum allowable offset.
|
void |
setObjectIds(int[] ids)
Set object ids.
|
void |
setOrderByFields(java.lang.String[] orderByFields)
Set the orderByField parameter.
|
void |
setOutFields(java.lang.String[] outFields)
Set outFields for query.
|
void |
setOutSpatialReference(SpatialReference outSpatialReference)
Set the spatial reference for the query.
|
void |
setOutStatistics(StatisticDefinition[] outStatistics)
Set the outStatistics parameter.
|
void |
setRelationParam(java.lang.String relationParam)
Set the relation param for this query.
|
void |
setReturnGeometry(boolean returnGeometry)
Set the returnGeometry parameter for this query.
|
void |
setSpatialRelationship(Query.SpatialRelationshipType spatialRelationship)
Set the spatial relationship for this query.
|
void |
setText(java.lang.String text)
Set the text for this query.
|
void |
setTimeExtent(TimeExtent timeExtent)
Specify a time extent for the query.
|
void |
setWhere(java.lang.String where)
Set where clause for this query.
|
public static Query create()
public final Geometry getGeometry()
public final void setGeometry(Geometry geometry)
geometry
- - the geometry to apply to the spatial filter. The spatial relationship as specified by spatialRelationship
is applied to this geometry while performing the query. The valid geometry types are Extent, Point,
Multipoint, Polyline, or Polygon.public final com.google.gwt.core.client.JsArrayString getGroupByFieldsForStatistics()
public final void setGroupByFieldsForStatistics(java.lang.String[] groupByFieldsForStatistics)
groupByFieldsForStatistics
- - One or more field names that will be used to group the statistics. groupByFieldsForStatistics is only valid when
outStatistics have been defined. Requires ArcGIS Server service version 10.1 or greater (As of v2.6)public final double getMaxAllowableOffset()
public final void setMaxAllowableOffset(double maxAllowableOffset)
maxAllowableOffset
- - the maximum allowable offset used for generalizing geometries returned by the query operation. The
offset is in the units of the spatialReference. If a spatialReference is not defined the spatial reference of the map is used.public final com.google.gwt.core.client.JsArrayInteger getObjectIds()
public final void setObjectIds(int[] ids)
ids
- - Array of ObjectIds for the features in the layer/table that you want to query.public final com.google.gwt.core.client.JsArrayString getOrderByFields()
public final void setOrderByFields(java.lang.String[] orderByFields)
orderByFields
- - One or more field names that will be used to order the query results. Specfiy ASC (ascending) or DESC (descending) after the field name to
control the order. The default order is ASC. orderByFields is only supported on dynamic layers and tables where supportsAdvancedQueries is
true. Requires ArcGIS Server service version 10.1 or greater (As of v2.6)public final com.google.gwt.core.client.JsArrayString getOutFields()
public final void setOutFields(java.lang.String[] outFields)
outFields
- - Attribute fields to include in the FeatureSet.public final SpatialReference getOutSpatialReference()
public final void setOutSpatialReference(SpatialReference outSpatialReference)
outSpatialReference
- - The spatial reference for the returned geometry. If not specified, the geometry
is returned in the spatial reference of the map.public final com.google.gwt.core.client.JsArray<StatisticDefinition> getOutStatistics()
public final void setOutStatistics(StatisticDefinition[] outStatistics)
outStatistics
- - The definitions for one or more field-based statistic to be calculated. outStatistics is only
supported on layers/tables where supportsStatistics is true. If outStatistics is specified the only other query parameters
that will be used are groupByFieldsForStatistics, orderByFields, text, timeExtent and where. Requires ArcGIS Server service
version 10.1 or greater (As of v2.6)public final java.lang.String getRelationParam()
public final void setRelationParam(java.lang.String relationParam)
relationParam
- -The 'Shape Comparison Language' string to evaluate.public final boolean returnGeometry()
public final void setReturnGeometry(boolean returnGeometry)
returnGeometry
- - If "true", each feature in the FeatureSet includes the geometry. Set to "false" (default) if
you do not plan to include highlighted features on a map since the geometry makes up a significant portion of the response.public final Query.SpatialRelationshipType getSpatialRelationship()
public final void setSpatialRelationship(Query.SpatialRelationshipType spatialRelationship)
spatialRelationship
- - The spatial relationship to be applied on the input geometry while performing the query.public final java.lang.String getText()
public final void setText(java.lang.String text)
text
- - Shorthand for a where clause using "like". The field used is the display field defined in the
map document. You can determine what the display field is for a layer in Services Directory.public final TimeExtent getTimeExtent()
public final void setTimeExtent(TimeExtent timeExtent)
timeExtent
- - time extent to be used in query.public final java.lang.String getWhere()
public final void setWhere(java.lang.String where)
where
- - A where clause for the query. Any legal SQL where clause operating on the fields in the
layer is allowed.