Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.data 
IChangeObject 
Packagemx.data
Interfacepublic interface IChangeObject

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

The IChangeObject interface provides the methods and properties needed when detecting local conflicts.

Conflicts represent an error that has occurred due to an update operation. Conflicts are generated for many reasons. For example, another client has updated the same property of an item.

Conflicts are determined by both the remote destination and the local DataService. A conflict detected by the DataService is considered a local conflict. A conflict detected by the remote destination is a remote conflict.

This interface is used when detecting local conflicts. Local conflicts are determined by the ConflictDetector object. To customize local conflict detection the ConflictDetector can be extended and assigned to the DataService.conflictDetector property.



Public Properties
 PropertyDefined By
  changedPropertyNames : Array
[read-only] The list of property names which changed as part of an update.
IChangeObject
  currentVersion : Object
[read-only] Current version of the item.
IChangeObject
  identity : Object
[read-only] Identity of the item being changed.
IChangeObject
  message : DataMessage
[read-only] Provides access to the local DataMessage object corresponding to the local changes.
IChangeObject
  newVersion : Object
[read-only] Remote destinations new version of the item.
IChangeObject
  previousVersion : Object
[read-only] Previous version of the item.
IChangeObject
Public Methods
 MethodDefined By
  
conflict(description:String, properties:Array):void
Declares that a conflict occurred while processing this change.
IChangeObject
  
Returns the conflict created with a previous call to the conflict() method.
IChangeObject
  
Indicates if the change is due to a new item.
IChangeObject
  
Indicates if the item was deleted.
IChangeObject
  
Indicates if the change is due to an update.
IChangeObject
Property Detail

changedPropertyNames

property
changedPropertyNames:Array  [read-only]

The list of property names which changed as part of an update. If this property contains null, it is in indication that all properties may have changed.



Implementation
    public function get changedPropertyNames():Array

currentVersion

property 
currentVersion:Object  [read-only]

Current version of the item.



Implementation
    public function get currentVersion():Object

identity

property 
identity:Object  [read-only]

Identity of the item being changed.



Implementation
    public function get identity():Object

message

property 
message:DataMessage  [read-only]

Provides access to the local DataMessage object corresponding to the local changes.



Implementation
    public function get message():DataMessage

newVersion

property 
newVersion:Object  [read-only]

Remote destinations new version of the item.



Implementation
    public function get newVersion():Object

previousVersion

property 
previousVersion:Object  [read-only]

Previous version of the item.



Implementation
    public function get previousVersion():Object
Method Detail

conflict

()method
public function conflict(description:String, properties:Array):void

Declares that a conflict occurred while processing this change. The conflict is dispatched as a ConflictEvent event on the DataService object.

Parameters

description:String — A String available on the faultString property of the event's message property.
 
properties:Array — Indicate which properites are in conflict.

getConflict

()method 
public function getConflict():DataErrorMessage

Returns the conflict created with a previous call to the conflict() method.

Returns
DataErrorMessage — DataErrorMessage object describing the conflict.

isCreate

()method 
public function isCreate():Boolean

Indicates if the change is due to a new item.

Returns
Booleantrue if the change is due to a new item.

isDelete

()method 
public function isDelete():Boolean

Indicates if the item was deleted.

Returns
Booleantrue if the item was deleted.

isUpdate

()method 
public function isUpdate():Boolean

Indicates if the change is due to an update.

Returns
Booleantrue if the change is due to an update.