public class SetOperationQuery<ThisType extends SetOperationQuery<ThisType>> extends Query<ThisType>
Modifier and Type | Class and Description |
---|---|
static class |
SetOperationQuery.Type
Enumeration representing the type of union to use
|
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Constructor and Description |
---|
SetOperationQuery(SetOperationQuery.Type type) |
SetOperationQuery(SetOperationQuery.Type type,
Object... queries) |
Modifier and Type | Method and Description |
---|---|
ThisType |
addCustomOrdering(Object columnStr,
OrderObject.Dir dir)
Adds the given column with the given direction to the "ORDER BY"
clause
|
ThisType |
addCustomOrderings(Object... columnStrs)
Adds the given columns to the "ORDER BY" clause
|
ThisType |
addIndexedOrdering(Integer columnIdx,
OrderObject.Dir dir)
Adds the given column index with the given direction to the "ORDER BY"
clause
|
ThisType |
addIndexedOrderings(Integer... columnIdxs)
Adds the given column index to the "ORDER BY" clause
|
ThisType |
addOrdering(Column column,
OrderObject.Dir dir)
Adds the given column with the given direction to the "ORDER BY"
clause
|
ThisType |
addOrderings(Column... columns)
Adds the given columns to the "ORDER BY" clause
|
ThisType |
addQueries(Object... queries)
Adds the given queries to the list of queries with the default set
operation type (the one configured in the constructor).
|
ThisType |
addQueries(SelectQuery... queries)
Adds the given queries to the list of queries with the default set
operation type (the one configured in the constructor).
|
ThisType |
addQueries(SetOperationQuery.Type type,
Object... queries)
Adds the given queries to the list of queries with the given set
operation type.
|
ThisType |
addQueries(SetOperationQuery.Type type,
SelectQuery... queries)
Adds the given queries to the list of queries with the given set
operation type.
|
protected void |
appendTo(AppendableExt app,
SqlContext newContext)
Appends the sql query to the given AppendableExt within the given,
modifiable SqlContext.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
static ExceptQuery |
except()
Convenience method to create a EXCEPT query.
|
static ExceptQuery |
except(SelectQuery... queries)
Convenience method to create a EXCEPT query.
|
static ExceptQuery |
exceptAll()
Convenience method to create a EXCEPT ALL query.
|
static ExceptQuery |
exceptAll(SelectQuery... queries)
Convenience method to create a EXCEPT ALL query.
|
static IntersectQuery |
intersect()
Convenience method to create a INTERSECT query.
|
static IntersectQuery |
intersect(SelectQuery... queries)
Convenience method to create a INTERSECT query.
|
static IntersectQuery |
intersectAll()
Convenience method to create a INTERSECT ALL query.
|
static IntersectQuery |
intersectAll(SelectQuery... queries)
Convenience method to create a INTERSECT ALL query.
|
static UnionQuery |
union()
Convenience method to create a UNION query.
|
static UnionQuery |
union(SelectQuery... queries)
Convenience method to create a UNION query.
|
static UnionQuery |
unionAll()
Convenience method to create a UNION ALL query.
|
static UnionQuery |
unionAll(SelectQuery... queries)
Convenience method to create a UNION ALL query.
|
void |
validate(ValidationContext vContext)
Runs validation on this verifiable object using a previously collected
ValidationContext.
|
appendTo, getThisType, prependTo, validate, validateTables
addCustomization, customAppendTo, customAppendTo, maybeAppendTo, maybeAppendTo
collectSchemaObjects, doValidate, toString
toString, toString
public SetOperationQuery(SetOperationQuery.Type type)
public SetOperationQuery(SetOperationQuery.Type type, Object... queries)
public ThisType addQueries(SelectQuery... queries)
public ThisType addQueries(SetOperationQuery.Type type, SelectQuery... queries)
public ThisType addQueries(Object... queries)
public ThisType addQueries(SetOperationQuery.Type type, Object... queries)
public ThisType addCustomOrdering(Object columnStr, OrderObject.Dir dir)
Object
-> SqlObject
conversions handled by
Converter.toCustomColumnSqlObject(Object)
.
public ThisType addCustomOrderings(Object... columnStrs)
Note, NULL ordering can be specified by passing an appropriately
configured instance of OrderObject
to this method.
Object
-> SqlObject
conversions handled by
Converter.CUSTOM_COLUMN_TO_OBJ
.
public ThisType addOrdering(Column column, OrderObject.Dir dir)
public ThisType addOrderings(Column... columns)
public ThisType addIndexedOrdering(Integer columnIdx, OrderObject.Dir dir)
public ThisType addIndexedOrderings(Integer... columnIdxs)
public void validate(ValidationContext vContext) throws ValidationException
Verifiable
In general, this method will only be called internally, not by users.
validate
in interface Verifiable<ThisType extends SetOperationQuery<ThisType>>
validate
in class Query<ThisType extends SetOperationQuery<ThisType>>
vContext
- handle to the current, filled-in validation contextValidationException
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class Query<ThisType extends SetOperationQuery<ThisType>>
vContext
- handle to the current validation contextprotected void appendTo(AppendableExt app, SqlContext newContext) throws IOException
Query
Query.appendTo(AppendableExt)
method within the context of calls to
SqlContext.pushContext(com.healthmarketscience.common.util.AppendableExt)
and SqlContext.popContext(com.healthmarketscience.common.util.AppendableExt, com.healthmarketscience.sqlbuilder.SqlContext)
, so
the implementation is free to modify the given SqlContext.appendTo
in class Query<ThisType extends SetOperationQuery<ThisType>>
app
- the target for the sql query generationnewContext
- modifiable SqlContext for nested AppendeesIOException
public static UnionQuery union()
public static UnionQuery union(SelectQuery... queries)
public static UnionQuery unionAll()
public static UnionQuery unionAll(SelectQuery... queries)
public static ExceptQuery except()
public static ExceptQuery except(SelectQuery... queries)
public static ExceptQuery exceptAll()
public static ExceptQuery exceptAll(SelectQuery... queries)
public static IntersectQuery intersect()
public static IntersectQuery intersect(SelectQuery... queries)
public static IntersectQuery intersectAll()
public static IntersectQuery intersectAll(SelectQuery... queries)
Copyright © 2006–2021 OpenHMS. All rights reserved.