org.modeshape.graph
Class Graph.Batch

java.lang.Object
  extended by org.modeshape.graph.Graph.Batch
All Implemented Interfaces:
Graph.Executable<Node>
Enclosing class:
Graph

@Immutable
public final class Graph.Batch
extends Object
implements Graph.Executable<Node>

Interface for creating multiple requests to perform various operations. Note that all the requests are accumulated until the execute() method is called. The results of all the operations are then available in the Results object returned by the execute().


Field Summary
protected  boolean executed
           
protected  Graph.BatchConjunction nextRequests
           
protected  BatchRequestBuilder requestQueue
           
protected  String workspaceName
           
 
Method Summary
 Graph.AddValue<Graph.Batch> addValue(Object value)
           
 Graph.ApplyFunction<Graph.Batch> applyFunction(Function function)
          Request that the supplied function with input parameters be applied to the location in the workspace defined on the returned Graph.ApplyFunction object.
protected  void assertNotExecuted()
           
 Graph.Clone<Graph.BatchConjunction> clone(Iterable<Property> idProperties)
          Begin the request to clone a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(Location from)
          Begin the request to clone a node at the specified location into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(Node from)
          Begin the request to clone the specified node into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(Path from)
          Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(Property idProperty)
          Begin the request to clone a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(Property firstIdProperty, Property... additionalIdProperties)
          Begin the request to clone a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(String fromPath)
          Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Clone<Graph.BatchConjunction> clone(UUID from)
          Begin the request to clone a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Iterable<Property> idProperties)
          Begin the request to copy a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Location from)
          Begin the request to copy a node at the specified location into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Node from)
          Begin the request to copy the specified node into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Path from)
          Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Property idProperty)
          Begin the request to copy a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(Property firstIdProperty, Property... additionalIdProperties)
          Begin the request to copy a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(String fromPath)
          Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Copy<Graph.BatchConjunction> copy(UUID from)
          Begin the request to copy a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...)
