org.openanzo.model.transaction.impl
Class RDBPersistedTransaction

java.lang.Object
  extended by org.openanzo.model.transaction.impl.Transaction
      extended by org.openanzo.model.transaction.impl.RDBPersistedTransaction
All Implemented Interfaces:
ITransaction

public class RDBPersistedTransaction
extends Transaction

Transaction that is backed by a RDB persisted store

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
RDBPersistedTransaction(ITransactionQueue queue, RDBNamedGraphContainer container)
          Create a new RDB persisted transaction
RDBPersistedTransaction(ITransactionQueue queue, RDBNamedGraphContainer container, long transactionId)
          Create a RDBPersistedTransaction for a persisted transaction
 
Method Summary
 ITransactionCommand createNewCommand(java.lang.String commandType)
          Create a new command , but do not add it to queue yet
 ITransactionCommand createNewCommand(java.lang.String commandType, java.util.Set<IPrecondition> preconditions)
          Create a new command, but do not add it to queue yet
 void delete()
          Delete the transaction from its store.
 void save()
          Save the transaction to its store.
 
Methods inherited from class org.openanzo.model.transaction.impl.Transaction
filter, getCommandCount, getCommands, getCurrentCommand, getId, getTransactionQueue, getTransactionTimestamp, isEmpty, nextCommand, redo, setId, setTransactionQueue, setTransactionTimestamp, undo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBPersistedTransaction

public RDBPersistedTransaction(ITransactionQueue queue,
                               RDBNamedGraphContainer container)
Create a new RDB persisted transaction

Parameters:
queue - Parent TransactionQueue for this transaction
container - JDBC container for data

RDBPersistedTransaction

public RDBPersistedTransaction(ITransactionQueue queue,
                               RDBNamedGraphContainer container,
                               long transactionId)
                        throws AnzoException
Create a RDBPersistedTransaction for a persisted transaction

Parameters:
queue - Parent TransactionQueue for this transaction
container - JDBC container for data
transactionId - ID of Transaction
Throws:
AnzoException - if there was an error loading transaction for the RDB
Method Detail

delete

public void delete()
            throws AnzoException
Description copied from interface: ITransaction
Delete the transaction from its store.

Specified by:
delete in interface ITransaction
Overrides:
delete in class Transaction
Throws:
AnzoException - if there is an error deleting tranaction

save

public void save()
          throws AnzoException
Description copied from interface: ITransaction
Save the transaction to its store.

Specified by:
save in interface ITransaction
Overrides:
save in class Transaction
Throws:
AnzoException - if there is an error saving tranaction

createNewCommand

public ITransactionCommand createNewCommand(java.lang.String commandType)
Create a new command , but do not add it to queue yet

Parameters:
commandType - for new command
Returns:
new Command of given type

createNewCommand

public ITransactionCommand createNewCommand(java.lang.String commandType,
                                            java.util.Set<IPrecondition> preconditions)
Create a new command, but do not add it to queue yet

Overrides:
createNewCommand in class Transaction
Parameters:
commandType - Type of command
preconditions - Precondition for command
Returns:
a new Command of the given type


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.