T
- concrete subtypepublic abstract class AbstractSQLQuery<T extends AbstractSQLQuery<T> & Query<T>> extends ProjectableQuery<T> implements SQLCommonQuery<T>
Modifier and Type | Field and Description |
---|---|
protected QueryMixin<T> |
queryMixin |
protected Expression<?> |
union |
protected boolean |
unionAll |
Constructor and Description |
---|
AbstractSQLQuery(QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
T |
addFlag(QueryFlag.Position position,
Expression<?> flag)
Add the given Expression as a query flag
|
T |
addFlag(QueryFlag.Position position,
String flag)
Add the given String literal as query flag
|
T |
addFlag(QueryFlag.Position position,
String prefix,
Expression<?> expr)
Add the given prefix and expression as a general query flag
|
T |
addJoinFlag(String flag)
Add the given String literal as a join flag to the last added join with the
position BEFORE_TARGET
|
T |
addJoinFlag(String flag,
JoinFlag.Position position)
Add the given String literal as a join flag to the last added join
|
long |
count()
return the amount of matched rows
|
boolean |
exists() |
protected Expression<?> |
extractEntityExpression(Expression<?> expr) |
T |
from(Expression<?>... args)
Defines the sources of the query
|
T |
from(Expression<?> arg) |
T |
from(SubQueryExpression<?> subQuery,
Path<?> alias)
Adds a sub query source
|
T |
fullJoin(EntityPath<?> o)
Adds a full join to the given target
|
<E> T |
fullJoin(ForeignKey<E> key,
RelationalPath<E> entity)
Adds a full join to the given target
|
<E> T |
fullJoin(RelationalFunctionCall<E> target,
Path<E> alias)
Adds a full join to the given target
|
T |
fullJoin(SubQueryExpression<?> o,
Path<?> alias)
Adds a full join to the given target
|
QueryMetadata |
getMetadata() |
T |
innerJoin(EntityPath<?> o)
Adds an inner join to the given target
|
<E> T |
innerJoin(ForeignKey<E> key,
RelationalPath<E> entity)
Adds an inner join to the given target
|
<E> T |
innerJoin(RelationalFunctionCall<E> target,
Path<E> alias)
Adds a full join to the given target
|
T |
innerJoin(SubQueryExpression<?> o,
Path<?> alias)
Adds an inner join to the given target
|
protected <RT> Union<RT> |
innerUnion(SubQueryExpression<?>... sq) |
protected boolean |
isEntityExpression(Expression<?> expr) |
T |
join(EntityPath<?> o)
Adds a join to the given target
|
<E> T |
join(ForeignKey<E> key,
RelationalPath<E> entity)
Adds a join to the given target
|
<E> T |
join(RelationalFunctionCall<E> target,
Path<E> alias)
Adds a full join to the given target
|
T |
join(SubQueryExpression<?> o,
Path<?> alias)
Adds a join to the given target
|
T |
leftJoin(EntityPath<?> o)
Adds a left join to the given target
|
<E> T |
leftJoin(ForeignKey<E> key,
RelationalPath<E> entity)
Adds a left join to the given target
|
<E> T |
leftJoin(RelationalFunctionCall<E> target,
Path<E> alias)
Adds a full join to the given target
|
T |
leftJoin(SubQueryExpression<?> o,
Path<?> alias)
Adds a left join to the given target
|
T |
on(Predicate... conditions)
Defines a filter to the last added join
|
T |
on(Predicate condition) |
T |
rightJoin(EntityPath<?> o)
Adds a right join to the given target
|
<E> T |
rightJoin(ForeignKey<E> key,
RelationalPath<E> entity)
Adds a right join to the given target
|
<E> T |
rightJoin(RelationalFunctionCall<E> target,
Path<E> alias)
Adds a full join to the given target
|
T |
rightJoin(SubQueryExpression<?> o,
Path<?> alias)
Adds a right join to the given target
|
<RT> Union<RT> |
union(ListSubQuery<RT>... sq) |
<RT> T |
union(Path<?> alias,
ListSubQuery<RT>... sq) |
<RT> T |
union(Path<?> alias,
SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
union(SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
unionAll(ListSubQuery<RT>... sq) |
<RT> T |
unionAll(Path<?> alias,
ListSubQuery<RT>... sq) |
<RT> T |
unionAll(Path<?> alias,
SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
unionAll(SubQueryExpression<RT>... sq) |
T |
with(Path<?> alias,
Expression<?> query)
Adds a common table expression
|
WithBuilder<T> |
with(Path<?> alias,
Path<?>... columns)
Adds a common table expression
|
T |
with(Path<?> alias,
SubQueryExpression<?> query)
Adds a common table expression
|
T |
withRecursive(Path<?> alias,
Expression<?> query)
Adds a common table expression
|
WithBuilder<T> |
withRecursive(Path<?> alias,
Path<?>... columns)
Adds a common table expression
|
T |
withRecursive(Path<?> alias,
SubQueryExpression<?> query)
Adds a common table expression
|
list, list, map, notExists, singleResult, singleResult, transform, uniqueResult
distinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, toString, where, where
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
distinct, limit, offset, orderBy, restrict, set
where
iterate, iterate, listResults, listResults, uniqueResult, uniqueResult
protected final QueryMixin<T extends AbstractSQLQuery<T> & Query<T>> queryMixin
@Nullable protected Expression<?> union
protected boolean unionAll
public AbstractSQLQuery(QueryMetadata metadata)
protected boolean isEntityExpression(Expression<?> expr)
protected Expression<?> extractEntityExpression(Expression<?> expr)
public long count()
Projectable
count
in interface Projectable
public boolean exists()
exists
in interface Projectable
public T from(Expression<?> arg)
public T from(Expression<?>... args)
SQLCommonQuery
from
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T from(SubQueryExpression<?> subQuery, Path<?> alias)
SQLCommonQuery
from
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T fullJoin(EntityPath<?> o)
SQLCommonQuery
fullJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T fullJoin(RelationalFunctionCall<E> target, Path<E> alias)
SQLCommonQuery
fullJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T fullJoin(ForeignKey<E> key, RelationalPath<E> entity)
SQLCommonQuery
fullJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T fullJoin(SubQueryExpression<?> o, Path<?> alias)
SQLCommonQuery
fullJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public QueryMetadata getMetadata()
public T innerJoin(EntityPath<?> o)
SQLCommonQuery
innerJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T innerJoin(RelationalFunctionCall<E> target, Path<E> alias)
SQLCommonQuery
innerJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T innerJoin(ForeignKey<E> key, RelationalPath<E> entity)
SQLCommonQuery
innerJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T innerJoin(SubQueryExpression<?> o, Path<?> alias)
SQLCommonQuery
innerJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T join(EntityPath<?> o)
SQLCommonQuery
join
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T join(RelationalFunctionCall<E> target, Path<E> alias)
SQLCommonQuery
join
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T join(ForeignKey<E> key, RelationalPath<E> entity)
SQLCommonQuery
join
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T join(SubQueryExpression<?> o, Path<?> alias)
SQLCommonQuery
join
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T leftJoin(EntityPath<?> o)
SQLCommonQuery
leftJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T leftJoin(RelationalFunctionCall<E> target, Path<E> alias)
SQLCommonQuery
leftJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T leftJoin(ForeignKey<E> key, RelationalPath<E> entity)
SQLCommonQuery
leftJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T leftJoin(SubQueryExpression<?> o, Path<?> alias)
SQLCommonQuery
leftJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T on(Predicate... conditions)
SQLCommonQuery
on
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T rightJoin(EntityPath<?> o)
SQLCommonQuery
rightJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T rightJoin(RelationalFunctionCall<E> target, Path<E> alias)
SQLCommonQuery
rightJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <E> T rightJoin(ForeignKey<E> key, RelationalPath<E> entity)
SQLCommonQuery
rightJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T rightJoin(SubQueryExpression<?> o, Path<?> alias)
SQLCommonQuery
rightJoin
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public <RT> Union<RT> union(ListSubQuery<RT>... sq)
public <RT> Union<RT> union(SubQueryExpression<RT>... sq)
public <RT> Union<RT> unionAll(ListSubQuery<RT>... sq)
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq)
public <RT> T union(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> T union(Path<?> alias, SubQueryExpression<RT>... sq)
public <RT> T unionAll(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> T unionAll(Path<?> alias, SubQueryExpression<RT>... sq)
public T withRecursive(Path<?> alias, SubQueryExpression<?> query)
SQLCommonQuery
withRecursive
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T withRecursive(Path<?> alias, Expression<?> query)
SQLCommonQuery
withRecursive
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public WithBuilder<T> withRecursive(Path<?> alias, Path<?>... columns)
SQLCommonQuery
withRecursive
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T with(Path<?> alias, Expression<?> query)
SQLCommonQuery
with
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public WithBuilder<T> with(Path<?> alias, Path<?>... columns)
SQLCommonQuery
with
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T with(Path<?> alias, SubQueryExpression<?> query)
SQLCommonQuery
with
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
protected <RT> Union<RT> innerUnion(SubQueryExpression<?>... sq)
public T addJoinFlag(String flag)
SQLCommonQuery
addJoinFlag
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T addJoinFlag(String flag, JoinFlag.Position position)
SQLCommonQuery
addJoinFlag
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T addFlag(QueryFlag.Position position, String prefix, Expression<?> expr)
SQLCommonQuery
addFlag
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
position
- position of the flagprefix
- prefix for the flagexpr
- expression of the flagpublic T addFlag(QueryFlag.Position position, String flag)
SQLCommonQuery
addFlag
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
public T addFlag(QueryFlag.Position position, Expression<?> flag)
SQLCommonQuery
addFlag
in interface SQLCommonQuery<T extends AbstractSQLQuery<T> & Query<T>>
Copyright © 2007–2014 Mysema Ltd. All rights reserved.