org.spicefactory.pimento.transaction
Class TransactionRequest

java.lang.Object
  extended by org.spicefactory.pimento.transaction.TransactionRequest
All Implemented Interfaces:
Externalizable

public class TransactionRequest
extends Object
implements Externalizable

Represents a transaction received from the client. Contains snapshots for new or modified entities as well as all operations to be executed within the transaction alongside their parameters which may include non-entity values not managed by Pimento.

Author:
Jens Halm

Constructor Summary
TransactionRequest()
           
 
Method Summary
 List<EntitySnapshot> getDetachedEntities()
          Returns snapshots for all detached entities that should be updated (merged) in this request.
 List<EntitySnapshot> getModifiedEntities()
          Returns snapshots for all entities that should be updated (merged) in this request.
 List<ServiceRequest> getOperations()
          Returns the service operations that should be executed within this transaction.
 List<EntitySnapshot> getTransientEntities()
          Returns snapshots for all entities that should be persisted in this request.
 void readExternal(DataInput input)
          Restores the content of this object from the DataInput instance.
 void writeExternal(DataOutput output)
          Saves the content of this object to the DataOutput instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionRequest

public TransactionRequest()
Method Detail

getTransientEntities

public List<EntitySnapshot> getTransientEntities()
Returns snapshots for all entities that should be persisted in this request.

Returns:
snapshots for all entities that should be persisted in this request

getDetachedEntities

public List<EntitySnapshot> getDetachedEntities()
Returns snapshots for all detached entities that should be updated (merged) in this request.

Returns:
snapshots for all detached entities that should be updated (merged) in this request

getModifiedEntities

public List<EntitySnapshot> getModifiedEntities()
Returns snapshots for all entities that should be updated (merged) in this request.

Returns:
snapshots for all entities that should be updated (merged) in this request

getOperations

public List<ServiceRequest> getOperations()
Returns the service operations that should be executed within this transaction.

Returns:
the actual method parameters that should be passed to the service invocation

readExternal

public void readExternal(DataInput input)
Description copied from interface: Externalizable
Restores the content of this object from the DataInput instance. Values must be read in the same sequence as they were written on the client side.

Specified by:
readExternal in interface Externalizable
Parameters:
input - the AMF3 data to read from

writeExternal

public void writeExternal(DataOutput output)
Description copied from interface: Externalizable
Saves the content of this object to the DataOutput instance.

Specified by:
writeExternal in interface Externalizable
Parameters:
output - the output to write to