org.elkoserver.objdb.store
Class UpdateResultDesc

java.lang.Object
  extended by org.elkoserver.objdb.store.ResultDesc
      extended by org.elkoserver.objdb.store.UpdateResultDesc
All Implemented Interfaces:
Encodable

public class UpdateResultDesc
extends ResultDesc

Description of the result status of an object update operation.

See Also:
ObjectStore.updateObjects(), RequestResultHandler

Constructor Summary
UpdateResultDesc(String ref, OptString failure, boolean isAtomicFailure)
          JSON-driven constructor.
UpdateResultDesc(String ref, String failure, boolean isAtomicFailure)
          Direct constructor.
 
Method Summary
 JSONLiteral encode(EncodeControl control)
          Encode this object for transmission or persistence.
 boolean isAtomicFailure()
          Get the atomic failure flag.
 
Methods inherited from class org.elkoserver.objdb.store.ResultDesc
failure, ref
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateResultDesc

@JSONMethod(value={"ref","failure","atomic"})
public UpdateResultDesc(String ref,
                                        OptString failure,
                                        boolean isAtomicFailure)
JSON-driven constructor.

Parameters:
ref - Object reference of the object acted upon.
failure - Optional error message.

UpdateResultDesc

public UpdateResultDesc(String ref,
                        String failure,
                        boolean isAtomicFailure)
Direct constructor.

Parameters:
ref - Object reference of the object that was the subject of the operation.
failure - Error message string, or null if the operation was successful.
isAtomicFailure - Flag that is true if operation would have completed but doing so would have violated atomicity.
Method Detail

encode

public JSONLiteral encode(EncodeControl control)
Encode this object for transmission or persistence.

Specified by:
encode in interface Encodable
Overrides:
encode in class ResultDesc
Parameters:
control - Encode control determining what flavor of encoding should be done.
Returns:
a JSON literal representing this object.

isAtomicFailure

public boolean isAtomicFailure()
Get the atomic failure flag.

Returns:
the atomic failure flag for this operatio.