org.modeshape.jcr.api.query

## Interface Query

- All Superinterfaces:
    Query

      public interface Query
      extends Query

  A specialization of the standard JCR `Query` interface that adds the ModeShape-specific constant for the `full-text search` query language.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FULL_TEXT_SEARCH` A string constant representing the ModeShape full-text search query language.

    - ### Fields inherited from interface javax.jcr.query.Query

      `JCR_JQOM, JCR_SQL2, SQL, XPATH`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancel()` Signal that the query, if currently `executing`, should be cancelled and stopped (with an exception).
    `QueryResult` | `execute()`
    `QueryResult` | `explain()` Generates a plan for the this query and returns a ``QueryResult`` object that contains no results (nodes or rows) but does have a query plan.
    `String` | `getAbstractQueryModelRepresentation()` Get the underlying and immutable Abstract Query Model representation of this query.
    `void` | `includeSystemContent(boolean includeSystemContent)` Specify whether the system content should be included in the query results.

    - ### Methods inherited from interface javax.jcr.query.Query

      `bindValue, getBindVariableNames, getLanguage, getStatement, getStoredQueryPath, setLimit, setOffset, storeAsNode`

- - ### Field Detail

    - #### FULL_TEXT_SEARCH

          static final String FULL_TEXT_SEARCH

      A string constant representing the ModeShape full-text search query language.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### includeSystemContent

          void includeSystemContent(boolean includeSystemContent)

      Specify whether the system content should be included in the query results.
      Parameters:
        `includeSystemContent` - true if the system content should be included, or false if it should be excluded

    - #### cancel

          boolean cancel()

      Signal that the query, if currently `executing`, should be cancelled and stopped (with an exception). This method does not block until the query is actually stopped.
      Returns:
        true if the query was executing and will be cancelled, or false if the query was no longer running (because it had finished successfully or had already been cancelled) and could not be cancelled.

    - #### getAbstractQueryModelRepresentation

          String getAbstractQueryModelRepresentation()

      Get the underlying and immutable Abstract Query Model representation of this query.
      Returns:
        the string representation of this query's abstract query model; never null

    - #### explain

          QueryResult explain()
                              throws InvalidQueryException,
                                     RepositoryException

      Generates a plan for the this query and returns a ``QueryResult`` object that contains no results (nodes or rows) but does have a query plan.

      If this `Query` contains a variable (see `BindVariableValue`) which has not been bound to a value (see `Query.bindValue(java.lang.String, javax.jcr.Value)`) then this method throws an `InvalidQueryException`.

      Returns:
        a `QueryResult` object
      Throws:
        `InvalidQueryException` - if the query contains an unbound variable.
        `RepositoryException` - if another error occurs.
      See Also:
        `execute()`

    - #### execute

          QueryResult execute()
                              throws InvalidQueryException,
                                     RepositoryException

      Specified by:
        `execute` in interface `Query`
      Throws:
        `InvalidQueryException`
        `RepositoryException`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.