com.esri.core.tasks.ags.query
Class QueryTask

java.lang.Object
  extended by com.esri.core.tasks.ags.query.QueryTask

public class QueryTask
extends Object

Class executing a query on the server.


Constructor Summary
QueryTask(String url)
          Instantiates a new query task.
QueryTask(String url, UserCredentials credentials)
          Instantiates a new query task.
 
Method Summary
 FeatureSet execute(Query query)
          Execute the Query defined for this QueryTask and returns a FeatureSet containing the results
 Map<Integer,FeatureSet> executeRelationshipQuery(RelationshipQuery query)
          Executes the RelationshipQuery defined for this QueryTask and returns a Map object, in which key represents the object ID of the feature and value represents the FeatureSet related to this feature.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryTask

public QueryTask(String url)
Instantiates a new query task.

Parameters:
url - the URL

QueryTask

public QueryTask(String url,
                 UserCredentials credentials)
          throws EsriSecurityException
Instantiates a new query task.

Parameters:
url - the url
credentials - the user credentials
Throws:
EsriSecurityException - the esri security exception
Method Detail

execute

public FeatureSet execute(Query query)
                   throws Exception
Execute the Query defined for this QueryTask and returns a FeatureSet containing the results

Returns:
the FeatureSet containing the results
Throws:
Exception

executeRelationshipQuery

public Map<Integer,FeatureSet> executeRelationshipQuery(RelationshipQuery query)
                                                 throws Exception
Executes the RelationshipQuery defined for this QueryTask and returns a Map object, in which key represents the object ID of the feature and value represents the FeatureSet related to this feature.

Parameters:
query - specifies the criteria of the Query.
Returns:
a map object in which key represents the object ID while value represents the related FeatureSet.
Throws:
Exception


Copyright © 2012. All Rights Reserved.