|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.query.AbstractQueryImpl org.apache.jackrabbit.core.query.QueryImpl
Provides the default implementation for a JCR query.
Field Summary | |
protected QueryHandler |
handler
The query handler for this query. |
protected String |
language
The syntax of the query statement |
protected Node |
node
The node where this query is persisted. |
protected ExecutableQuery |
query
The actual query implementation that can be executed |
protected SessionImpl |
session
The session of the user executing this query |
protected String |
statement
The query statement |
Fields inherited from interface javax.jcr.query.Query |
SQL, XPATH |
Constructor Summary | |
QueryImpl()
|
Method Summary | |
protected void |
checkInitialized()
Checks if this query is initialized and throws an IllegalStateException if it is not yet initialized. |
protected void |
checkNotInitialized()
Checks if this query is not yet initialized and throws an IllegalStateException if it is already initialized. |
QueryResult |
execute()
This method simply forwards the execute call to the
ExecutableQuery object returned by
QueryHandler.createExecutableQuery(org.apache.jackrabbit.core.SessionImpl, org.apache.jackrabbit.core.ItemManager, java.lang.String, java.lang.String) . |
String |
getLanguage()
|
String |
getStatement()
|
String |
getStoredQueryPath()
|
void |
init(SessionImpl session,
ItemManager itemMgr,
QueryHandler handler,
Node node)
Initializes a query instance from a nt:query node. |
void |
init(SessionImpl session,
ItemManager itemMgr,
QueryHandler handler,
String statement,
String language)
Initializes a query instance from a query string. |
Node |
storeAsNode(String absPath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SessionImpl session
protected String statement
protected String language
protected ExecutableQuery query
protected Node node
protected QueryHandler handler
Constructor Detail |
public QueryImpl()
Method Detail |
public void init(SessionImpl session, ItemManager itemMgr, QueryHandler handler, String statement, String language) throws InvalidQueryException
AbstractQueryImpl
init
in class AbstractQueryImpl
session
- the session of the user executing this query.itemMgr
- the item manager of the session executing this query.handler
- the query handler of the search index.statement
- the query statement.language
- the syntax of the query statement.
InvalidQueryException
- if the query statement is invalid according
to the specified language
.public void init(SessionImpl session, ItemManager itemMgr, QueryHandler handler, Node node) throws InvalidQueryException, RepositoryException
AbstractQueryImpl
init
in class AbstractQueryImpl
session
- the session of the user executing this query.itemMgr
- the item manager of the session executing this query.handler
- the query handler of the search index.node
- a node of type nt:query
.
RepositoryException
- if another error occurs
InvalidQueryException
- If node
is not a valid persisted query
(that is, a node of type nt:query
).public QueryResult execute() throws RepositoryException
execute
call to the
ExecutableQuery
object returned by
QueryHandler.createExecutableQuery(org.apache.jackrabbit.core.SessionImpl, org.apache.jackrabbit.core.ItemManager, java.lang.String, java.lang.String)
.
RepositoryException
public String getStatement()
public String getLanguage()
public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException
ItemNotFoundException
RepositoryException
public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
UnsupportedRepositoryOperationException
RepositoryException
protected void checkNotInitialized()
IllegalStateException
if it is already initialized.
protected void checkInitialized()
IllegalStateException
if it is not yet initialized.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |