|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.graph.query.model.Command
org.jboss.dna.graph.query.model.QueryCommand
org.jboss.dna.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<Ordering> orderings,
List<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. |
Query |
constrainedBy(Constraint constraint)
Create a copy of this query, but one that uses the supplied constraint. |
Query |
distinct()
Create a copy of this query, but one in which there are no duplicate rows in the results. |
boolean |
equals(Object obj)
|
List<Column> |
getColumns()
Return the columns defining the query results. |
Constraint |
getConstraint()
Get the constraints, if there are any. |
Source |
getSource()
Get the source for the results. |
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. |
Query |
returning(List<Column> columns)
Create a copy of this query, but that returns results with the supplied columns. |
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 org.jboss.dna.graph.query.model.QueryCommand |
|---|
getLimits, getOrderings |
| Methods inherited from class java.lang.Object |
|---|
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 null
public Query(Source source,
Constraint constraint,
List<Ordering> orderings,
List<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 null| Method Detail |
|---|
public final Source getSource()
public final Constraint getConstraint()
public final List<Column> getColumns()
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)
rowLimit - the limit that should be used; must be a positive number
public Query withOffset(int offset)
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 ObjectObject.toString()public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public void accept(Visitor visitor)
visitor - the visitor; never nullVisitable.accept(org.jboss.dna.graph.query.model.Visitor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||