public class QueryObjectModelImpl extends QueryImpl implements QueryObjectModel
QueryObjectModelImpl
implements the query object model.Modifier and Type | Field and Description |
---|---|
protected QueryObjectModelTree |
qomTree
The query object model tree.
|
Constructor and Description |
---|
QueryObjectModelImpl() |
Modifier and Type | Method and Description |
---|---|
void |
bindValue(String varName,
Value value)
Throws an
IllegalArgumentException as XPath and SQL1 queries
have no bind variables. |
QueryResult |
execute()
This method simply forwards the
execute call to the
ExecutableQuery object returned by
QueryHandler.createExecutableQuery(org.apache.jackrabbit.core.session.SessionContext, java.lang.String, java.lang.String) . |
String[] |
getBindVariableNames() |
Column[] |
getColumns()
Gets the columns for this query.
|
Constraint |
getConstraint()
Gets the constraint for this query.
|
Ordering[] |
getOrderings()
Gets the orderings for this query.
|
Source |
getSource()
Gets the node-tuple source for this query.
|
void |
init(SessionContext sessionContext,
QueryHandler handler,
QueryObjectModelTree qomTree,
String language,
Node node)
Initializes a query instance from a query object model.
|
void |
init(SessionContext sessionContext,
QueryHandler handler,
String statement,
String language,
Node node)
Initialises a query instance from a query string.
|
checkInitialized, checkNotInitialized, getLanguage, getStatement, getStoredQueryPath, setInitialized, setLimit, setOffset, storeAsNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLanguage, getStatement, getStoredQueryPath, setLimit, setOffset, storeAsNode
protected QueryObjectModelTree qomTree
public void init(SessionContext sessionContext, QueryHandler handler, String statement, String language, Node node) throws InvalidQueryException
init
in class QueryImpl
sessionContext
- component context of the current sessionhandler
- the query handler of the search index.statement
- the query statement.language
- the syntax of the query statement.node
- a nt:query node where the query was read from or
null
if it is not a stored query.UnsupportedOperationException
- always.InvalidQueryException
- if the query statement is invalid according
to the specified language
.public void init(SessionContext sessionContext, QueryHandler handler, QueryObjectModelTree qomTree, String language, Node node) throws InvalidQueryException, RepositoryException
sessionContext
- component context of the current sessionhandler
- the query handler of the search index.qomTree
- the query object model tree.language
- the original query syntax from where the JQOM was
created.node
- a nt:query node where the query was read from or
null
if it is not a stored query.InvalidQueryException
- if the qom tree cannot be serialized
according to the given language.RepositoryException
- if another error occurspublic QueryResult execute() throws RepositoryException
QueryImpl
execute
call to the
ExecutableQuery
object returned by
QueryHandler.createExecutableQuery(org.apache.jackrabbit.core.session.SessionContext, java.lang.String, java.lang.String)
.
execute
in interface Query
execute
in class QueryImpl
RepositoryException
public String[] getBindVariableNames()
QueryImpl
getBindVariableNames
in interface Query
getBindVariableNames
in class QueryImpl
public void bindValue(String varName, Value value) throws IllegalArgumentException
QueryImpl
IllegalArgumentException
as XPath and SQL1 queries
have no bind variables.bindValue
in interface Query
bindValue
in class QueryImpl
IllegalArgumentException
- always thrownpublic Source getSource()
getSource
in interface QueryObjectModel
public Constraint getConstraint()
getConstraint
in interface QueryObjectModel
public Ordering[] getOrderings()
getOrderings
in interface QueryObjectModel
public Column[] getColumns()
getColumns
in interface QueryObjectModel
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.