Q
- public abstract class AbstractJPASQLQuery<Q extends AbstractJPASQLQuery<Q>> 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 |
configuration, firstUnionSubQuery, union, unionAll
MDC_PARAMETERS, MDC_QUERY, queryMixin
Constructor and Description |
---|
AbstractJPASQLQuery(javax.persistence.EntityManager em,
Configuration configuration) |
AbstractJPASQLQuery(javax.persistence.EntityManager em,
Configuration configuration,
QueryHandler queryHandler) |
AbstractJPASQLQuery(javax.persistence.EntityManager em,
Configuration configuration,
QueryHandler queryHandler,
QueryMetadata metadata) |
AbstractJPASQLQuery(javax.persistence.EntityManager em,
Configuration configuration,
QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupMDC() |
Q |
clone() |
abstract Q |
clone(javax.persistence.EntityManager entityManager) |
protected void |
clone(Q query) |
javax.persistence.Query |
createQuery(Expression<?>... args) |
protected SQLSerializer |
createSerializer() |
<RT> com.mysema.commons.lang.CloseableIterator<RT> |
iterate(Expression<RT> expr)
iterate over the results for the given projection
|
<RT> List<RT> |
list(Expression<RT> projection)
list the results for the given projection
An empty list is returned for no results.
|
<RT> SearchResults<RT> |
listResults(Expression<RT> projection)
list the results for the given projection
|
protected void |
logQuery(String queryString,
Map<Object,String> parameters) |
protected void |
reset() |
Q |
setFlushMode(javax.persistence.FlushModeType flushMode) |
Q |
setHint(String name,
Object value) |
Q |
setLockMode(javax.persistence.LockModeType lockMode) |
<RT> RT |
uniqueResult(Expression<RT> expr)
return a unique result for the given projection or null if no result is found
|
extractEntityExpression, isEntityExpression
addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, count, exists, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, getMetadata, getSQL, innerJoin, innerJoin, innerJoin, innerJoin, iterate, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, list, listResults, on, on, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toString, union, union, union, union, unionAll, unionAll, unionAll, unionAll, uniqueResult, with, with, with, withRecursive, withRecursive, withRecursive
map, notExists, singleResult, singleResult, transform, uniqueResult
distinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, where, where
finalize, getClass, notify, notifyAll, wait, wait, wait
distinct, limit, offset, orderBy, restrict, set
where
protected final QueryHandler queryHandler
@Nullable protected javax.persistence.LockModeType lockMode
@Nullable protected javax.persistence.FlushModeType flushMode
@Nullable protected FactoryExpression<?> projection
public AbstractJPASQLQuery(javax.persistence.EntityManager em, Configuration configuration)
public AbstractJPASQLQuery(javax.persistence.EntityManager em, Configuration configuration, QueryHandler queryHandler)
public AbstractJPASQLQuery(javax.persistence.EntityManager em, Configuration configuration, QueryMetadata metadata)
public AbstractJPASQLQuery(javax.persistence.EntityManager em, Configuration configuration, QueryHandler queryHandler, QueryMetadata metadata)
public javax.persistence.Query createQuery(Expression<?>... args)
protected SQLSerializer createSerializer()
createSerializer
in class ProjectableSQLQuery<Q extends AbstractJPASQLQuery<Q>>
public <RT> List<RT> list(Expression<RT> projection)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJPASQLQuery<Q>>
RT
- generic type of the Listpublic <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
Projectable
RT
- generic type of the Iteratorpublic <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectable
protected void cleanupMDC()
protected void reset()
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.
uniqueResult
in interface Projectable
uniqueResult
in class ProjectableSQLQuery<Q extends AbstractJPASQLQuery<Q>>
RT
- return typepublic Q setLockMode(javax.persistence.LockModeType lockMode)
public Q setFlushMode(javax.persistence.FlushModeType flushMode)
protected void clone(Q query)
clone
in class ProjectableSQLQuery<Q extends AbstractJPASQLQuery<Q>>
public abstract Q clone(javax.persistence.EntityManager entityManager)
public Q clone()
clone
in class ProjectableSQLQuery<Q extends AbstractJPASQLQuery<Q>>
Copyright © 2007–2015 Mysema Ltd. All rights reserved.