Package org.apache.jackrabbit.core.query
Class QueryObjectModelImpl
- java.lang.Object
- 
- org.apache.jackrabbit.core.query.AbstractQueryImpl
- 
- org.apache.jackrabbit.core.query.QueryImpl
- 
- org.apache.jackrabbit.core.query.QueryObjectModelImpl
 
 
 
- 
- All Implemented Interfaces:
- QueryObjectModel,- Query
 
 public class QueryObjectModelImpl extends QueryImpl implements QueryObjectModel QueryObjectModelImplimplements the query object model.
- 
- 
Constructor SummaryConstructors Constructor Description QueryObjectModelImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindValue(String varName, Value value)Throws anIllegalArgumentExceptionas XPath and SQL1 queries have no bind variables.QueryResultexecute()This method simply forwards theexecutecall to theExecutableQueryobject returned byQueryHandler.createExecutableQuery(org.apache.jackrabbit.core.session.SessionContext, java.lang.String, java.lang.String).String[]getBindVariableNames()Column[]getColumns()Gets the columns for this query.ConstraintgetConstraint()Gets the constraint for this query.Ordering[]getOrderings()Gets the orderings for this query.SourcegetSource()Gets the node-tuple source for this query.voidinit(SessionContext sessionContext, QueryHandler handler, String statement, String language, Node node)Initialises a query instance from a query string.voidinit(SessionContext sessionContext, QueryHandler handler, QueryObjectModelTree qomTree, String language, Node node)Initializes a query instance from a query object model.- 
Methods inherited from class org.apache.jackrabbit.core.query.QueryImplcheckInitialized, checkNotInitialized, getLanguage, getStatement, getStoredQueryPath, setInitialized, setLimit, setOffset, storeAsNode
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javax.jcr.query.QuerygetLanguage, getStatement, getStoredQueryPath, setLimit, setOffset, storeAsNode
 
- 
 
- 
- 
- 
Field Detail- 
qomTreeprotected QueryObjectModelTree qomTree The query object model tree.
 
- 
 - 
Method Detail- 
initpublic void init(SessionContext sessionContext, QueryHandler handler, String statement, String language, Node node) throws InvalidQueryException Initialises a query instance from a query string.- Overrides:
- initin class- QueryImpl
- Parameters:
- sessionContext- component context of the current session
- handler- 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- nullif it is not a stored query.
- Throws:
- UnsupportedOperationException- always.
- InvalidQueryException- if the query statement is invalid according to the specified- language.
 
 - 
initpublic void init(SessionContext sessionContext, QueryHandler handler, QueryObjectModelTree qomTree, String language, Node node) throws InvalidQueryException, RepositoryException Initializes a query instance from a query object model.- Parameters:
- sessionContext- component context of the current session
- handler- 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- nullif it is not a stored query.
- Throws:
- InvalidQueryException- if the qom tree cannot be serialized according to the given language.
- RepositoryException- if another error occurs
 
 - 
executepublic QueryResult execute() throws RepositoryException Description copied from class:QueryImplThis method simply forwards theexecutecall to theExecutableQueryobject returned byQueryHandler.createExecutableQuery(org.apache.jackrabbit.core.session.SessionContext, java.lang.String, java.lang.String).- Specified by:
- executein interface- Query
- Overrides:
- executein class- QueryImpl
- Throws:
- RepositoryException
 
 - 
getBindVariableNamespublic String[] getBindVariableNames() Description copied from class:QueryImpl- Specified by:
- getBindVariableNamesin interface- Query
- Overrides:
- getBindVariableNamesin class- QueryImpl
 
 - 
bindValuepublic void bindValue(String varName, Value value) throws IllegalArgumentException Description copied from class:QueryImplThrows anIllegalArgumentExceptionas XPath and SQL1 queries have no bind variables.- Specified by:
- bindValuein interface- Query
- Overrides:
- bindValuein class- QueryImpl
- Throws:
- IllegalArgumentException- always thrown
 
 - 
getSourcepublic Source getSource() Gets the node-tuple source for this query.- Specified by:
- getSourcein interface- QueryObjectModel
- Returns:
- the node-tuple source; non-null
 
 - 
getConstraintpublic Constraint getConstraint() Gets the constraint for this query.- Specified by:
- getConstraintin interface- QueryObjectModel
- Returns:
- the constraint, or null if none
 
 - 
getOrderingspublic Ordering[] getOrderings() Gets the orderings for this query.- Specified by:
- getOrderingsin interface- QueryObjectModel
- Returns:
- an array of zero or more orderings; non-null
 
 - 
getColumnspublic Column[] getColumns() Gets the columns for this query.- Specified by:
- getColumnsin interface- QueryObjectModel
- Returns:
- an array of zero or more columns; non-null
 
 
- 
 
-