org.modeshape.jcr.query.model

## Class Subquery

- java.lang.Object
- - org.modeshape.jcr.query.model.Subquery

- All Implemented Interfaces:
    Serializable, Operand, StaticOperand, Subquery, LanguageObject, Visitable

      public class Subquery
      extends Object
      implements StaticOperand, Subquery

  A representation of a non-correlated subquery. This component uses composition to hold the various types of QueryCommand objects, rather than inheriting from StaticOperand and QueryCommand.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `VARIABLE_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Subquery(QueryCommand query)` Create a new subquery component that uses the supplied query as the subquery expression.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(Visitor visitor)` Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
    `boolean` | `equals(Object obj)`
    `QueryCommand` | `getQuery()` Gets the `QueryCommand` that makes up the subqery.
    `int` | `hashCode()`
    `static boolean` | `isSubqueryVariableName(String variableName)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### VARIABLE_PREFIX

          public static final String VARIABLE_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Subquery

          public Subquery(QueryCommand query)

      Create a new subquery component that uses the supplied query as the subquery expression.
      Parameters:
        `query` - the Command representing the subquery.

  - ### Method Detail

    - #### isSubqueryVariableName

          public static boolean isSubqueryVariableName(String variableName)

    - #### getQuery

          public QueryCommand getQuery()

      Description copied from interface: `Subquery`
      Gets the `QueryCommand` that makes up the subqery.
      Specified by:
        `getQuery` in interface `Subquery`
      Returns:
        the query command; non-null

    - #### accept

          public void accept(Visitor visitor)

      Description copied from interface: `Visitable`
      Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
      Specified by:
        `accept` in interface `Visitable`
      Parameters:
        `visitor` - the visitor; never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

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