|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.transaction.impl.Transaction
public class Transaction
Standard implementation of ITransation.
| Constructor Summary | |
|---|---|
Transaction(ITransactionQueue queue)
Create a new transaction |
|
| Method Summary | |
|---|---|
ITransactionCommand |
createNewCommand(java.lang.String commandType,
java.util.Set<IPrecondition> preconditions)
Create a new command for this queue, but do not add it to queue yet |
void |
delete()
Delete the transaction from its store. |
void |
filter(java.util.Collection<org.openrdf.model.Statement> results,
org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... context)
Use contents of ITransaction to filter the statements contained within the results collection |
int |
getCommandCount()
Get the number of the commands within this transaction. |
java.util.List<ITransactionCommand> |
getCommands()
Get a List of all the commands within this transaction. |
ITransactionCommand |
getCurrentCommand(boolean create)
Get the current command if one exists, and create if empty and create flag is true |
long |
getId()
|
ITransactionQueue |
getTransactionQueue()
Get the transactionQueue that this transaction is associated with. |
java.lang.Long |
getTransactionTimestamp()
Get the transactionTimestamp |
boolean |
isEmpty()
Does this transaction have any commands |
ITransactionCommand |
nextCommand(java.lang.String commandType)
Create a new command with given type, and set it as the current command in this transaction |
void |
redo()
Redo the last command undone. |
void |
save()
Save the transaction to its store. |
void |
setId(long id)
Set the unique id for this transaction, useful when dealing with server transactions. |
void |
setTransactionQueue(ITransactionQueue transactionQueue)
Set the transaction queue that this transaction will be associated with. |
void |
setTransactionTimestamp(java.lang.Long transactionTimestamp)
Set the the transactionTimestamp |
void |
undo()
Undo the last command. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transaction(ITransactionQueue queue)
queue - Parent transaction queue| Method Detail |
|---|
public ITransactionCommand createNewCommand(java.lang.String commandType,
java.util.Set<IPrecondition> preconditions)
commandType - Type of commandpreconditions - Precondition for command
public ITransactionCommand nextCommand(java.lang.String commandType)
nextCommand in interface ITransactioncommandType - Type of command
public ITransactionCommand getCurrentCommand(boolean create)
ITransaction
getCurrentCommand in interface ITransactioncreate - Whether to create a new command if one doesn't exist.
public void save()
throws AnzoException
ITransaction
save in interface ITransactionAnzoException - if there is an error saving tranaction
public void delete()
throws AnzoException
ITransaction
delete in interface ITransactionAnzoException - if there is an error deleting tranactionpublic boolean isEmpty()
ITransaction
isEmpty in interface ITransactionpublic int getCommandCount()
ITransaction
getCommandCount in interface ITransactionpublic java.util.List<ITransactionCommand> getCommands()
ITransaction
getCommands in interface ITransaction
public void filter(java.util.Collection<org.openrdf.model.Statement> results,
org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... context)
ITransaction
filter in interface ITransactionresults - The collection to overlay with the additions and deletions within this transaction.s - The subject of the statement pattern being searched on.p - The property of the statement pattern being searched on.o - The object of the statement pattern being searched on.context - The contexts of the statement pattern being searched on.
public void undo()
throws AnzoException
ITransaction
undo in interface ITransactionAnzoException - if there was an error undoing transactionpublic void redo()
ITransaction
redo in interface ITransactionpublic ITransactionQueue getTransactionQueue()
ITransaction
getTransactionQueue in interface ITransactionpublic void setTransactionQueue(ITransactionQueue transactionQueue)
ITransaction
setTransactionQueue in interface ITransactiontransactionQueue - to which this transaction belongspublic long getId()
getId in interface ITransactionpublic void setId(long id)
ITransaction
setId in interface ITransactionid - unique if for this transactionpublic java.lang.Long getTransactionTimestamp()
getTransactionTimestamp in interface ITransactionpublic void setTransactionTimestamp(java.lang.Long transactionTimestamp)
setTransactionTimestamp in interface ITransactiontransactionTimestamp - the transactionTimestamp to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||