public class NodeReadTrx extends Object implements INodeReadTrx
Read-only transaction with single-threaded cursor semantics. Each read-only transaction works on a given revision key.
Modifier and Type | Field and Description |
---|---|
protected IBucketReadTrx |
mPageReadTrx
State of transaction including all cached stuff.
|
Constructor and Description |
---|
NodeReadTrx(IBucketReadTrx pPageTrx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static QName |
buildQName(String paramUri,
String paramName)
Building QName out of uri and name.
|
void |
close()
Close shared read transaction and immediately release all resources.
|
protected INode |
getCurrentNode()
Getter for superclasses.
|
INode |
getNode()
Getting the current node.
|
QName |
getQNameOfCurrentNode()
Getting the name of a current node.
|
String |
getTypeOfCurrentNode()
Getting the type of the current node.
|
String |
getValueOfCurrentNode()
Getting the value of the current node.
|
boolean |
isClosed()
Is the transaction closed?
|
boolean |
moveTo(long pNodeKey)
Move cursor to a node by its node key.
|
boolean |
moveToAttribute(int mIndex)
Move cursor to attribute by its index.
|
boolean |
moveToNamespace(int mIndex)
Move cursor to namespace declaration by its index.
|
String |
nameForKey(int mKey)
Get name for key.
|
protected void |
setCurrentNode(INode paramCurrentNode)
Setter for superclasses.
|
protected void |
setPageTransaction(IBucketReadTrx pPageTrx)
Replace the state of the transaction.
|
String |
toString() |
protected IBucketReadTrx mPageReadTrx
public NodeReadTrx(IBucketReadTrx pPageTrx) throws TTException
pPageTrx
- Transaction state to work with.TTIOException
- if something odd happens within the creation process.TTException
public final boolean moveTo(long pNodeKey) throws TTIOException
moveTo
in interface INodeReadTrx
pNodeKey
- Key of node to select.TTIOException
public final boolean moveToAttribute(int mIndex) throws TTIOException
moveToAttribute
in interface INodeReadTrx
mIndex
- Index of attribute to move to.TTIOException
- if retrieval fails (including non-existing of node)public final boolean moveToNamespace(int mIndex) throws TTIOException
moveToNamespace
in interface INodeReadTrx
mIndex
- Index of attribute to move to.TTIOException
- if retrieval fails (including non-existing of node)public final String getValueOfCurrentNode()
getValueOfCurrentNode
in interface INodeReadTrx
public final QName getQNameOfCurrentNode()
getQNameOfCurrentNode
in interface INodeReadTrx
QName
of the nodepublic final String getTypeOfCurrentNode()
getTypeOfCurrentNode
in interface INodeReadTrx
public final String nameForKey(int mKey)
nameForKey
in interface INodeReadTrx
mKey
- Key, i.e., local part key, URI key, or prefix key.public void close() throws TTException
close
in interface INodeReadTrx
TTException
- If can't close Read Transaction.public final boolean isClosed()
isClosed
in interface INodeReadTrx
protected final void setPageTransaction(IBucketReadTrx pPageTrx)
pPageTrx
- Page Read Trxprotected final INode getCurrentNode()
protected final void setCurrentNode(INode paramCurrentNode)
paramCurrentNode
- The current node to set.public final INode getNode()
getNode
in interface INodeReadTrx
Copyright © 2013. All Rights Reserved.