org.modeshape.jcr.query.model

## Interface QueryCommand

- All Superinterfaces:
    Command, LanguageObject, QueryCommand, Serializable, Visitable

      public interface QueryCommand
      extends Command, QueryCommand

  Represents the abstract base class for all query commands. Subclasses include `Query` and `SetQuery`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<? extends Column>` | `columns()` Return the columns defining the query results.
    `List<? extends Ordering>` | `orderings()` Return the orderings for this query.
    `QueryCommand` | `withLimit(int rowLimit)` Create a copy of this query, but one that uses the supplied limit on the number of result rows.
    `QueryCommand` | `withOffset(int offset)` Create a copy of this query, but one that uses the supplied offset.

    - ### Methods inherited from interface org.modeshape.jcr.query.model.Visitable

      `accept`

    - ### Methods inherited from interface org.modeshape.jcr.api.query.qom.QueryCommand

      `getColumns, getLimits, getOrderings`

- - ### Method Detail

    - #### orderings

          List<? extends Ordering> orderings()

      Return the orderings for this query.
      Returns:
        the list of orderings; never null

    - #### columns

          List<? extends Column> columns()

      Return the columns defining the query results. If there are no columns, then the columns are implementation determined.
      Returns:
        the list of columns; never null

    - #### withLimit

          QueryCommand withLimit(int rowLimit)

      Create a copy of this query, but one that uses the supplied limit on the number of result rows.
      Parameters:
        `rowLimit` - the limit that should be used; must be a positive number
      Returns:
        the copy of the query that uses the supplied limit; never null

    - #### withOffset

          QueryCommand withOffset(int offset)

      Create a copy of this query, but one that uses the supplied offset.
      Parameters:
        `offset` - the limit that should be used; may not be negative
      Returns:
        the copy of the query that uses the supplied offset; never null

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