T - result typeQ - concrete subtypepublic abstract class AbstractJPAQuery<T,Q extends AbstractJPAQuery<T,Q>> extends JPAQueryBase<T,Q>
| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
entityManager |
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 |
queryMixinMDC_PARAMETERS, MDC_QUERY| Constructor and Description |
|---|
AbstractJPAQuery(javax.persistence.EntityManager em) |
AbstractJPAQuery(javax.persistence.EntityManager em,
JPQLTemplates templates,
QueryMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupMDC() |
Q |
clone()
Clone the state of this query to a new instance
|
abstract Q |
clone(javax.persistence.EntityManager entityManager)
Clone the state of this query to a new instance with the given EntityManager
|
abstract Q |
clone(javax.persistence.EntityManager entityManager,
JPQLTemplates templates)
Clone the state of this query to a new instance with the given EntityManager
and the specified templates
|
protected void |
clone(Q query) |
javax.persistence.Query |
createQuery()
Expose the original JPA query for the given projection
|
protected JPQLSerializer |
createSerializer() |
List<T> |
fetch()
Get the projection as a typed List
|
long |
fetchCount()
Get the count of matched elements
|
T |
fetchOne()
Get the projection as a unique result or null if no result is found
|
QueryResults<T> |
fetchResults()
Get the projection in
QueryResults form |
com.mysema.commons.lang.CloseableIterator<T> |
iterate()
Get the projection as a typed closeable Iterator
|
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) |
fetchAll, fetchJoin, from, from, from, getTemplates, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toStringaccept, contains, contains, eq, eq, exists, getMetadata, getType, goe, goe, gt, gt, hashCode, loe, loe, lt, lt, ne, ne, notExistsequals, fetchFirst, transform, uniqueResultdistinct, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, restrict, set, where, wherefinalize, getClass, notify, notifyAll, wait, wait, waittransformfetchFirstdistinct, limit, offset, orderBy, restrict, setwherecontains, contains, eq, eq, exists, goe, goe, gt, gt, loe, loe, lt, lt, ne, ne, notExistsgetMetadataaccept, getTypeprotected final javax.persistence.EntityManager entityManager
protected final QueryHandler queryHandler
@Nullable protected javax.persistence.LockModeType lockMode
@Nullable protected javax.persistence.FlushModeType flushMode
@Nullable protected FactoryExpression<?> projection
public AbstractJPAQuery(javax.persistence.EntityManager em)
public AbstractJPAQuery(javax.persistence.EntityManager em,
JPQLTemplates templates,
QueryMetadata metadata)
public long fetchCount()
Fetchablepublic javax.persistence.Query createQuery()
public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchablepublic List<T> fetch()
Fetchablefetch in interface Fetchable<T>fetch in class FetchableQueryBase<T,Q extends AbstractJPAQuery<T,Q>>public QueryResults<T> fetchResults()
FetchableQueryResults formprotected void cleanupMDC()
protected void reset()
reset in class JPAQueryBase<T,Q extends AbstractJPAQuery<T,Q>>@Nullable public T fetchOne()
Fetchablepublic Q setLockMode(javax.persistence.LockModeType lockMode)
public Q setFlushMode(javax.persistence.FlushModeType flushMode)
protected JPQLSerializer createSerializer()
createSerializer in class JPAQueryBase<T,Q extends AbstractJPAQuery<T,Q>>protected void clone(Q query)
public abstract Q clone(javax.persistence.EntityManager entityManager)
entityManager - entity managerpublic abstract Q clone(javax.persistence.EntityManager entityManager, JPQLTemplates templates)
entityManager - entity managertemplates - templatespublic Q clone()
clone in class JPAQueryBase<T,Q extends AbstractJPAQuery<T,Q>>Copyright © 2007–2015 Mysema Ltd. All rights reserved.