org.modeshape.connector.meta.jdbc
Class JdbcMetadataRepository.JdbcMetadataTransaction

java.lang.Object
  extended by org.modeshape.graph.connector.base.BaseTransaction<NodeType,WorkspaceType>
      extended by org.modeshape.graph.connector.base.PathTransaction<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace>
          extended by org.modeshape.connector.meta.jdbc.JdbcMetadataRepository.JdbcMetadataTransaction
All Implemented Interfaces:
Transaction<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace>
Enclosing class:
JdbcMetadataRepository

@NotThreadSafe
protected class JdbcMetadataRepository.JdbcMetadataTransaction
extends PathTransaction<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.modeshape.graph.connector.base.PathTransaction
PathTransaction.WorkspaceChanges
 
Field Summary
 
Fields inherited from class org.modeshape.graph.connector.base.BaseTransaction
context, nameFactory, pathFactory, propertyFactory, rootLocation, rootNodeUuid, valueFactories
 
Constructor Summary
JdbcMetadataRepository.JdbcMetadataTransaction(Repository<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace> repository, UUID rootNodeUuid)
           
 
Method Summary
protected  PathNode createNode(Path.Segment name, Path parentPath, Iterable<Property> properties)
          Create a new instance of the node, given the supplied name and parent path.
 boolean destroyWorkspace(org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace workspace)
          Destroy the workspace with the supplied name.
 org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace getWorkspace(String name, org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace originalToClone)
          Creates a new workspace with the given name containing only a root node.
 
Methods inherited from class org.modeshape.graph.connector.base.PathTransaction
addChild, addChild, cloneNode, commit, copyBranch, copyNode, destroyNode, findNode, getChangesFor, getChild, getChildren, getChildrenLocations, getNode, getParent, pathFor, pathTo, print, query, removeAllChildren, removeNode, removeProperty, rollback, search, setProperties, validateNode, verifyNodeExists
 
Methods inherited from class org.modeshape.graph.connector.base.BaseTransaction
getContext, getFirstChild, getNode, getRepository, getRootLocation, getRootNode, getRootUuid, getWorkspaceNames, lockNode, readable, unlockNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcMetadataRepository.JdbcMetadataTransaction

public JdbcMetadataRepository.JdbcMetadataTransaction(Repository<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace> repository,
                                                      UUID rootNodeUuid)
Method Detail

createNode

protected PathNode createNode(Path.Segment name,
                              Path parentPath,
                              Iterable<Property> properties)
Description copied from class: PathTransaction
Create a new instance of the node, given the supplied name and parent path. This method should do nothing but instantiate the new node; the caller will add to the appropriate internal structures.

Specified by:
createNode in class PathTransaction<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace>
Parameters:
name - the name of the new node; may be null if this is the root node
parentPath - the path of the parent node; may be null if this is the root node
properties - the properties; may be null if there are no properties
Returns:
the new node; never null

destroyWorkspace

public boolean destroyWorkspace(org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace workspace)
                         throws InvalidWorkspaceException
Description copied from interface: Transaction
Destroy the workspace with the supplied name.

Parameters:
workspace - the workspace that is to be destroyed; may not be null
Returns:
true if the workspace was destroyed, or false if the workspace did not exist
Throws:
InvalidWorkspaceException - if the workspace could not be destroyed

getWorkspace

public org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace getWorkspace(String name,
                                                                            org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace originalToClone)
                                                                     throws InvalidWorkspaceException
Description copied from interface: Transaction
Creates a new workspace with the given name containing only a root node. If the workspace already exists, it is left untouched and returned.

Parameters:
name - the name of the workspace; may not be null
originalToClone - the workspace that should be cloned, or null if the new workspace is to only contain a root node
Returns:
the newly created workspace; may not be null
Throws:
InvalidWorkspaceException - if the workspace could not be created


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