| Package | com.esri.bacore.tasks |
| Class | public class BAQueryTask |
| Inheritance | BAQueryTask flash.events.EventDispatcher |
| Implements | IBATask |
See also
| Property | Defined By | ||
|---|---|---|---|
| concurrency : String
Value that indicates how to handle multiple calls to the same task. | BAQueryTask | ||
| disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from
being loaded from the browser's cache. | BAQueryTask | ||
| lastResult : FeatureSet [read-only]
The last result of execution the ArcGIS Query task. | BAQueryTask | ||
| proxyURL : String
The URL to proxy the request through. | BAQueryTask | ||
| requestTimeout : Number
The request timeout in seconds. | BAQueryTask | ||
| showBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing. | BAQueryTask | ||
| token : String
ArcGIS Server token associated with this workflow. | BAQueryTask | ||
| tokenProvider : ITokenProvider
Provider responsible for updating the ArcGIS Server security token if the last one expires. | BAQueryTask | ||
| url : String
A map resource URL to query geographies from. | BAQueryTask | ||
| useAMF : Boolean
Use AMF for execute(). | BAQueryTask | ||
| Method | Defined By | ||
|---|---|---|---|
BAQueryTask(url:String = null)
Creates a new instance of the BAQueryTask class. | BAQueryTask | ||
execute(query:Query, responder:IResponder = null):AsyncToken
Executes the workflow quering feature set from ArcGIS Server Map Services. | BAQueryTask | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| The fault event is dispatched when an asynchronous execution of a query task fails. | BAQueryTask | |||
| The taskCompleted event is dispatched when an asynchronous execution of a query task completes successfully. | BAQueryTask | |||
| Constant | Defined By | ||
|---|---|---|---|
| name : String = BAQuery [static]
Task name. | BAQueryTask | ||
| concurrency | property |
concurrency:String
Value that indicates how to handle multiple calls to the same task. The default
value is multiple. The following values are permitted:
multiple Existing requests are not cancelled and the developer is
responsible for ensuring the consistency of returned data by carefully
managing the event stream. This is the default value.single Only a single request at a time is allowed on the task;
multiple requests generate a fault.last Making a request cancels any existing request. public function get concurrency():String public function set concurrency(value:String):voidSee also
| disableClientCaching | property |
disableClientCaching:BooleanIf true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
The default value is false.
public function get disableClientCaching():Boolean public function set disableClientCaching(value:Boolean):void| lastResult | property |
lastResult:FeatureSet [read-only] The last result of execution the ArcGIS Query task.
public function get lastResult():FeatureSet| proxyURL | property |
proxyURL:StringThe URL to proxy the request through.
public function get proxyURL():String public function set proxyURL(value:String):void| requestTimeout | property |
requestTimeout:NumberThe request timeout in seconds. A value less than or equal to zero prevents request timeout.
The default value is -1.
public function get requestTimeout():Number public function set requestTimeout(value:Number):void| showBusyCursor | property |
showBusyCursor:BooleanIf true, a busy cursor is displayed while a service is executing.
The default value is false.
public function get showBusyCursor():Boolean public function set showBusyCursor(value:Boolean):void| token | property |
token:StringArcGIS Server token associated with this workflow. It is implicetely updated by the ArcGISTokenProvider if the last one is specified.
public function get token():String public function set token(value:String):void| tokenProvider | property |
tokenProvider:ITokenProviderProvider responsible for updating the ArcGIS Server security token if the last one expires.
public function get tokenProvider():ITokenProvider public function set tokenProvider(value:ITokenProvider):void| url | property |
url:StringA map resource URL to query geographies from.
public function get url():String public function set url(value:String):void| useAMF | property |
useAMF:BooleanUse AMF for execute(). Set to false if not using ArcGIS Server 10.0 or above. When useAMF is true, the concurency, requestTimeout, and showBusyCursor properties are ignored.
The default value is false.
public function get useAMF():Boolean public function set useAMF(value:Boolean):void| BAQueryTask | () | Constructor |
public function BAQueryTask(url:String = null)Creates a new instance of the BAQueryTask class.
Parametersurl:String (default = null) — The map resource URL to query features from.
|
| execute | () | method |
public function execute(query:Query, responder:IResponder = null):AsyncTokenExecutes the workflow quering feature set from ArcGIS Server Map Services.
A response can be received in two ways—in an optional
responder object passed in parameters
of this method and/or in listeners of fault and taskCompleted
events registered for this task.
The responder is notified first when a response is received and parsed.
Its fault method receives a parameter of the FaultEvent type and its
result method receives a parameter of the BATaskCompletedEvent type
whose result property contains the result object.
After that the received event is dispatched for listeners of this task.
If a response is successfully received and parsed, the result is assigned to the
lastResult property of this task.
Parameters
query:Query — Query parameters.
| |
responder:IResponder (default = null) — A responder to call on result or fault.
|
AsyncToken — Asynch token to be associated with the response.
|
| fault | Event |
mx.rpc.events.FaultEventmx.rpc.events.FaultEvent.FAULTThe fault event is dispatched when an asynchronous execution of a query task fails.
| taskCompleted | Event |
com.esri.bacore.BATaskCompletedEventcom.esri.bacore.BATaskCompletedEvent.COMPLETEThe taskCompleted event is dispatched when an asynchronous execution of a query task completes successfully.
The BATaskCompletedEvent.COMPLETE constant defines the value of thetype property of the event object for a taskCompleted event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
babbles | false |
cancelable | false |
currentTarget | The Object that defines the event listener that handles the event. |
target | The BATask object that dispatched the event. This is an instance of a Business Analyst task that was executed. |
taskName | Name of a Business Analyst task that was executed. |
result | Task execution result object. |
messages | Optional array of TaskMessage objects received. |
The currentTarget and target properties are
specified after the event was dispatched. A responder object passed in parameters of
a Business Analyst task execute method receives the event before it is dispatched.
| name | Constant |
public static const name:String = BAQueryTask name. This name is used for identification this task only.