Class QueryImpl

    • Field Detail

      • DEFAULT_SELECTOR_NAME

        public static final org.apache.jackrabbit.spi.Name DEFAULT_SELECTOR_NAME
        The default selector name 's'.
      • root

        protected final org.apache.jackrabbit.spi.commons.query.QueryRootNode root
        The root node of the query tree
    • Constructor Detail

      • QueryImpl

        public QueryImpl​(SessionContext sessionContext,
                         SearchIndex index,
                         PropertyTypeRegistry propReg,
                         String statement,
                         String language,
                         org.apache.jackrabbit.spi.commons.query.QueryNodeFactory factory)
                  throws InvalidQueryException
        Creates a new query instance from a query string.
        Parameters:
        sessionContext - component context of the current session
        index - the search index.
        propReg - the property type registry.
        statement - the query statement.
        language - the syntax of the query statement.
        factory - the query node factory.
        Throws:
        InvalidQueryException - if the query statement is invalid according to the specified language.
    • Method Detail

      • execute

        public QueryResult execute​(long offset,
                                   long limit)
                            throws RepositoryException
        Executes this query and returns a QueryResult.
        Parameters:
        offset - the offset in the total result set
        limit - the maximum result size
        Returns:
        a QueryResult
        Throws:
        RepositoryException - if an error occurs
      • getColumns

        protected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl[] getColumns()
                                                                               throws RepositoryException
        Returns the columns for this query.
        Returns:
        array of columns.
        Throws:
        RepositoryException - if an error occurs.
      • needsSystemTree

        public boolean needsSystemTree()
        Returns true if this query node needs items under /jcr:system to be queried.
        Specified by:
        needsSystemTree in class AbstractQueryImpl
        Returns:
        true if this query node needs content under /jcr:system to be queried; false otherwise.
      • columnForName

        protected org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl columnForName​(org.apache.jackrabbit.spi.Name propertyName)
                                                                                throws RepositoryException
        Returns a column for the given property name and the default selector name.
        Parameters:
        propertyName - the name of the property as well as the column.
        Returns:
        a column.
        Throws:
        RepositoryException - if an error occurs while creating the column.