protected  Graph.CreateAction<Graph.Batch> create(Location parent, Name child)
           
 Graph.Create<Graph.Batch> create(Path at)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(Path at, Iterable<Property> properties)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(Path at, Property property)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(Path at, Property firstProperty, Property... additionalProperties)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(String atPath)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(String atPath, Property property)
          Begin the request to create a node located at the supplied path.
 Graph.Create<Graph.Batch> create(String atPath, Property firstProperty, Property... additionalProperties)
          Begin the request to create a node located at the supplied path.
 Graph.CreateNodeNamed<Graph.Batch> createUnder(Location parent)
          Begin the request to create a node under the existing parent node at the supplied location.
 Graph.BatchConjunction delete(Iterable<Property> idProperties)
          Request to delete the node with the given identification properties.
 Graph.BatchConjunction delete(Location at)
          Request to delete the node at the given location.
 Graph.BatchConjunction delete(Node at)
          Request to delete the specified node.
 Graph.BatchConjunction delete(Path at)
          Request to delete the node at the given path.
 Graph.BatchConjunction delete(Property idProperty)
          Request to delete the node with the given unique identification property.
 Graph.BatchConjunction delete(Property firstIdProperty, Property... additionalIdProperties)
          Request to delete the node with the given identification properties.
 Graph.BatchConjunction delete(String atPath)
          Request to delete the node at the given path.
 Graph.BatchConjunction delete(UUID at)
          Request to delete the node with the given UUID.
 Results execute()
          Stop accumulating the requests, submit them to the repository source, and return the results.
 String getCurrentWorkspaceName()
          Get the name of the workspace that this batch is using.
 Graph getGraph()
          Obtain the graph that this batch uses.
 boolean hasExecuted()
          Return whether this batch has been executed.
 boolean isExecuteRequired()
          Determine whether this batch needs to be executed (there are requests and the batch has not been executed yet).
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Location at)
          Request to lock the node at the given location.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Node at)
          Request to lock the specified node.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Path at)
          Request to lock the node at the given path.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Property idProperty)
          Request to lock the node with the given unique identification property.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Property firstIdProperty, Property... additionalIdProperties)
          Request to lock the node with the given identification properties.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(String atPath)
          Request to lock the node at the given path.
 Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(UUID at)
          Request to lock the node with the given UUID.
 Graph.Conjunction<Graph.Batch> merge(Graph otherContent)
          Ensure that this graph contains the content in the supplied graph.
 Graph.Move<Graph.BatchConjunction> move(Iterable<Property> idProperties)
          Begin the request to move a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(Location from)
          Begin the request to move a node at the specified location into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(Node from)
          Begin the request to move the specified node into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(Path from)
          Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(Property idProperty)
          Begin the request to move a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(Property firstIdProperty, Property... additionalIdProperties)
          Begin the request to move a node with the specified identification properties into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(String fromPath)
          Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...)
 Graph.Move<Graph.BatchConjunction> move(UUID from)
          Begin the request to move a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...)
 Graph.BatchConjunction read(Iterable<Property> idProperties)
          Request to read the node with the supplied unique identifier properties.
 Graph.BatchConjunction read(Location location)
          Request to read the node at the supplied location.
 Graph.BatchConjunction read(Path path)
          Request to read the node at the supplied path.
 Graph.BatchConjunction read(Property idProperty)
          Request to read the node with the supplied unique identifier property.
 Graph.BatchConjunction read(Property firstIdProperty, Property... additionalIdProperties)
          Request to read the node with the supplied unique identifier properties.
 Graph.BatchConjunction read(String path)
          Request to read the node at the supplied path.
 Graph.BatchConjunction read(UUID uuid)
          Request to read the node with the supplied UUID.
 Graph.Of<Graph.BatchConjunction> readChildren()
          Request that the children be read on the node defined via the of(...)
 Graph.On<Graph.BatchConjunction> readProperties()
          Request that the properties be read on the node defined via the on(...)
 Graph.On<Graph.BatchConjunction> readProperty(Name name)
          Request that the property with the given name be read on the node defined via the on(...)
 Graph.On<Graph.BatchConjunction> readProperty(String propertyName)
          Request that the property with the given name be read on the node defined via the on(...)
 Graph.At<Graph.BatchConjunction> readSubgraphOfDepth(int depth)
          Request to read a subgraph of the specified depth, rooted at a location that will be specified via at(...)
 Graph.On<Graph.BatchConjunction> remove(Name... propertyNames)
          Remove properties from the node at the given location.
 Graph.On<Graph.BatchConjunction> remove(String... propertyNames)
          Remove properties from the node at the given location.
 Graph.RemoveValue<Graph.Batch> removeValue(Object value)
           
 Graph.On<Graph.BatchConjunction> set(Iterable<Property> properties)
          Set the properties on a node.
 Graph.SetValues<Graph.BatchConjunction> set(Name propertyName)
          Set a property on a node, starting with the name.
 Graph.On<Graph.BatchConjunction> set(Property... properties)
          Set the properties on a node.
 Graph.SetValues<Graph.BatchConjunction> set(String propertyName)
          Set a property on a node, starting with the name.
 String toString()
          
 Graph.BatchConjunction unlock(Location at)
          Request to unlock the node at the given location.
 Graph.BatchConjunction unlock(Node at)
          Request to unlock the specified node.
 Graph.BatchConjunction unlock(Path at)
          Request to unlock the node at the given path.
 Graph.BatchConjunction unlock(Property idProperty)
          Request to unlock the node with the given unique identification property.
 Graph.BatchConjunction unlock(Property firstIdProperty, Property... additionalIdProperties)
          Request to unlock the node with the given identification properties.
 Graph.BatchConjunction unlock(String atPath)
          Request to unlock the node at the given path.
 Graph.BatchConjunction unlock(UUID at)
          Request to unlock the node with the given UUID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requestQueue

protected final BatchRequestBuilder requestQueue

nextRequests

protected final Graph.BatchConjunction nextRequests

workspaceName

protected final String workspaceName

executed

protected boolean executed
Method Detail

hasExecuted

public boolean hasExecuted()
Return whether this batch has been executed.

Returns:
true if this batch has already been executed, or false otherwise

isExecuteRequired

public boolean isExecuteRequired()
Determine whether this batch needs to be executed (there are requests and the batch has not been executed yet).

Returns:
true if there are some requests in this batch that need to be executed, or false execution is not required

getGraph

public Graph getGraph()
Obtain the graph that this batch uses.

Returns:
the graph; never null

getCurrentWorkspaceName

public String getCurrentWorkspaceName()
Get the name of the workspace that this batch is using. This is always constant throughout the lifetime of the batch.

