flex.data
Interface ChangeObject

All Superinterfaces:
Serializable

public interface ChangeObject
extends Serializable

The ChangeObject interface is the public interface for the JavaAdapter's synchronization methods.


Method Summary
 void addChangedPropertyName(String propertyName)
          If the adapter modifies an additional property, not changed on the client, you can use this method to add that property to the list of changes so it is pushed to other clients.
 void conflict(Object serverVersion)
          Declares that a conflict occurred while processing this change.
 void conflict(Object serverVersion, boolean conflictOnProperty)
          Declares that a conflict occurred while processing this change.
 void fail()
          Declares that a failure occurred while processing this change.
 void fail(String description)
          Declares that a failure occurred while processing this change.
 String[] getChangedPropertyNames()
          Returns the list of property names which changed as part of this update.
 Map getChangedValues()
          Gets a map of property names and their current values on the item.
 flex.data.messages.DataMessage getMessage()
          Accesses the underlying Message transmitted by the client for the change.
 Object getNewVersion()
          Gets the current version known to the client, which is the proposed new version for the server.
 Object getObjectId()
          Gets the identity of the changed object instance
 Object getPreviousValue(String propertyName)
          Gets the previous value of the named property on the item.
 Object getPreviousVersion()
          Gets the previous version known to the client.
 boolean isCreate()
          Inspects what sort of change occurred on the current item.
 boolean isDelete()
          Inspect what sort of change occurred on the current item.
 boolean isUpdate()
          Inspects what sort of change occurred on the current item.
 void setNewVersion(Object o)
          Sets the current version of the item.
 

Method Detail

getObjectId

Object getObjectId()
Gets the identity of the changed object instance


getPreviousVersion

Object getPreviousVersion()
Gets the previous version known to the client.


getNewVersion

Object getNewVersion()
Gets the current version known to the client, which is the proposed new version for the server.


setNewVersion

void setNewVersion(Object o)
Sets the current version of the item.


isCreate

boolean isCreate()
Inspects what sort of change occurred on the current item. True if the item is new


isUpdate

boolean isUpdate()
Inspects what sort of change occurred on the current item. True if the item is updated.


isDelete

boolean isDelete()
Inspect what sort of change occurred on the current item. True if the item is deleted.


getChangedPropertyNames

String[] getChangedPropertyNames()
Returns the list of property names which changed as part of this update. If this method returns null, it is in indication that all properties may have changed.


addChangedPropertyName

void addChangedPropertyName(String propertyName)
If the adapter modifies an additional property, not changed on the client, you can use this method to add that property to the list of changes so it is pushed to other clients. You might use this to implement a versionId property which changes on each update for example.


getChangedValues

Map getChangedValues()
Gets a map of property names and their current values on the item.


getPreviousValue

Object getPreviousValue(String propertyName)
Gets the previous value of the named property on the item.


getMessage

flex.data.messages.DataMessage getMessage()
Accesses the underlying Message transmitted by the client for the change.


fail

void fail()
Declares that a failure occurred while processing this change. The failure will be manifested as a fault event on the client.


fail

void fail(String description)
Declares that a failure occurred while processing this change. The failure will be manifested as a fault event on the client, and the error description will contain the String input parameter.


conflict

void conflict(Object serverVersion)
Declares that a conflict occurred while processing this change. The failure will be manifested as a conflict event on the client, and any values which differ between the client's previous version of the object and the server's current version will be marked as out of sync.


conflict

void conflict(Object serverVersion,
              boolean conflictOnProperty)
Declares that a conflict occurred while processing this change. The failure will be manifested as a conflict event on the client. If the boolean input parameter is true, then only the properties which the client attempted to modify will be examined for discrepancies between the client's previous version and the server's current version. If the boolean input parameter is false, then all of the object's properties, not just those that are changing, will be inspected for differences between client and server versions.



Copyright © 2007 Adobe Systems Inc. All Rights Reserved.

 

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

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/data/ChangeObject.html