(Adobe® Flex™ Data Services 2 only)
Packagemx.data
Classpublic class ConflictDetector
InheritanceConflictDetector Inheritance Object

A DataService instance uses a ConflictDetector instance to determine when a conflict occurs for an operation pushed from a remote destination.

It has three methods that are used to determine if a conflict exists when processing a pushed operation, checkCreate(), checkDelete(), and checkUpdate(). Each of these methods is called for the corresponding operation with two parameters, the local and the remote change. Returning true from these methods indicates to the DataService that no conflict has occurred.

If you want to customize how conflicts are detected on the client, you can extend this class and augment the behavior as needed to match remote assembler logic.



Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined by
  
ConflictDetector(dataService:ConcreteDataService)
Constructs an instance of the default conflict detection mechanism.
ConflictDetector
  
checkCreate(remoteChange:IChangeObject, localChange:IChangeObject):void
Called by the DataService when a create operation is pushed/processed from the remote destination.
ConflictDetector
  
checkDelete(remoteChange:IChangeObject, localChange:IChangeObject):void
Called by the DataService when a delete operation is pushed/processed from the remote destination.
ConflictDetector
  
checkUpdate(remoteChange:IChangeObject, localChange:IChangeObject):void
Called by the DataService when an update operation is pushed/processed from the remote destination.
ConflictDetector
 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 the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Constructor detail
ConflictDetector()constructor
public function ConflictDetector(dataService:ConcreteDataService)

Constructs an instance of the default conflict detection mechanism.

Parameters
dataService:ConcreteDataService — ConcreteDataService reference to the data service that will use this conflict detector.
Method detail
checkCreate()method
public function checkCreate(remoteChange:IChangeObject, localChange:IChangeObject):void

Called by the DataService when a create operation is pushed/processed from the remote destination.

Parameters
remoteChange:IChangeObject — IChangeObject representing the remote change being processed.
 
localChange:IChangeObject — IChangeObject representing any local changes made to the same object referenced by the remoteChange parameter. This value can be null if no local changes have been made to the item represented by the remoteChange parameter.
checkDelete()method 
public function checkDelete(remoteChange:IChangeObject, localChange:IChangeObject):void

Called by the DataService when a delete operation is pushed/processed from the remote destination.

Parameters
remoteChange:IChangeObject — IChangeObject representing the remote change being processed.
 
localChange:IChangeObject — IChangeObject representing any local changes made to the same object referenced by the remoteChange parameter. This value can be null if no local changes have been made to the item represented by the remoteChange parameter.
checkUpdate()method 
public function checkUpdate(remoteChange:IChangeObject, localChange:IChangeObject):void

Called by the DataService when an update operation is pushed/processed from the remote destination.

Parameters
remoteChange:IChangeObject — IChangeObject representing the remote change being processed.
 
localChange:IChangeObject — IChangeObject representing any local changes made to the same object referenced by the remoteChange parameter. This value can be null if no local changes have been made to the item represented by the remoteChange parameter.




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/2/langref/mx/data/ConflictDetector.html