Returns:
the name of the workspace; never null

assertNotExecuted

protected final void assertNotExecuted()

move

public Graph.Move<Graph.BatchConjunction> move(Node from)
Begin the request to move the specified node into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public final Graph.Move<Graph.BatchConjunction> move(Location from)
Begin the request to move a node at the specified location into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the location of the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(String fromPath)
Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
fromPath - the path to the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(Path from)
Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the path to the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(UUID from)
Begin the request to move a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the UUID of the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(Property idProperty)
Begin the request to move a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object. The identification property should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperty - the unique identification property of the node that is to be moved.
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(Property firstIdProperty,
                                               Property... additionalIdProperties)
Begin the request to move a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
firstIdProperty - the first identification property of the node that is to be moved
additionalIdProperties - the remaining identification properties of the node that is to be moved
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

move

public Graph.Move<Graph.BatchConjunction> move(Iterable<Property> idProperties)
Begin the request to move a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Move object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperties - the identification properties of the node that is to be moved
Returns:
the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Node at)
Request to lock the specified node. This request is submitted to the repository immediately.

Parameters:
at - the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(String atPath)
Request to lock the node at the given path. This request is submitted to the repository immediately.

Parameters:
atPath - the path of the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Path at)
Request to lock the node at the given path. This request is submitted to the repository immediately.

Parameters:
at - the path of the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(UUID at)
Request to lock the node with the given UUID. This request is submitted to the repository immediately.

Parameters:
at - the UUID of the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Property idProperty)
Request to lock the node with the given unique identification property. This request is submitted to the repository immediately.

Parameters:
idProperty - the unique identifying property of the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Property firstIdProperty,
                                                                       Property... additionalIdProperties)
Request to lock the node with the given identification properties. The identification properties should uniquely identify a single node. This request is submitted to the repository immediately.

Parameters:
firstIdProperty - the first identification property of the node that is to be copied
additionalIdProperties - the remaining identification properties of the node that is to be copied
Returns:
an object that allows the scope of the lock to be defined

lock

public Graph.LockScope<Graph.LockTimeout<Graph.BatchConjunction>> lock(Location at)
Request to lock the node at the given location. This request is submitted to the repository immediately.

Parameters:
at - the location of the node that is to be locked
Returns:
an object that allows the scope of the lock to be defined

unlock

public Graph.BatchConjunction unlock(Node at)
Request to unlock the specified node. This request is submitted to the repository immediately.

Parameters:
at - the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(String atPath)
Request to unlock the node at the given path. This request is submitted to the repository immediately.

Parameters:
atPath - the path of the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(Path at)
Request to unlock the node at the given path. This request is submitted to the repository immediately.

Parameters:
at - the path of the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(UUID at)
Request to unlock the node with the given UUID. This request is submitted to the repository immediately.

Parameters:
at - the UUID of the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(Property idProperty)
Request to unlock the node with the given unique identification property. This request is submitted to the repository immediately.

Parameters:
idProperty - the unique identifying property of the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(Property firstIdProperty,
                                     Property... additionalIdProperties)
Request to unlock the node with the given identification properties. The identification properties should uniquely identify a single node. This request is submitted to the repository immediately.

Parameters:
firstIdProperty - the first identification property of the node that is to be copied
additionalIdProperties - the remaining identification properties of the node that is to be copied
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

unlock

public Graph.BatchConjunction unlock(Location at)
Request to unlock the node at the given location. This request is submitted to the repository immediately.

Parameters:
at - the location of the node that is to be unlocked
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

clone

public Graph.Clone<Graph.BatchConjunction> clone(Node from)
Begin the request to clone the specified node into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(Location from)
Begin the request to clone a node at the specified location into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the location of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(String fromPath)
Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
fromPath - the path to the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(Path from)
Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object.

Like all other methods on the Graph, the clone request will be performed immediately when the into(...) method is called.

Parameters:
from - the path to the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(UUID from)
Begin the request to clone a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the UUID of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(Property idProperty)
Begin the request to clone a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object. The identification property should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperty - the unique identification property of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(Property firstIdProperty,
                                                 Property... additionalIdProperties)
Begin the request to clone a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
firstIdProperty - the first identification property of the node that is to be copied
additionalIdProperties - the remaining identification properties of the node that is to be copied
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

clone

