flex.data
Class DataSyncException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by flex.messaging.LocalizedException
                  extended by flex.messaging.MessageException
                      extended by flex.data.DataSyncException
All Implemented Interfaces:
Serializable

public class DataSyncException
extends MessageException

A DayaSyncException describes a data conflict that arises as a result of a client attempt to commit a "sync" DataService operation. It is propagated to the client, and handled as the trigger for a conflict event.

See Also:
Serialized Form

Constructor Summary
DataSyncException(ChangeObject co)
          You can use this constructor when no single property is known to have caused a conflict, and when no known safe state of the Object is known to exist.
DataSyncException(ChangeObject co, Object serverVersion)
          You can use this constructor when no single property is known to have caused a conflict, but the known safe state of the Object is available.
DataSyncException(ChangeObject co, Object serverVersion, List propertyNames)
          You can use this constructor when multiple properties are known to have caused a conflict.
DataSyncException(ChangeObject co, Object serverVersion, String propertyName)
          You can use this constructor when a single property is known to have caused a conflict.
DataSyncException(Object serverVersion, List propertyNames)
           
 
Method Summary
 flex.messaging.messages.ErrorMessage createErrorMessage()
          This utility method generates a Message to be sent across the network to describe this Exception.
 flex.data.messages.DataMessage getConflictCause()
          The DataMessage that generated the conflict.
 List getPropertyNames()
          A list of property names that are in conflict.
 Object getServerObject()
          Used to expose the state of the server object to the client at the time of conflict.
 void setConflictCause(flex.data.messages.DataMessage cause)
          Sets the data message that caused this fault.
 String toString()
          Returns a string represenation of the exception.
 
Methods inherited from class flex.messaging.MessageException
getCode, getErrorMessage, getExtendedData, setCode, setErrorMessage, setExtendedData
 
Methods inherited from class flex.messaging.LocalizedException
getDetails, getMessage, getNumber, getRootCause, setDetails, setDetails, setDetails, setDetails, setDetails, setDetails, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setNumber, setRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSyncException

public DataSyncException(ChangeObject co)
You can use this constructor when no single property is known to have caused a conflict, and when no known safe state of the Object is known to exist. An example of such a case is when the object in question no longer exists. All of the properties on the submitted ChangeObject are assumed to be in conflict.

Parameters:
co - The ChangeObject that contains the conflicting change

DataSyncException

public DataSyncException(ChangeObject co,
                         Object serverVersion)
You can use this constructor when no single property is known to have caused a conflict, but the known safe state of the Object is available. All of the properties on the submitted ChangeObject are assumed to be in conflict.

Parameters:
co - ChangeObject that contains the conflicting change
serverVersion - Version of the Object known to be in safe, correct state

DataSyncException

public DataSyncException(ChangeObject co,
                         Object serverVersion,
                         String propertyName)
You can use this constructor when a single property is known to have caused a conflict.

Parameters:
co - ChangeObject that contains the conflicting change
serverVersion - Version of the Object known to be in safe, correct state
propertyName - Name of the property that is in conflict

DataSyncException

public DataSyncException(ChangeObject co,
                         Object serverVersion,
                         List propertyNames)
You can use this constructor when multiple properties are known to have caused a conflict. If the list of conflicting properties is empty or null, then all of the properties on the submitted ChangeObject are assumed to be conflict.

Parameters:
co - ChangeObject that contains the conflicting change
serverVersion - Version of the Object known to be in safe, correct state
propertyNames - List of properties that are in conflict

DataSyncException

public DataSyncException(Object serverVersion,
                         List propertyNames)
Method Detail

setConflictCause

public void setConflictCause(flex.data.messages.DataMessage cause)
Sets the data message that caused this fault.


getConflictCause

public flex.data.messages.DataMessage getConflictCause()
The DataMessage that generated the conflict.


getServerObject

public Object getServerObject()
Used to expose the state of the server object to the client at the time of conflict.


getPropertyNames

public List getPropertyNames()
A list of property names that are in conflict.


createErrorMessage

public flex.messaging.messages.ErrorMessage createErrorMessage()
This utility method generates a Message to be sent across the network to describe this Exception. It overrides the superclass MessageException's error message generation.

Overrides:
createErrorMessage in class MessageException
Returns:
The error message.

toString

public String toString()
Description copied from class: LocalizedException
Returns a string represenation of the exception.

Overrides:
toString in class LocalizedException
Returns:
A string representation of the exception.


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/DataSyncException.html