org.openanzo.model.transaction.impl
Class RDBPersistedCommand

java.lang.Object
  extended by org.openanzo.model.transaction.impl.TransactionCommand
      extended by org.openanzo.model.transaction.impl.RDBPersistedCommand
All Implemented Interfaces:
ITransactionCommand

public class RDBPersistedCommand
extends TransactionCommand

TransactionCommand that is backed by an RDB persisted store

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
RDBPersistedCommand(RDBNamedGraphContainer container, RDBPersistedTransaction transaction)
          Create a new RDB persisted command with no type
RDBPersistedCommand(RDBNamedGraphContainer container, RDBPersistedTransaction transaction, long commandId, java.lang.String commandType, java.util.Set<IPrecondition> preconditions)
          Create a RDBPersistedCommand for a persisted command
RDBPersistedCommand(RDBNamedGraphContainer container, RDBPersistedTransaction transaction, java.lang.String commandType)
          Create a new RDB persisted command with a command type
 
Method Summary
 void delete()
          Delete the command from its store.
 long getCommandId()
          Get the command's unique id
 void save()
          Save the command to its store.
 void setCommandType(java.lang.String commandType)
          Set the type name for this command.
 
Methods inherited from class org.openanzo.model.transaction.impl.TransactionCommand
addStatementAddition, addStatementRemoval, filter, getAdditionContexts, getAdditions, getCommandType, getDeletionContexts, getDeletions, getParentTransaction, getPreconditions, isEmpty, setParentTransaction, setPreconditions, sizeAdditions, sizeAdditions, sizeDeletions, sizeDeletions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBPersistedCommand

public RDBPersistedCommand(RDBNamedGraphContainer container,
                           RDBPersistedTransaction transaction,
                           java.lang.String commandType)
Create a new RDB persisted command with a command type

Parameters:
container - JDBC container for data
transaction - Parent transaction
commandType - Type of this command

RDBPersistedCommand

public RDBPersistedCommand(RDBNamedGraphContainer container,
                           RDBPersistedTransaction transaction)
Create a new RDB persisted command with no type

Parameters:
container - JDBC container for data
transaction - Parent transaction

RDBPersistedCommand

public RDBPersistedCommand(RDBNamedGraphContainer container,
                           RDBPersistedTransaction transaction,
                           long commandId,
                           java.lang.String commandType,
                           java.util.Set<IPrecondition> preconditions)
                    throws AnzoException
Create a RDBPersistedCommand for a persisted command

Parameters:
container - JDBC container for data
transaction - Parent transaction
commandId - Id for persisted command
commandType - Type for the command
preconditions - Precondition for command
Throws:
AnzoException, - if there was an error loading command from the RDB
AnzoException
Method Detail

save

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

Specified by:
save in interface ITransactionCommand
Overrides:
save in class TransactionCommand
Throws:
AnzoException - if there is an error saving command

delete

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

Specified by:
delete in interface ITransactionCommand
Overrides:
delete in class TransactionCommand
Throws:
AnzoException - if there is an error deleting command

setCommandType

public void setCommandType(java.lang.String commandType)
Description copied from interface: ITransactionCommand
Set the type name for this command.

Specified by:
setCommandType in interface ITransactionCommand
Overrides:
setCommandType in class TransactionCommand
Parameters:
commandType - Command's type String

getCommandId

public long getCommandId()
Get the command's unique id

Returns:
the command's unique id


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