public Graph.Clone<Graph.BatchConjunction> clone(Iterable<Property> idProperties)
Begin the request to clone a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Clone object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperties - the identification properties of the node that is to be copied
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Node from)
Begin the request to copy the specified node into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Location from)
Begin the request to copy a node at the specified location into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the location of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(String fromPath)
Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
fromPath - the path to the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Path from)
Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object.

Like all other methods on the Graph, the copy request will be performed immediately when the into(...) method is called.

Parameters:
from - the path to the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(UUID from)
Begin the request to copy a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
from - the UUID of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Property idProperty)
Begin the request to copy a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object. The identification property should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperty - the unique identification property of the node that is to be copied.
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Property firstIdProperty,
                                               Property... additionalIdProperties)
Begin the request to copy a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
firstIdProperty - the first identification property of the node that is to be copied
additionalIdProperties - the remaining identification properties of the node that is to be copied
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

copy

public Graph.Copy<Graph.BatchConjunction> copy(Iterable<Property> idProperties)
Begin the request to copy a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) method on the returned Graph.Copy object. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperties - the identification properties of the node that is to be copied
Returns:
the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

delete

public Graph.BatchConjunction delete(Node at)
Request to delete the specified node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(Location at)
Request to delete the node at the given location.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the location of the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(String atPath)
Request to delete the node at the given path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
atPath - the path of the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(Path at)
Request to delete the node at the given path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the path of the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(UUID at)
Request to delete the node with the given UUID.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the UUID of the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(Property idProperty)
Request to delete the node with the given unique identification property.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperty - the unique identifying property of the node that is to be deleted
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(Property firstIdProperty,
                                     Property... additionalIdProperties)
Request to delete the node with the given identification properties. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
firstIdProperty - the first identification property of the node that is to be copied
additionalIdProperties - the remaining identification properties of the node that is to be copied
Returns:
an object that may be used to start another request

delete

public Graph.BatchConjunction delete(Iterable<Property> idProperties)
Request to delete the node with the given identification properties. The identification properties should uniquely identify a single node.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperties - the identification property of the node that is to be copied
Returns:
an object that may be used to start another request

create

public Graph.Create<Graph.Batch> create(String atPath)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
atPath - the path to the node that is to be created.
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

public Graph.Create<Graph.Batch> create(String atPath,
                                        Property property)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
atPath - the path to the node that is to be created.
property - a property for the new node
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

public Graph.Create<Graph.Batch> create(String atPath,
                                        Property firstProperty,
                                        Property... additionalProperties)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
atPath - the path to the node that is to be created.
firstProperty - a property for the new node
additionalProperties - additional properties for the new node
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

public final Graph.Create<Graph.Batch> create(Path at)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the path to the node that is to be created.
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

protected final Graph.CreateAction<Graph.Batch> create(Location parent,
                                                       Name child)

create

public Graph.Create<Graph.Batch> create(Path at,
                                        Iterable<Property> properties)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the path to the node that is to be created.
properties - the iterator over the properties for the new node
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

public Graph.Create<Graph.Batch> create(Path at,
                                        Property property)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the path to the node that is to be created.
property - a property for the new node
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

create

public Graph.Create<Graph.Batch> create(Path at,
                                        Property firstProperty,
                                        Property... additionalProperties)
Begin the request to create a node located at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
at - the path to the node that is to be created.
firstProperty - a property for the new node
additionalProperties - additional properties for the new node
Returns:
the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

createUnder

public Graph.CreateNodeNamed<Graph.Batch> createUnder(Location parent)
Begin the request to create a node under the existing parent node at the supplied location. This request is submitted to the repository after the returned components are completed.

Parameters:
parent - the location of the parent
Returns:
the object used to start creating a node

addValue

public Graph.AddValue<Graph.Batch> addValue(Object value)

removeValue

public Graph.RemoveValue<Graph.Batch> removeValue(Object value)

set

public Graph.On<Graph.BatchConjunction> set(Property... properties)
Set the properties on a node.

Parameters:
properties - the properties to set
Returns:
the interface that should be used to specify the node on which the properties are to be set.

set

public Graph.On<Graph.BatchConjunction> set(Iterable<Property> properties)
Set the properties on a node.

Parameters:
properties - the properties to set
Returns:
the interface that should be used to specify the node on which the properties are to be set.

set

