Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.data 
DataServiceAdapter 
Packagemx.data
Classpublic class DataServiceAdapter
InheritanceDataServiceAdapter Inheritance Object
Subclasses MessagingDataServiceAdapter, RPCDataServiceAdapter

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The DataServiceAdapter class is the abstract base class which you use to implement a new type of DataService implementation.



Public Properties
 PropertyDefined By
  asyncRequest : AsyncRequest
[read-only] Contains an AsyncRequest object that is used to handle all DataService operations.
DataServiceAdapter
  connected : Boolean
[read-only] Returns true when this service adapter is connected to its source.
DataServiceAdapter
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  dataStore : DataStore
Contains an object of type mx.data.DataStore.
DataServiceAdapter
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  serializeAssociations : Boolean
[read-only] If true then Data Management Service wraps the items into a serialization descriptor which excludes the associations.
DataServiceAdapter
  throwUnhandledFaults : Boolean
[read-only] If true then the data manager throw an error if there is a fault with no listeners on the data manager.
DataServiceAdapter
Public Methods
 MethodDefined By
  
Finds the data manager for a specified destination.
DataServiceAdapter
  
Looks up an associated data service adapter.
DataServiceAdapter
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

asyncRequest

property
asyncRequest:AsyncRequest  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Contains an AsyncRequest object that is used to handle all DataService operations. By overriding the AsyncRequest.invoke() method, you can intercept managed requests. The AsyncRequest class also exposes the various methods for determining if the service is connected or disconnected.



Implementation
    public function get asyncRequest():AsyncRequest

connected

property 
connected:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns true when this service adapter is connected to its source. Should be overridden by subclasses.



Implementation
    public function get connected():Boolean

dataStore

property 
public var dataStore:DataStore

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Contains an object of type mx.data.DataStore. The DataStore manages the set of incoming and outgoing changes for one or more DataServices, which may have references between them. When you commit on a DataStore, all of the pending changes of each DataService using that DataStore are committed.

By default, a DataService shares the same DataStore with other DataServices if they have managed association properties and share the same set of channels. If you are sharing DataStores, a commit call on one DataService commits changes for all DataServices using that data store. This preserves the order of operations in case there are dependencies between the changes in your uncommitted batches.

serializeAssociations

property 
serializeAssociations:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

If true then Data Management Service wraps the items into a serialization descriptor which excludes the associations. The MessagingDataServiceAdapter uses this approach for sending associations. The RPCDataServiceAdapter does not.



Implementation
    public function get serializeAssociations():Boolean

See also

throwUnhandledFaults

property 
throwUnhandledFaults:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

If true then the data manager throw an error if there is a fault with no listeners on the data manager. For RPC services, those errors are proxied to listeners on the service and so throwing the error is not appropriate.



Implementation
    public function get throwUnhandledFaults():Boolean
Method Detail

getDataManager

()method
public function getDataManager(destination:String):DataManager

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Finds the data manager for a specified destination.

Parameters

destination:String — The destination.

Returns
DataManager — The DataManager object for the destination.

getDataServiceAdapter

()method 
public function getDataServiceAdapter(destination:String):DataServiceAdapter

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Looks up an associated data service adapter. This implementation chooses the adapter for the destination provided.

Parameters

destination:String — The destination.

Returns
DataServiceAdapter — The DataServiceAdapter object for the destination.