org.modeshape.jcr.query.model

## Class SetQueryObjectModel

- java.lang.Object
- - org.modeshape.jcr.query.JcrAbstractQuery
  - - org.modeshape.jcr.query.JcrQuery
    - - org.modeshape.jcr.query.model.SetQueryObjectModel

- All Implemented Interfaces:
    Query, QueryCommand, SetQuery, SetQueryObjectModel

      public class SetQueryObjectModel
      extends JcrQuery
      implements SetQueryObjectModel

  Implementation of `SetQueryObjectModel` that represents a `set query`.

- - ### Field Summary

    - ### Fields inherited from class org.modeshape.jcr.query.JcrAbstractQuery

      `context, language, statement`

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

      `JCR_JQOM, JCR_SQL2, SQL, XPATH`

    - ### Fields inherited from interface org.modeshape.jcr.api.query.Query

      `FULL_TEXT_SEARCH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SetQueryObjectModel(JcrQueryContext context, String statement, String language, SetQuery query, PlanHints hints, Path storedAtPath)` Creates a new JCR `Query` by specifying the set query statement itself, the language in which the query is stated, the `SetQuery` representation and, optionally, the node from which the query was loaded.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Column[]` | `getColumns()` Gets the columns for this query.
    `QueryCommand` | `getLeft()` Get the left-hand query.
    `Limit` | `getLimits()` Get the limits associated with this query.
    `String` | `getOperation()` Get the set operation for this query.
    `Ordering[]` | `getOrderings()` Gets the orderings for this query.
    `QueryCommand` | `getRight()` Get the right-hand query.
    `boolean` | `isAll()` Return whether this set query is a 'UNION ALL' or 'INTERSECT ALL' or 'EXCEPT ALL' query.
    `protected SetQuery` | `query()`

    - ### Methods inherited from class org.modeshape.jcr.query.JcrQuery

      `bindValue, cancel, execute, explain, getAbstractQueryModel, getAbstractQueryModelRepresentation, getBindVariableNames, setLimit, setOffset, toString, variableNames`

    - ### Methods inherited from class org.modeshape.jcr.query.JcrAbstractQuery

      `checkForProblems, context, getLanguage, getStatement, getStoredQueryPath, pathFor, storeAsNode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

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

- - ### Constructor Detail

    - #### SetQueryObjectModel

          public SetQueryObjectModel(JcrQueryContext context,
                             String statement,
                             String language,
                             SetQuery query,
                             PlanHints hints,
                             Path storedAtPath)

      Creates a new JCR `Query` by specifying the set query statement itself, the language in which the query is stated, the `SetQuery` representation and, optionally, the node from which the query was loaded. The language must be a string from among those returned by `QueryManager#getSupportedQueryLanguages()`.
      Parameters:
        `context` - the context that was used to create this query and that will be used to execute this query; may not be null
        `statement` - the original statement as supplied by the client; may not be null
        `language` - the language obtained from the `QueryParser`; may not be null
        `query` - the parsed set query representation; may not be null
        `hints` - any hints that are to be used; may be null if there are no hints
        `storedAtPath` - the path at which this query was stored, or null if this is not a stored query

  - ### Method Detail

    - #### query

          protected SetQuery query()

      Overrides:
        `query` in class `JcrQuery`

    - #### getColumns

          public Column[] getColumns()

      Description copied from interface: `QueryCommand`
      Gets the columns for this query.
      Specified by:
        `getColumns` in interface `QueryCommand`
      Returns:
        an array of zero or more columns; non-null

    - #### getOrderings

          public Ordering[] getOrderings()

      Description copied from interface: `QueryCommand`
      Gets the orderings for this query.
      Specified by:
        `getOrderings` in interface `QueryCommand`
      Returns:
        an array of zero or more orderings; non-null

    - #### getLeft

          public QueryCommand getLeft()

      Description copied from interface: `SetQuery`
      Get the left-hand query.
      Specified by:
        `getLeft` in interface `SetQuery`
      Returns:
        the left-hand query; never null

    - #### getRight

          public QueryCommand getRight()

      Description copied from interface: `SetQuery`
      Get the right-hand query.
      Specified by:
        `getRight` in interface `SetQuery`
      Returns:
        the right-hand query; never null

    - #### getOperation

          public String getOperation()

      Description copied from interface: `SetQuery`
      Get the set operation for this query.
      Specified by:
        `getOperation` in interface `SetQuery`
      Returns:
        the operation; never null

    - #### isAll

          public boolean isAll()

      Description copied from interface: `SetQuery`
      Return whether this set query is a 'UNION ALL' or 'INTERSECT ALL' or 'EXCEPT ALL' query.
      Specified by:
        `isAll` in interface `SetQuery`
      Returns:
        true if this is an 'ALL' query, or false otherwise

    - #### getLimits

          public Limit getLimits()

      Description copied from interface: `QueryCommand`
      Get the limits associated with this query.
      Specified by:
        `getLimits` in interface `QueryCommand`
      Returns:
        the limits; never null but possibly `unlimited`

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