public Graph.SetValues<Graph.BatchConjunction> set(String propertyName)
Set a property on a node, starting with the name. The interface returned from this method should be used to specify the value(s) and the location of the node onto which the property should be set.

Parameters:
propertyName - the property name
Returns:
the interface used to specify the values

set

public Graph.SetValues<Graph.BatchConjunction> set(Name propertyName)
Set a property on a node, starting with the name. The interface returned from this method should be used to specify the value(s) and the location of the node onto which the property should be set.

Parameters:
propertyName - the property name
Returns:
the interface used to specify the values

remove

public Graph.On<Graph.BatchConjunction> remove(Name... propertyNames)
Remove properties from the node at the given location.

Parameters:
propertyNames - the names of the properties to be removed
Returns:
the remove request object that should be used to specify the node from which the properties are to be removed.

remove

public Graph.On<Graph.BatchConjunction> remove(String... propertyNames)
Remove properties from the node at the given location.

Parameters:
propertyNames - the names of the properties to be removed
Returns:
the remove request object that should be used to specify the node from which the properties are to be removed.

read

public Graph.BatchConjunction read(UUID uuid)
Request to read the node with the supplied UUID.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
uuid - the UUID of the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(Location location)
Request to read the node at the supplied location.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
location - the location of the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(String path)
Request to read the node at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
path - the path of the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(Path path)
Request to read the node at the supplied path.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
path - the path of the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(Property idProperty)
Request to read the node with the supplied unique identifier property.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperty - the identification property that is unique to the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(Property firstIdProperty,
                                   Property... additionalIdProperties)
Request to read the node with the supplied unique identifier properties.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
firstIdProperty - the first of the identification properties that uniquely identify the node that is to be read
additionalIdProperties - the remaining identification properties that uniquely identify the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

read

public Graph.BatchConjunction read(Iterable<Property> idProperties)
Request to read the node with the supplied unique identifier properties.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
idProperties - the identification properties that uniquely identify the node that is to be read
Returns:
the interface that can either execute the batched requests or continue to add additional requests to the batch

readProperty

public Graph.On<Graph.BatchConjunction> readProperty(String propertyName)
Request that the property with the given name be read on the node defined via the on(...) method on the returned Graph.On object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
propertyName - the name of the property that is to be read
Returns:
the object that is used to specified the node whose property is to be read

readProperty

public Graph.On<Graph.BatchConjunction> readProperty(Name name)
Request that the property with the given name be read on the node defined via the on(...) method on the returned Graph.On object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
name - the name of the property that is to be read
Returns:
the object that is used to specified the node whose property is to be read

readProperties

public Graph.On<Graph.BatchConjunction> readProperties()
Request that the properties be read on the node defined via the on(...) method on the returned Graph.On object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Returns:
the object that is used to specified the node whose properties are to be read,

readChildren

public Graph.Of<Graph.BatchConjunction> readChildren()
Request that the children be read on the node defined via the of(...) method on the returned Graph.Of object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Returns:
the object that is used to specified the node whose children are to be read

readSubgraphOfDepth

public Graph.At<Graph.BatchConjunction> readSubgraphOfDepth(int depth)
Request to read a subgraph of the specified depth, rooted at a location that will be specified via at(...) in the resulting Graph.CreateAt object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
depth - the maximum depth of the subgraph that should be read
Returns:
the component that should be used to specify the location of the node that is the top of the subgraph

merge

public Graph.Conjunction<Graph.Batch> merge(Graph otherContent)
Ensure that this graph contains the content in the supplied graph. Any changes are recorded as operations on this batch, and require execution.

Parameters:
otherContent - the content that should exist within this graph or, if it does not exist, added to this graph
Returns:
the interface for additional requests or actions

applyFunction

public Graph.ApplyFunction<Graph.Batch> applyFunction(Function function)
Request that the supplied function with input parameters be applied to the location in the workspace defined on the returned Graph.ApplyFunction object.

Like all other methods on the Graph.Batch, the request will be performed when the execute() method is called.

Parameters:
function - the function to be applied
Returns:
the object that is used to specified the node whose children are to be read
Throws:
IllegalArgumentException - if the function reference is null

execute

public Results execute()
Stop accumulating the requests, submit them to the repository source, and return the results.

Specified by:
execute in interface Graph.Executable<Node>
Returns:
the results containing the requested information from the repository.
See Also:
Graph.Executable.execute()

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.