org.modeshape.connector.meta.jdbc
Class JdbcMetadataRepository.JdbcMetadataTransaction
java.lang.Object
org.modeshape.graph.connector.base.BaseTransaction<NodeType,WorkspaceType>
org.modeshape.graph.connector.base.PathTransaction<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace>
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>
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 |
JdbcMetadataRepository.JdbcMetadataTransaction
public JdbcMetadataRepository.JdbcMetadataTransaction(Repository<PathNode,org.modeshape.connector.meta.jdbc.JdbcMetadataWorkspace> repository,
UUID rootNodeUuid)
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 nodeparentPath
- the path of the parent node; may be null if this is the root nodeproperties
- 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 nulloriginalToClone
- 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-2012 JBoss, a division of Red Hat. All Rights Reserved.