org.sql.generation.api.grammar.builders.query
Interface QueryBuilder

All Superinterfaces:
AbstractBuilder<QueryExpressionBody>

public interface QueryBuilder
extends AbstractBuilder<QueryExpressionBody>

The builder that builds the SQL queries having UNION, INTERSECT, or EXCEPT between the SELECT statements.

Author:
Stanislav Muhametsin
See Also:
QueryExpressionBody, QuerySpecification, QuerySpecificationBuilder, CorrespondingSpec

Method Summary
 QueryBuilder except(CorrespondingSpec correspondingSpec, QueryExpressionBody another)
          Adds EXCEPT <setQuantifier> <correspondingSpec> between current query and the given query.
 QueryBuilder except(QueryExpressionBody another)
           Adds EXCEPT <setQuantifier> between current query and the given query.
 QueryBuilder except(SetQuantifier setQuantifier, CorrespondingSpec correspondingSpec, QueryExpressionBody another)
           Adds EXCEPT between current query and the given query.
 QueryBuilder except(SetQuantifier setQuantifier, QueryExpressionBody another)
           Adds EXCEPT <correspondingSpec> between current query and the given query.
 QueryBuilder intersect(CorrespondingSpec correspondingSpec, QueryExpressionBody another)
           Adds INTERSECT <correspondingSpec> between current query and the given query.
 QueryBuilder intersect(QueryExpressionBody another)
           Adds INTERSECT between current query and the given query.
 QueryBuilder intersect(SetQuantifier setQuantifier, CorrespondingSpec correspondingSpec, QueryExpressionBody another)
          Adds INTERSECT <setQuantifier> <correspondingSpec> between current query and the given query.
 QueryBuilder intersect(SetQuantifier setQuantifier, QueryExpressionBody another)
           Adds INTERSECT <setQuantifier> between current query and the given query.
 QueryBuilder union(CorrespondingSpec correspondingSpec, QueryExpressionBody another)
           Adds UNION <correspondingSpec> between current query and the given query.
 QueryBuilder union(QueryExpressionBody another)
           Adds UNION between current query and the given query.
 QueryBuilder union(SetQuantifier setQuantifier, CorrespondingSpec correspondingSpec, QueryExpressionBody another)
          Adds UNION <setQuantifier> <correspondingSpec> between current query and the given query.
 QueryBuilder union(SetQuantifier setQuantifier, QueryExpressionBody another)
           Adds UNION <setQuantifier> between current query and the given query.
 
Methods inherited from interface org.sql.generation.api.grammar.builders.AbstractBuilder
createExpression
 

Method Detail

union

QueryBuilder union(QueryExpressionBody another)

Adds UNION between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling union(SetQuantifier, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
another - The query to perform UNION with.
Returns:
This builder.

union

QueryBuilder union(SetQuantifier setQuantifier,
                   QueryExpressionBody another)

Adds UNION <setQuantifier> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling union(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving null as second parameter.

Parameters:
setQuantifier - The set quantifier for this union.
another - The query to perform UNION with.
Returns:
This builder.

union

QueryBuilder union(CorrespondingSpec correspondingSpec,
                   QueryExpressionBody another)

Adds UNION <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling union(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
correspondingSpec - The column correspondence specification.
another - The query to perform UNION with.
Returns:
This builder.

union

QueryBuilder union(SetQuantifier setQuantifier,
                   CorrespondingSpec correspondingSpec,
                   QueryExpressionBody another)
Adds UNION <setQuantifier> <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

Parameters:
setQuantifier - The set quantifier for this union.
correspondingSpec - The column correspondence specification. May be null.
another - The query to perform UNION with.
Returns:
This builder.

intersect

QueryBuilder intersect(QueryExpressionBody another)

Adds INTERSECT between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling intersect(SetQuantifier, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
another - The query to perform INTERSECT with.
Returns:
This builder.

intersect

QueryBuilder intersect(SetQuantifier setQuantifier,
                       QueryExpressionBody another)

Adds INTERSECT <setQuantifier> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling intersect(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving null as second parameter.

Parameters:
setQuantifier - The set quantifier for this union.
another - The query to perform INTERSECT with.
Returns:
This builder.

intersect

QueryBuilder intersect(CorrespondingSpec correspondingSpec,
                       QueryExpressionBody another)

Adds INTERSECT <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling intersect(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
correspondingSpec - The column correspondence specification.
another - The query to perform INTERSECT with.
Returns:
This builder.

intersect

QueryBuilder intersect(SetQuantifier setQuantifier,
                       CorrespondingSpec correspondingSpec,
                       QueryExpressionBody another)
Adds INTERSECT <setQuantifier> <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

Parameters:
setQuantifier - The set quantifier for this union.
correspondingSpec - The column correspondence specification. May be null.
another - The query to perform INTERSECT with.
Returns:
This builder.

except

QueryBuilder except(SetQuantifier setQuantifier,
                    CorrespondingSpec correspondingSpec,
                    QueryExpressionBody another)

Adds EXCEPT between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling except(SetQuantifier, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
another - The query to perform EXCEPT with.
Returns:
This builder.

except

QueryBuilder except(QueryExpressionBody another)

Adds EXCEPT <setQuantifier> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling except(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving null as second parameter.

Parameters:
setQuantifier - The set quantifier for this union.
another - The query to perform EXCEPT with.
Returns:
This builder.

except

QueryBuilder except(SetQuantifier setQuantifier,
                    QueryExpressionBody another)

Adds EXCEPT <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

This is equivalent on calling except(SetQuantifier, CorrespondingSpec, QueryExpressionBody) and giving SetQuantifier.DISTINCT as first parameter.

Parameters:
correspondingSpec - The column correspondence specification.
another - The query to perform EXCEPT with.
Returns:
This builder.

except

QueryBuilder except(CorrespondingSpec correspondingSpec,
                    QueryExpressionBody another)
Adds EXCEPT <setQuantifier> <correspondingSpec> between current query and the given query. Then makes resulting query the current query.

Parameters:
setQuantifier - The set quantifier for this union.
correspondingSpec - The column correspondence specification. May be null.
another - The query to perform EXCEPT with.
Returns:
This builder.


Copyright © 2010-2012. All Rights Reserved.