Class QueryImpl

    • Field Detail


        public static final Name DEFAULT_SELECTOR_NAME
        The default selector name 's'.
      • root

        protected final QueryRootNode root
        The root node of the query tree
    • Constructor Detail

      • QueryImpl

        public QueryImpl​(SessionContext sessionContext,
                         SearchIndex index,
                         PropertyTypeRegistry propReg,
                         String statement,
                         String language,
                         QueryNodeFactory factory)
                  throws InvalidQueryException
        Creates a new query instance from a query string.
        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.
        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.
        offset - the offset in the total result set
        limit - the maximum result size
        a QueryResult
        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
        true if this query node needs content under /jcr:system to be queried; false otherwise.
      • columnForName

        protected ColumnImpl columnForName​(Name propertyName)
                                    throws RepositoryException
        Returns a column for the given property name and the default selector name.
        propertyName - the name of the property as well as the column.
        a column.
        RepositoryException - if an error occurs while creating the column.