|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.query.model.Command org.modeshape.graph.query.model.QueryCommand org.modeshape.graph.query.model.SetQuery
@Immutable public class SetQuery
This object acts as a Set operator on multiple queries
, such as performing UNION, INTERSECT, and EXCEPT
operations.
The two queries
are expected to have the same number and order of columns, and the corresponding columns
types must be compatible.
Nested Class Summary | |
---|---|
static class |
SetQuery.Operation
|
Constructor Summary | |
---|---|
SetQuery(QueryCommand left,
SetQuery.Operation operation,
QueryCommand right,
boolean all)
Create a set query involving the supplied left- and right-hand-side queries. |
|
SetQuery(QueryCommand left,
SetQuery.Operation operation,
QueryCommand right,
boolean all,
List<Ordering> orderings,
Limit limit)
Create a set query involving the supplied left- and right-hand-side queries. |
Method Summary | |
---|---|
void |
accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation. |
SetQuery |
adding(Ordering... orderings)
|
boolean |
equals(Object obj)
|
QueryCommand |
getLeft()
Get the left-hand query. |
SetQuery.Operation |
getOperation()
Get the set operation for this query. |
QueryCommand |
getRight()
Get the right-hand query. |
int |
hashCode()
|
boolean |
isAll()
Return whether this set query is a 'UNION ALL' or 'INTERSECT ALL' or 'EXCEPT ALL' query. |
String |
toString()
|
SetQuery |
withLimit(int rowLimit)
|
SetQuery |
withOffset(int offset)
|
Methods inherited from class org.modeshape.graph.query.model.QueryCommand |
---|
getLimits, getOrderings |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SetQuery(QueryCommand left, SetQuery.Operation operation, QueryCommand right, boolean all)
left
- the left-hand-side query being combinedoperation
- the set operationright
- the right-hand-side query being combinedall
- true if all of the results should be included
IllegalArgumentException
- if the left-hand-side query, right-hand-side query, or operation are nullpublic SetQuery(QueryCommand left, SetQuery.Operation operation, QueryCommand right, boolean all, List<Ordering> orderings, Limit limit)
left
- the left-hand-side query being combinedoperation
- the set operationright
- the right-hand-side query being combinedall
- true if all of the results should be includedorderings
- the specification of the order of the result rows, or null if the results need not be orderedlimit
- the limit for the result rows, or null if there are no limits
IllegalArgumentException
- if the left-hand-side query, right-hand-side query, or operation are nullMethod Detail |
---|
public final QueryCommand getLeft()
public final QueryCommand getRight()
public final SetQuery.Operation getOperation()
public final boolean isAll()
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)
visitor
- the visitor; never nullVisitable.accept(org.modeshape.graph.query.model.Visitor)
public SetQuery withLimit(int rowLimit)
public SetQuery withOffset(int offset)
public SetQuery adding(Ordering... orderings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |