ArcGISFeatureTable
.
When querying related features, all participating tables must be included in the same ArcGISMap
or
ArcGISScene
, as either feature layers or non-spatial tables. The query that uses these parameters will
load these related tables.
RelatedQueryParameters lets you specify:
- Details about the relationship to be queried.
- A where clause used to filter features from the related table.
- How to sort the results.
- Whether to return geometry within the results.
- Since:
- 100.1.0
- See Also:
-
Constructor Summary
ConstructorDescriptionRelatedQueryParameters
(RelationshipInfo relationshipInfo) Creates related query parameters with the specified relationship information. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the maximum number of features the query should return.Gets the collection of order by objects that indicates how to sort the results.Gets the relationship information used to define the tables to use for this query.int
Gets the starting offset of results to fetch.Gets the where clause; which is a legal SQL statement.boolean
True if geometry values are returned in the results, otherwise false.void
setMaxFeatures
(int maxFeatures) Sets the maximum number of features the query should return.void
setRelationshipInfo
(RelationshipInfo relationshipInfo) Sets the relationship information used to define the tables to use for this query.void
setResultOffset
(int resultOffset) Sets the starting offset of results to fetch.void
setReturnGeometry
(boolean returnGeometry) True if geometry values are returned in the results, otherwise false.void
setWhereClause
(String whereClause) Sets the where clause to apply to the destination table.
-
Constructor Details
-
RelatedQueryParameters
Creates related query parameters with the specified relationship information.- Parameters:
relationshipInfo
- the relationship information between related tables, cannot be null- Throws:
IllegalArgumentException
- if relationshipInfo is null- Since:
- 100.1.0
-
-
Method Details
-
getOrderByFields
Gets the collection of order by objects that indicates how to sort the results.Results can be sorted by one or more fields. Each order by instance includes a field name and whether to sort by that field in ascending or descending order. If a service-based table is being queried it must support advanced queries.
- Returns:
- the collection of order by objects that indicates how to sort the results
- Since:
- 100.1.0
-
setWhereClause
Sets the where clause to apply to the destination table.The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.
If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.
ArcGISFeatureTable
objects expect that anyField.Type.GLOBALID
orField.Type.GUID
parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.- Parameters:
whereClause
- the where clause. May be null or empty.- Since:
- 100.1.0
-
getWhereClause
Gets the where clause; which is a legal SQL statement.The where clause should follow standard SQL syntax similar to that discussed in the document SQL reference for query expressions used in ArcGIS.
If the where clause includes dates, they must be correctly formatted based on the geodatabase datasource used in the service. Refer to Dates and time for date formats expected by different data sources.
ArcGISFeatureTable
objects expect that anyField.Type.GLOBALID
orField.Type.GUID
parameters in the where clause are formatted as: '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'. All characters are uppercase, wrapped in curly braces and surrounded by single quotes.- Returns:
- the where clause
- Since:
- 100.1.0
-
getRelationshipInfo
Gets the relationship information used to define the tables to use for this query.- Returns:
- the relationship information used to define the tables to use for this query
- Since:
- 100.1.0
-
setRelationshipInfo
Sets the relationship information used to define the tables to use for this query.- Parameters:
relationshipInfo
- the relationship information used to define the tables to use for this query- Throws:
IllegalArgumentException
- if relationshipInfo is null- Since:
- 100.1.0
-
setReturnGeometry
public void setReturnGeometry(boolean returnGeometry) True if geometry values are returned in the results, otherwise false.This is needed when you want to display the features on a map or a scene. When querying non-spatial data, results do not include geometry.
- Parameters:
returnGeometry
- true if geometry values are returned in the results, otherwise false- Since:
- 100.1.0
-
isReturnGeometry
public boolean isReturnGeometry()True if geometry values are returned in the results, otherwise false.This is needed when you want to display the features on a map or a scene. When querying non-spatial data, results do not include geometry.
- Returns:
- true if geometry values are returned in the results, otherwise false
- Since:
- 100.1.0
-
setResultOffset
public void setResultOffset(int resultOffset) Sets the starting offset of results to fetch. This is useful for paging through results.For consistent ordering of results when using pagination, you should also provide a value for the
getOrderByFields()
. Note that if you provide a result offset to support paging of results, you must also set agetMaxFeatures()
value. Otherwise, the result offset is ignored.- Parameters:
resultOffset
- the starting offset of results to fetch. This is useful for paging through results.- Since:
- 100.2.1
-
getResultOffset
public int getResultOffset()Gets the starting offset of results to fetch. This is useful for paging through results.For consistent ordering of results when using pagination, you should also provide a value for the
getOrderByFields()
. Note that if you provide a result offset to support paging of results, you must also set agetMaxFeatures()
value. Otherwise, the result offset is ignored.- Returns:
- the starting offset of results to fetch. This is useful for paging through results.
- Since:
- 100.2.1
-
setMaxFeatures
public void setMaxFeatures(int maxFeatures) Sets the maximum number of features the query should return.For consistent ordering of results when using pagination, provide a value for
getOrderByFields()
. Note that if you provide a maximum features value to support paging of results, you must also set aQueryParameters.getResultOffset()
value. Otherwise, the result may contain local features in place of server features if they satisfy the query. To ensure strict paging of server features, specify both maximum features andgetResultOffset()
.- Parameters:
maxFeatures
- the maximum number of features the query should return- Since:
- 100.2.1
-
getMaxFeatures
public int getMaxFeatures()Gets the maximum number of features the query should return.For consistent ordering of results when using pagination, provide a value for
getOrderByFields()
. Note that if you provide a maximum features value to support paging of results, you must also set aQueryParameters.getResultOffset()
value. Otherwise, the result may contain local features in place of server features if they satisfy the query. To ensure strict paging of server features, specify both maximum features andgetResultOffset()
.- Returns:
- the maximum number of features the query should return
- Since:
- 100.2.1
-