|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mysema.query.support.QueryBase<Q> com.mysema.query.support.ProjectableQuery<Q> com.mysema.query.sql.AbstractSQLQuery<Q>
public abstract class AbstractSQLQuery<Q extends AbstractSQLQuery<Q> & Query>
AbstractSQLQuery is the base type for SQL query implementations
Field Summary | |
---|---|
protected SQLQueryMixin<Q> |
queryMixin
|
protected SubQueryExpression<?>[] |
union
|
protected boolean |
unionAll
|
Constructor Summary | |
---|---|
AbstractSQLQuery(Connection conn,
Configuration configuration)
|
|
AbstractSQLQuery(Connection conn,
Configuration configuration,
QueryMetadata metadata)
|
Method Summary | ||
---|---|---|
Q |
addFlag(QueryFlag.Position position,
Expression<?> flag)
Add the given Expression as a query flag |
|
Q |
addFlag(QueryFlag.Position position,
String flag)
Add the given String literal as query flag |
|
Q |
addFlag(QueryFlag.Position position,
String prefix,
Expression<?> expr)
Add the given prefix and expression as a general query flag |
|
Q |
addJoinFlag(String flag)
Add the given String literal as a join flag to the last added join with the position BEFORE_TARGET |
|
Q |
addJoinFlag(String flag,
JoinFlag.Position position)
Add the given String literal as a join flag to the last added join |
|
protected String |
buildQueryString(boolean forCountRow)
|
|
long |
count()
return the amount of matched rows |
|
protected SQLSerializer |
createSerializer()
|
|
boolean |
exists()
|
|
Q |
forUpdate()
|
|
Q |
from(Expression<?>... args)
|
|
Q |
from(SubQueryExpression<?> subQuery,
Path<?> alias)
|
|
|
fullJoin(ForeignKey<E> key,
RelationalPath<E> entity)
|
|
|
fullJoin(RelationalFunctionCall<E> target,
Path<E> alias)
|
|
Q |
fullJoin(RelationalPath<?> target)
|
|
Q |
fullJoin(SubQueryExpression<?> target,
Path<?> alias)
|
|
protected Configuration |
getConfiguration()
|
|
QueryMetadata |
getMetadata()
|
|
ResultSet |
getResults(Expression<?>... exprs)
|
|
|
innerJoin(ForeignKey<E> key,
RelationalPath<E> entity)
|
|
|
innerJoin(RelationalFunctionCall<E> target,
Path<E> alias)
|
|
Q |
innerJoin(RelationalPath<?> target)
|
|
Q |
innerJoin(SubQueryExpression<?> target,
Path<?> alias)
|
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterate(Expression<?>[] args)
iterate over the results for the given projection |
|
|
iterate(Expression<RT> expr)
iterate over the results for the given projection |
|
|
join(ForeignKey<E> key,
RelationalPath<E> entity)
|
|
|
join(RelationalFunctionCall<E> target,
Path<E> alias)
|
|
Q |
join(RelationalPath<?> target)
|
|
Q |
join(SubQueryExpression<?> target,
Path<?> alias)
|
|
|
leftJoin(ForeignKey<E> key,
RelationalPath<E> entity)
|
|
|
leftJoin(RelationalFunctionCall<E> target,
Path<E> alias)
|
|
Q |
leftJoin(RelationalPath<?> target)
|
|
Q |
leftJoin(SubQueryExpression<?> target,
Path<?> alias)
|
|
List<Object[]> |
list(Expression<?>[] args)
list the results for the given projection An empty list is returned for no results. |
|
|
list(Expression<RT> expr)
list the results for the given projection An empty list is returned for no results. |
|
|
listResults(Expression<RT> expr)
list the results for the given projection |
|
Q |
on(Predicate... conditions)
|
|
|
rightJoin(ForeignKey<E> key,
RelationalPath<E> entity)
|
|
|
rightJoin(RelationalFunctionCall<E> target,
Path<E> alias)
|
|
Q |
rightJoin(RelationalPath<?> target)
|
|
Q |
rightJoin(SubQueryExpression<?> target,
Path<?> alias)
|
|
protected void |
setParameters(PreparedStatement stmt,
List<?> objects,
List<Path<?>> constantPaths,
Map<ParamExpression<?>,?> params)
|
|
String |
toString()
|
|
|
union(ListSubQuery<RT>... sq)
|
|
|
union(Path<?> alias,
ListSubQuery<RT>... sq)
|
|
|
union(Path<?> alias,
SubQueryExpression<RT>... sq)
|
|
|
union(SubQueryExpression<RT>... sq)
|
|
|
unionAll(ListSubQuery<RT>... sq)
|
|
|
unionAll(Path<?> alias,
ListSubQuery<RT>... sq)
|
|
|
unionAll(Path<?> alias,
SubQueryExpression<RT>... sq)
|
|
|
unionAll(SubQueryExpression<RT>... sq)
|
|
Object[] |
uniqueResult(Expression<?>[] expr)
return a unique result for the given projection or null if no result is found |
|
|
uniqueResult(Expression<RT> expr)
return a unique result for the given projection or null if no result is found |
Methods inherited from class com.mysema.query.support.ProjectableQuery |
---|
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, singleResult, transform, uniqueResult, uniqueResult |
Methods inherited from class com.mysema.query.support.QueryBase |
---|
distinct, equals, groupBy, hashCode, having, limit, offset, orderBy, restrict, set, where |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Nullable protected SubQueryExpression<?>[] union
protected final SQLQueryMixin<Q extends AbstractSQLQuery<Q> & Query> queryMixin
protected boolean unionAll
Constructor Detail |
---|
public AbstractSQLQuery(@Nullable Connection conn, Configuration configuration)
public AbstractSQLQuery(@Nullable Connection conn, Configuration configuration, QueryMetadata metadata)
Method Detail |
---|
public Q addJoinFlag(String flag)
flag
-
public Q addJoinFlag(String flag, JoinFlag.Position position)
flag
- position
-
public Q addFlag(QueryFlag.Position position, String prefix, Expression<?> expr)
position
- position of the flagprefix
- prefix for the flagexpr
- expression of the flag
public Q addFlag(QueryFlag.Position position, String flag)
position
- flag
-
public Q addFlag(QueryFlag.Position position, Expression<?> flag)
position
- flag
-
protected String buildQueryString(boolean forCountRow)
public long count()
Projectable
public boolean exists()
public Q forUpdate()
protected SQLSerializer createSerializer()
public Q from(Expression<?>... args)
public Q from(SubQueryExpression<?> subQuery, Path<?> alias)
public Q fullJoin(RelationalPath<?> target)
public <E> Q fullJoin(RelationalFunctionCall<E> target, Path<E> alias)
public Q fullJoin(SubQueryExpression<?> target, Path<?> alias)
public <E> Q fullJoin(ForeignKey<E> key, RelationalPath<E> entity)
public Q innerJoin(RelationalPath<?> target)
public <E> Q innerJoin(RelationalFunctionCall<E> target, Path<E> alias)
public Q innerJoin(SubQueryExpression<?> target, Path<?> alias)
public <E> Q innerJoin(ForeignKey<E> key, RelationalPath<E> entity)
public Q join(RelationalPath<?> target)
public <E> Q join(RelationalFunctionCall<E> target, Path<E> alias)
public Q join(SubQueryExpression<?> target, Path<?> alias)
public <E> Q join(ForeignKey<E> key, RelationalPath<E> entity)
public Q leftJoin(RelationalPath<?> target)
public <E> Q leftJoin(RelationalFunctionCall<E> target, Path<E> alias)
public Q leftJoin(SubQueryExpression<?> target, Path<?> alias)
public <E> Q leftJoin(ForeignKey<E> key, RelationalPath<E> entity)
public Q rightJoin(RelationalPath<?> target)
public <E> Q rightJoin(RelationalFunctionCall<E> target, Path<E> alias)
public Q rightJoin(SubQueryExpression<?> target, Path<?> alias)
public <E> Q rightJoin(ForeignKey<E> key, RelationalPath<E> entity)
public QueryMetadata getMetadata()
public ResultSet getResults(Expression<?>... exprs)
protected Configuration getConfiguration()
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
Projectable
RT
- generic type of the Iterator
public List<Object[]> list(Expression<?>[] args)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractSQLQuery<Q> & Query>
public <RT> List<RT> list(Expression<RT> expr)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractSQLQuery<Q> & Query>
RT
- generic type of the List
public <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectable
public Q on(Predicate... conditions)
protected void setParameters(PreparedStatement stmt, List<?> objects, List<Path<?>> constantPaths, Map<ParamExpression<?>,?> params)
public String toString()
toString
in class QueryBase<Q extends AbstractSQLQuery<Q> & Query>
public <RT> Union<RT> union(ListSubQuery<RT>... sq)
public <RT> Q union(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> Union<RT> union(SubQueryExpression<RT>... sq)
public <RT> Q union(Path<?> alias, SubQueryExpression<RT>... sq)
public <RT> Union<RT> unionAll(ListSubQuery<RT>... sq)
public <RT> Q unionAll(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq)
public <RT> Q unionAll(Path<?> alias, SubQueryExpression<RT>... sq)
public <RT> RT uniqueResult(Expression<RT> expr)
Projectable
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
RT
- return type
public Object[] uniqueResult(Expression<?>[] expr)
Projectable
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |