|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.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)
|
int |
hashCode()
|
boolean |
isDistinct()
Determine whether this query is to return only distinct values. |
Limit |
limits()
Get the limits associated with this query. |
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 limits()
limits
in interface QueryCommand
unlimited
QueryCommand.limits()
public List<? extends Ordering> orderings()
orderings
in interface QueryCommand
QueryCommand.orderings()
public Source source()
public Constraint constraint()
public List<? extends Column> columns()
columns
in interface QueryCommand
QueryCommand.columns()
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)
withLimit
in interface QueryCommand
rowLimit
- the limit that should be used; must be a positive number
QueryCommand.withLimit(int)
public Query withOffset(int offset)
withOffset
in interface QueryCommand
offset
- the limit that should be used; may not be negative
QueryCommand.withOffset(int)
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
Object.toString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public void accept(Visitor visitor)
accept
in interface Visitable
visitor
- the visitor; never nullVisitable.accept(org.modeshape.graph.query.model.Visitor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |