|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.transaction.impl.TransactionCommand
public class TransactionCommand
Standard implementation of ICommand, consisting of a set of NamedGraphChangeSets for the affected graphs.
| Constructor Summary | |
|---|---|
TransactionCommand(ITransaction parentTransaction)
Create a new command without a type |
|
TransactionCommand(ITransaction parentTransaction,
java.lang.String commandType,
java.util.Set<IPrecondition> preconditions)
Create a new command with given type, preconditions and context |
|
| Method Summary | |
|---|---|
void |
addStatementAddition(org.openrdf.model.Statement... statements)
Add statements to additions for the current command |
void |
addStatementRemoval(org.openrdf.model.Statement... statements)
Add statements to deleted for the current command |
void |
delete()
Delete the command 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 this command to filter the statements contained within the results collection |
java.util.Collection<org.openrdf.model.URI> |
getAdditionContexts()
Get the set of contexts affected by additions within this command |
java.util.Collection<org.openrdf.model.Statement> |
getAdditions()
Get the set of additions within this command |
java.lang.String |
getCommandType()
Get the type name for the command. |
java.util.Collection<org.openrdf.model.URI> |
getDeletionContexts()
Get the set of contexts affected by deletions within this command |
java.util.Collection<org.openrdf.model.Statement> |
getDeletions()
Get the set of deletions within this command |
ITransaction |
getParentTransaction()
Get the parent transaction for this command. |
java.util.Set<IPrecondition> |
getPreconditions()
Get the set of preconditions for this command. |
boolean |
isEmpty()
Determine if this command has any additions or deletions |
void |
save()
Save the command to its store. |
void |
setCommandType(java.lang.String commandType)
Set the type name for this command. |
void |
setParentTransaction(ITransaction parentTransaction)
Set the parent transaction for this command. |
void |
setPreconditions(java.util.Set<IPrecondition> preconditions)
Set this commands preconditions to the given set. |
int |
sizeAdditions()
Get the size of additions within this command |
int |
sizeAdditions(org.openrdf.model.Resource... context)
Get the size of additions within this command for the given contexts |
int |
sizeDeletions()
Get the size of deletions within this command |
int |
sizeDeletions(org.openrdf.model.Resource... context)
Get the size of deletions for the given contexts |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionCommand(ITransaction parentTransaction,
java.lang.String commandType,
java.util.Set<IPrecondition> preconditions)
parentTransaction - Parent TransactioncommandType - Type of commandpreconditions - Set of preconditions for commandpublic TransactionCommand(ITransaction parentTransaction)
parentTransaction - Parent transaction| Method Detail |
|---|
public java.lang.String getCommandType()
ITransactionCommand
getCommandType in interface ITransactionCommandpublic void setCommandType(java.lang.String commandType)
ITransactionCommand
setCommandType in interface ITransactionCommandcommandType - Command's type String
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)
ITransactionCommand
filter in interface ITransactionCommandresults - 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 addStatementAddition(org.openrdf.model.Statement... statements)
ITransactionCommand
addStatementAddition in interface ITransactionCommandstatements - Added Statements to add to commandpublic void addStatementRemoval(org.openrdf.model.Statement... statements)
ITransactionCommand
addStatementRemoval in interface ITransactionCommandstatements - Deleted Statements to add to command
public void delete()
throws AnzoException
ITransactionCommand
delete in interface ITransactionCommandAnzoException - if there is an error deleting command
public void save()
throws AnzoException
ITransactionCommand
save in interface ITransactionCommandAnzoException - if there is an error saving commandpublic boolean isEmpty()
ITransactionCommand
isEmpty in interface ITransactionCommandpublic ITransaction getParentTransaction()
ITransactionCommand
getParentTransaction in interface ITransactionCommandpublic void setParentTransaction(ITransaction parentTransaction)
ITransactionCommand
setParentTransaction in interface ITransactionCommandpublic java.util.Set<IPrecondition> getPreconditions()
ITransactionCommand
getPreconditions in interface ITransactionCommandIPreconditionpublic void setPreconditions(java.util.Set<IPrecondition> preconditions)
ITransactionCommand
setPreconditions in interface ITransactionCommandpreconditions - Set of preconditions that are evaluated on the serverpublic java.util.Collection<org.openrdf.model.Statement> getAdditions()
ITransactionCommand
getAdditions in interface ITransactionCommandpublic java.util.Collection<org.openrdf.model.Statement> getDeletions()
ITransactionCommand
getDeletions in interface ITransactionCommandpublic int sizeAdditions(org.openrdf.model.Resource... context)
ITransactionCommand
sizeAdditions in interface ITransactionCommandcontext - Contexts to determine size
public int sizeDeletions(org.openrdf.model.Resource... context)
ITransactionCommand
sizeDeletions in interface ITransactionCommandcontext - Contexts to determine size
public int sizeAdditions()
ITransactionCommand
sizeAdditions in interface ITransactionCommandpublic int sizeDeletions()
ITransactionCommand
sizeDeletions in interface ITransactionCommandpublic java.util.Collection<org.openrdf.model.URI> getAdditionContexts()
ITransactionCommand
getAdditionContexts in interface ITransactionCommandpublic java.util.Collection<org.openrdf.model.URI> getDeletionContexts()
ITransactionCommand
getDeletionContexts in interface ITransactionCommand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||