public interface JcrQueryContext
JcrQuery
instances and which can provide the required functionality needed by the JcrQuery and JcrQueryResult classes.| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(CachedNode node)
Checks if there is a
ModeShapePermissions.READ permission for the given node in this context. |
void |
checkValid()
Method that verifies that this query context is still valid for use.
|
CancellableQuery |
createExecutableQuery(QueryCommand query,
PlanHints hints,
Map<String,Object> variables)
|
Value |
createValue(int propertyType,
Object value)
Create a JCR
Value instance given the supplied value and property type. |
BufferManager |
getBufferManager()
Get the buffer manager.
|
long |
getChildCount(CachedNode node)
Get the number of children of the supplied cached node.
|
long |
getDepth(CachedNode node)
Get the depth of the supplied cached node.
|
ExecutionContext |
getExecutionContext()
Get the execution context that should be used by the query.
|
String |
getIdentifier(CachedNode node)
Get the internal
public JCR identifier of the supplied cached node. |
Name |
getName(CachedNode node)
Get the internal
Name of the supplied cached node. |
Node |
getNode(CachedNode node)
Obtain the JCR node given the supplied cached node.
|
Path |
getPath(CachedNode node)
Get the internal
Path of the supplied cached node. |
String |
getUuid(CachedNode node)
Get the UUID identifier of the supplied cached node.
|
String |
getWorkspaceName()
Get the name of the current workspace.
|
void |
recordDuration(long duration,
TimeUnit unit,
String query,
String language)
Record the duration of a query.
|
Node |
storeQuery(String absolutePath,
Name nodeType,
String language,
String statement)
Store the query at the given location.
|
void checkValid()
throws RepositoryException
RepositoryException - if session has been closed and is no longer usable.ExecutionContext getExecutionContext()
BufferManager getBufferManager()
String getWorkspaceName()
Node storeQuery(String absolutePath, Name nodeType, String language, String statement) throws RepositoryException
absolutePath - the location at which the query should be stored; may not be nullnodeType - the node type for the node; may not be nulllanguage - the query language; may not be nullstatement - the query statement; may not be nullRepositoryException - if there was a problem storing the queryCancellableQuery createExecutableQuery(QueryCommand query, PlanHints hints, Map<String,Object> variables) throws RepositoryException
query - the abstract query command; may not be nullhints - the hintsvariables - the map of variables and the corresonding valuesRepositoryException - if there is a problem accessing or using the repositoryNode getNode(CachedNode node)
node - the cached node obtained from the query resultsboolean canRead(CachedNode node)
ModeShapePermissions.READ permission for the given node in this context.node - a CachedNode, never nulltrue if the current context can read the given node, false otherwiseValue createValue(int propertyType, Object value)
Value instance given the supplied value and property type.propertyType - the JCR property typevalue - the valuevoid recordDuration(long duration,
TimeUnit unit,
String query,
String language)
duration - the duration in nanoseconds; must be positiveunit - the time unit for the duration; may not be nullquery - the query string; may not be nulllanguage - the query language; may not be nullPath getPath(CachedNode node)
Path of the supplied cached node.node - the cached node; may not be nullName getName(CachedNode node)
Name of the supplied cached node.node - the cached node; may not be nullString getIdentifier(CachedNode node)
public JCR identifier of the supplied cached node.node - the cached node; may not be nulllong getDepth(CachedNode node)
node - the cached node; may not be nulllong getChildCount(CachedNode node)
node - the cached node; may not be nullString getUuid(CachedNode node)
node - the cached node; may not be nullCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.