Q
- public abstract class AbstractJPASQLQuery<Q extends AbstractJPASQLQuery<Q> & Query> extends AbstractSQLQuery<Q>
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.FlushModeType |
flushMode |
protected com.google.common.collect.Multimap<String,Object> |
hints |
protected javax.persistence.LockModeType |
lockMode |
protected FactoryExpression<?> |
projection |
protected QueryHandler |
queryHandler |
protected SQLTemplates |
templates |
protected Expression<?> |
union |
queryMixin
Constructor and Description |
---|
AbstractJPASQLQuery(javax.persistence.EntityManager em,
SQLTemplates sqlTemplates) |
AbstractJPASQLQuery(javax.persistence.EntityManager em,
SQLTemplates sqlTemplates,
QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
javax.persistence.Query |
createQuery(Expression<?>... args) |
com.mysema.commons.lang.CloseableIterator<Tuple> |
iterate(Expression<?>... args)
iterate over the results for the given projection
|
<RT> com.mysema.commons.lang.CloseableIterator<RT> |
iterate(Expression<RT> expr)
iterate over the results for the given projection
|
List<Tuple> |
list(Expression<?>... args)
list the results for the given projection
An empty list is returned for no results.
|
<RT> List<RT> |
list(Expression<RT> projection)
list the results for the given projection
An empty list is returned for no results.
|
SearchResults<Tuple> |
listResults(Expression<?>... args)
list the results for the given projection
|
<RT> SearchResults<RT> |
listResults(Expression<RT> projection)
list the results for the given projection
|
protected void |
logQuery(String queryString) |
protected void |
reset() |
Q |
setFlushMode(javax.persistence.FlushModeType flushMode) |
Q |
setHint(String name,
Object value) |
Q |
setLockMode(javax.persistence.LockModeType lockMode) |
protected String |
toCountRowsString() |
protected String |
toQueryString() |
<RT> Union<RT> |
union(ListSubQuery<RT>... sq) |
<RT> Q |
union(Path<?> alias,
ListSubQuery<RT>... sq) |
<RT> Q |
union(Path<?> alias,
SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
union(SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
unionAll(ListSubQuery<RT>... sq) |
<RT> Q |
unionAll(Path<?> alias,
ListSubQuery<RT>... sq) |
<RT> Q |
unionAll(Path<?> alias,
SubQueryExpression<RT>... sq) |
<RT> Union<RT> |
unionAll(SubQueryExpression<RT>... sq) |
Tuple |
uniqueResult(Expression<?>... args)
return a unique result for the given projection or null if no result is found
|
<RT> RT |
uniqueResult(Expression<RT> expr)
return a unique result for the given projection or null if no result is found
|
addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, count, exists, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, getMetadata, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin
countDistinct, iterateDistinct, iterateDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, transform, uniqueResult
protected final SQLTemplates templates
protected final QueryHandler queryHandler
@Nullable protected Expression<?> union
@Nullable protected javax.persistence.LockModeType lockMode
@Nullable protected javax.persistence.FlushModeType flushMode
@Nullable protected FactoryExpression<?> projection
public AbstractJPASQLQuery(javax.persistence.EntityManager em, SQLTemplates sqlTemplates)
public AbstractJPASQLQuery(javax.persistence.EntityManager em, SQLTemplates sqlTemplates, QueryMetadata metadata)
public javax.persistence.Query createQuery(Expression<?>... args)
public List<Tuple> list(Expression<?>... args)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJPASQLQuery<Q> & Query>
public <RT> List<RT> list(Expression<RT> projection)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJPASQLQuery<Q> & Query>
RT
- generic type of the Listpublic com.mysema.commons.lang.CloseableIterator<Tuple> iterate(Expression<?>... args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
Projectable
RT
- generic type of the Iteratorpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectable
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectable
protected void logQuery(String queryString)
protected void reset()
protected String toCountRowsString()
protected String toQueryString()
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> Q union(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> Q union(Path<?> alias, SubQueryExpression<RT>... sq)
public <RT> Q unionAll(Path<?> alias, ListSubQuery<RT>... sq)
public <RT> Q unionAll(Path<?> alias, SubQueryExpression<RT>... sq)
public Tuple uniqueResult(Expression<?>... args)
Projectable
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
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 typepublic Q setLockMode(javax.persistence.LockModeType lockMode)
public Q setFlushMode(javax.persistence.FlushModeType flushMode)
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.