public class QueryImpl extends AbstractQueryImpl
ExecutableQuery
interface.| Modifier and Type | Field and Description |
|---|---|
static org.apache.jackrabbit.spi.Name |
DEFAULT_SELECTOR_NAME
The default selector name 's'.
|
protected org.apache.jackrabbit.spi.commons.query.QueryRootNode |
root
The root node of the query tree
|
cache, index, propReg, sessionContext| Constructor and Description |
|---|
QueryImpl(SessionContext sessionContext,
SearchIndex index,
PropertyTypeRegistry propReg,
String statement,
String language,
org.apache.jackrabbit.spi.commons.query.QueryNodeFactory factory)
Creates a new query instance from a query string.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl |
columnForName(org.apache.jackrabbit.spi.Name propertyName)
Returns a column for the given property name and the default selector
name.
|
QueryResult |
execute(long offset,
long limit)
Executes this query and returns a
. |
protected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl[] |
getColumns()
Returns the columns for this query.
|
boolean |
needsSystemTree()
Returns
true if this query node needs items under
/jcr:system to be queried. |
getQOMFactory, getRespectDocumentOrder, setRespectDocumentOrderpublic static final org.apache.jackrabbit.spi.Name DEFAULT_SELECTOR_NAME
protected final org.apache.jackrabbit.spi.commons.query.QueryRootNode root
public QueryImpl(SessionContext sessionContext, SearchIndex index, PropertyTypeRegistry propReg, String statement, String language, org.apache.jackrabbit.spi.commons.query.QueryNodeFactory factory) throws InvalidQueryException
sessionContext - component context of the current sessionindex - the search index.propReg - the property type registry.statement - the query statement.language - the syntax of the query statement.factory - the query node factory.InvalidQueryException - if the query statement is invalid according
to the specified language.public QueryResult execute(long offset, long limit) throws RepositoryException
QueryResult.offset - the offset in the total result setlimit - the maximum result sizeQueryResultRepositoryException - if an error occursprotected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl[] getColumns()
throws RepositoryException
RepositoryException - if an error occurs.public boolean needsSystemTree()
true if this query node needs items under
/jcr:system to be queried.needsSystemTree in class AbstractQueryImpltrue if this query node needs content under
/jcr:system to be queried; false otherwise.protected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl columnForName(org.apache.jackrabbit.spi.Name propertyName)
throws RepositoryException
propertyName - the name of the property as well as the column.RepositoryException - if an error occurs while creating the column.Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.