org.nodal.model
Interface Txn

All Known Subinterfaces:
TxnBuilder
All Known Implementing Classes:
memTxn

public interface Txn

A transaction, consisting of changes to a set of Nodes on a single Repository.


Method Summary
 Attribution attribution()
          Who performed the transaction and when?
 boolean committed()
          Has this transaction been committed?
 Txn inverse()
          A transaction that inverts the actions of this one.
 java.util.List ops()
          The subjects and operations performed by this transaction.
 Repository repository()
          The Repository that this transaction was performed against.
 boolean resolved()
          Has this transaction been resolved?
 java.util.List subjectList(Node subject)
          A List of the TxnOp entries that share the same subject in this transaction.
 java.util.Set subjects()
          A Set of the subjects that are contained in this Txn.
 

Method Detail

attribution

public Attribution attribution()
Who performed the transaction and when?


repository

public Repository repository()
The Repository that this transaction was performed against.


committed

public boolean committed()
Has this transaction been committed?

In other words is it final, or still being accumulated?


resolved

public boolean resolved()
Has this transaction been resolved?

Are its results reflected in the persistent backing store?


ops

public java.util.List ops()
The subjects and operations performed by this transaction. This value cannot be examined until the transaction is committed.


subjects

public java.util.Set subjects()
A Set of the subjects that are contained in this Txn. Elements of this Set are Nodes in the Repository. Using these elements as indices into {#subjectList(Node)} will iterate over all {#ops()}.

Returns:
a Set of the Nodes that are modified by this transaction

subjectList

public java.util.List subjectList(Node subject)
A List of the TxnOp entries that share the same subject in this transaction.


inverse

public Txn inverse()
A transaction that inverts the actions of this one.