|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.query.model.Query
@Immutable public class Query
Field Summary | |
---|---|
static boolean |
IS_DISTINCT_DEFAULT
|
Constructor Summary | |
---|---|
Query(Source source)
Create a new query that uses the supplied source. |
|
Query(Source source,
Constraint constraint,
List<? extends Ordering> orderings,
List<? extends Column> columns,
Limit limit,
boolean isDistinct)
Create a new query that uses the supplied source, constraint, orderings, columns and limits. |
Method Summary | |
---|---|
void |
accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation. |
Query |
adding(Column... columns)
Create a copy of this query, but that returns results that include the columns specified by this query as well as the supplied columns. |
Query |
adding(Ordering... orderings)
Create a copy of this query, but that returns results that are ordered by the orderings of this column
as well as those supplied. |
List<? extends Column> |
columns()
Return the columns defining the query results. |
Query |
constrainedBy(Constraint constraint)
Create a copy of this query, but one that uses the supplied constraint. |
Constraint |
constraint()
Get the constraints, if there are any. |
Query |
distinct()
Create a copy of this query, but one in which there are no duplicate rows in the results. |
boolean |
equals(Object obj)
|
Column[] |
getColumns()
Gets the columns for this query. |
Limit |
getLimits()
Get the limits associated with this query. |
Ordering[] |
getOrderings()
Gets the orderings for this query. |
int |
hashCode()
|
boolean |
isDistinct()
Determine whether this query is to return only distinct values. |
Query |
noDistinct()
Create a copy of this query, but one in which there may be duplicate rows in the results. |
Query |
orderedBy(List<Ordering> orderings)
Create a copy of this query, but one whose results should be ordered by the supplied orderings. |
List<? extends Ordering> |
orderings()
Return the orderings for this query. |
Query |
returning(List<Column> columns)
Create a copy of this query, but that returns results with the supplied columns. |
Source |
source()
Get the source for the results. |
String |
toString()
|
Query |
withLimit(int rowLimit)
Create a copy of this query, but one that uses the supplied limit on the number of result rows. |
Query |
withOffset(int offset)
Create a copy of this query, but one that uses the supplied offset. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean IS_DISTINCT_DEFAULT
Constructor Detail |
---|
public Query(Source source)
source
- the source
IllegalArgumentException
- if the source is nullpublic Query(Source source, Constraint constraint, List<? extends Ordering> orderings, List<? extends Column> columns, Limit limit, boolean isDistinct)
source
- the sourceconstraint
- the constraint (or composite constraint), or null or empty if there are no constraintsorderings
- the specifications of how the results are to be ordered, or null if the order is to be implementation
determinedcolumns
- the columns to be included in the results, or null or empty if there are no explicit columns and the actual
result columns are to be implementation determiendlimit
- the limit for the results, or null if all of the results are to be includedisDistinct
- true if duplicates are to be removed from the results
IllegalArgumentException
- if the source is nullMethod Detail |
---|
public Limit getLimits()
QueryCommand
getLimits
in interface QueryCommand
unlimited
public List<? extends Ordering> orderings()
QueryCommand
public Source source()
public Constraint constraint()
public List<? extends Column> columns()
QueryCommand
public Ordering[] getOrderings()
QueryCommand
getOrderings
in interface QueryCommand
public Column[] getColumns()
QueryCommand
getColumns
in interface QueryCommand
public boolean isDistinct()
public Query distinct()
public Query noDistinct()
public Query constrainedBy(Constraint constraint)
constraint
- the constraint that should be used; never null
public Query orderedBy(List<Ordering> orderings)
orderings
- the result ordering specification that should be used; never null
public Query withLimit(int rowLimit)
QueryCommand
rowLimit
- the limit that should be used; must be a positive number
public Query withOffset(int offset)
QueryCommand
offset
- the limit that should be used; may not be negative
public Query returning(List<Column> columns)
columns
- the columns of the results; may not be null
public Query adding(Ordering... orderings)
orderings
of this column
as well as those supplied.
orderings
- the additional orderings of the result rows; may no be null
public Query adding(Column... columns)
columns
- the additional columns that should be included in the the results; may not be null
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void accept(Visitor visitor)
Visitable
accept
in interface Visitable
visitor
- the visitor; never null
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |