org.modeshape.jcr.query
Class JcrAbstractQuery
java.lang.Object
org.modeshape.jcr.query.JcrAbstractQuery
- All Implemented Interfaces:
- Query
- Direct Known Subclasses:
- JcrQuery
public abstract class JcrAbstractQuery
- extends Object
- implements Query
Abstract implementation of JCR's Query
interface.
Constructor Summary |
protected |
JcrAbstractQuery(JcrQueryContext context,
String statement,
String language,
Path storedAtPath)
Creates a new JCR Query by specifying the query statement itself, the language in which the query is stated, the
QueryCommand representation and, optionally, the node from which the query was loaded. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.modeshape.jcr.api.query.Query |
cancel |
context
protected final JcrQueryContext context
language
protected final String language
statement
protected final String statement
JcrAbstractQuery
protected JcrAbstractQuery(JcrQueryContext context,
String statement,
String language,
Path storedAtPath)
- Creates a new JCR
Query
by specifying the query statement itself, the language in which the query is stated, the
QueryCommand
representation and, optionally, the node from which the query was loaded. The language must be a
string from among those returned by QueryManager#getSupportedQueryLanguages()
.
- Parameters:
context
- the context that was used to create this query and that will be used to execute this query; may not be nullstatement
- the original statement as supplied by the client; may not be nulllanguage
- the language obtained from the QueryParser
; may not be nullstoredAtPath
- the path at which this query was stored, or null if this is not a stored query
context
protected final JcrQueryContext context()
pathFor
protected final Path pathFor(String path)
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interface Query
getStatement
public String getStatement()
- Specified by:
getStatement
in interface Query
getStoredQueryPath
public String getStoredQueryPath()
throws ItemNotFoundException
- Specified by:
getStoredQueryPath
in interface Query
- Throws:
ItemNotFoundException
storeAsNode
public Node storeAsNode(String absPath)
throws PathNotFoundException,
ConstraintViolationException,
RepositoryException
- Specified by:
storeAsNode
in interface Query
- Throws:
PathNotFoundException
ConstraintViolationException
RepositoryException
checkForProblems
protected void checkForProblems(Problems problems)
throws RepositoryException
- Throws:
RepositoryException
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.