public interface QuerySpecificationBuilder extends AbstractQueryBuilder<QuerySpecification>
SELECT query. It acts as an aggregator for ColumnsBuilder for columns in
SELECT, FromBuilder for tables in FROM clause, BooleanBuilder for search condition in
WHERE clause, GroupByBuilder for GROUP BY clause, another BooleanBuilder for grouping
conditions in HAVING clause, and finally OrderByBuilder for ORDER BY clause.QuerySpecification| Modifier and Type | Method and Description |
|---|---|
FromBuilder |
getFrom()
Gets the builder for
FROM clause of this SELECT statement. |
GroupByBuilder |
getGroupBy()
Gets the builder for
GROUP BY clause of this SELECT statement. |
BooleanBuilder |
getHaving()
Gets the builder for grouping condition in
HAVING clause of this SELECT statement. |
OrderByBuilder |
getOrderBy()
Gets the builder for
ORDER BY clause of this SELECT statement. |
ColumnsBuilder |
getSelect()
Gets the builder for columns in this
SELECT statement. |
BooleanBuilder |
getWhere()
Gets the builder for search condition in
WHERE clause of this SELECT statement. |
QuerySpecificationBuilder |
limit()
Adds the
FETCH FIRST ROW ONLY expression for this query. |
QuerySpecificationBuilder |
limit(Integer max)
Adds the
FETCH FIRST <number> ROWS ONLY expression for this query. |
QuerySpecificationBuilder |
limit(NonBooleanExpression max)
Adds the
FETCH FIRST <number> ROWS ONLY expression for this query. |
QuerySpecificationBuilder |
offset(Integer skip)
Adds the
OFFSET <number> ROWS expression for this query. |
QuerySpecificationBuilder |
offset(NonBooleanExpression skip)
Adds the
OFFSET <number> ROWS expression for this query. |
QuerySpecificationBuilder |
setFrom(FromBuilder builder)
Sets the builder for
FROM clause of this SELECT statement. |
QuerySpecificationBuilder |
setGroupBy(GroupByBuilder builder)
Sets the builder for
GROUP BY clause of this SELECT statement. |
QuerySpecificationBuilder |
setHaving(BooleanBuilder builder)
Sets the builder for grouping condition in
HAVING clause of this SELECT statement. |
QuerySpecificationBuilder |
setOrderBy(OrderByBuilder builder)
Sets the builder for
ORDER BY clause of this SELECT statement. |
QuerySpecificationBuilder |
setSelect(ColumnsBuilder builder)
Sets the builder for columns in
SELECT statement. |
QuerySpecificationBuilder |
setWhere(BooleanBuilder builder)
Sets the builder for search condition in
WHERE clause of this SELECT statement. |
QuerySpecificationBuilder |
trimGroupBy()
Checks that all selected columns are in
GROUP BY clause. |
createExpressionColumnsBuilder getSelect()
SELECT statement.SELECT statement.FromBuilder getFrom()
FROM clause of this SELECT statement.FROM clause of this SELECT statement.BooleanBuilder getWhere()
WHERE clause of this SELECT statement.WHERE clause of this SELECT statement.GroupByBuilder getGroupBy()
GROUP BY clause of this SELECT statement.GROUP BY clause of this SELECT statement.BooleanBuilder getHaving()
HAVING clause of this SELECT statement.HAVING clause of this SELECT statement.OrderByBuilder getOrderBy()
ORDER BY clause of this SELECT statement.ORDER BY clause of this SELECT statement.QuerySpecificationBuilder trimGroupBy()
GROUP BY clause. If they are not, it adds them as last columns of
GROUP BY clause.QuerySpecificationBuilder setSelect(ColumnsBuilder builder)
SELECT statement.QuerySpecificationBuilder setFrom(FromBuilder builder)
FROM clause of this SELECT statement.QuerySpecificationBuilder setWhere(BooleanBuilder builder)
WHERE clause of this SELECT statement.QuerySpecificationBuilder setGroupBy(GroupByBuilder builder)
GROUP BY clause of this SELECT statement.QuerySpecificationBuilder setHaving(BooleanBuilder builder)
HAVING clause of this SELECT statement.QuerySpecificationBuilder setOrderBy(OrderByBuilder builder)
ORDER BY clause of this SELECT statement.QuerySpecificationBuilder limit()
AbstractQueryBuilderFETCH FIRST ROW ONLY expression for this query. The resulting LimitSpecification will
have its count as null.limit in interface AbstractQueryBuilder<QuerySpecification>QuerySpecificationBuilder limit(Integer max)
AbstractQueryBuilderFETCH FIRST <number> ROWS ONLY expression for this query. Calling this method is equivalent of
calling AbstractQueryBuilder.limit(NonBooleanExpression) and passing the NumericLiteral representing the given number
as the parameter.limit in interface AbstractQueryBuilder<QuerySpecification>max - The maximum amount of rows for this query to return. Use null to remove the
FETCH FIRST <number> ROWS ONLY expression.QuerySpecificationBuilder limit(NonBooleanExpression max)
AbstractQueryBuilderFETCH FIRST <number> ROWS ONLY expression for this query.limit in interface AbstractQueryBuilder<QuerySpecification>max - The maximum amount of rows for this query to return. May be subquery or something else that evaluates
to number or NULL. Use null to remove the FETCH FIRST <number> ROWS ONLY
expression.QuerySpecificationBuilder offset(Integer skip)
AbstractQueryBuilderOFFSET <number> ROWS expression for this query. Calling this method is equivalen of calling
AbstractQueryBuilder.offset(NonBooleanExpression) and passing the NumericLiteral representing the given number as the
parameter.offset in interface AbstractQueryBuilder<QuerySpecification>skip - The amount of rows to skip before starting to include them into this query. Use null to
remove the OFFSET <number> ROWS expression.QuerySpecificationBuilder offset(NonBooleanExpression skip)
AbstractQueryBuilderOFFSET <number> ROWS expression for this query.offset in interface AbstractQueryBuilder<QuerySpecification>skip - The amount of rows to skip before starting to include them into this query. May be subquery or
something else that evaluates to number or NULL. Use null to remove the
OFFSET <number> ROWS expression.Copyright © 2010-2012. All Rights Reserved.