org.modeshape.graph.query.model
Interface QueryCommand

All Superinterfaces:
Command, LanguageObject, Serializable, Visitable
All Known Subinterfaces:
JcrQueryCommand
All Known Implementing Classes:
JcrSelectQuery, JcrSetQuery, Query, SetQuery

public interface QueryCommand
extends Command

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


Method Summary
 List<? extends Column> columns()
          Return the columns defining the query results.
 Limit limits()
          Get the limits associated with this query.
 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.graph.query.model.Visitable
accept
 

Method Detail

orderings

List<? extends Ordering> orderings()
Return the orderings for this query.

Returns:
the list of orderings; never null

limits

Limit limits()
Get the limits associated with this query.

Returns:
the limits; never null but possibly unlimited

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-2010 JBoss, a division of Red Hat. All Rights Reserved.