T - result typeQ - concrete subtypepublic abstract class AbstractJPASQLQuery<T,Q extends AbstractJPASQLQuery<T,Q>> extends AbstractSQLQuery<T,Q>
AbstractJPASQLQuery is the base class for JPA Native SQL queries| 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, unionAllMDC_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() |
protected SQLSerializer |
createSerializer() |
List<T> |
fetch()
Get the projection as a typed List
|
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) |
extractEntityExpression, isEntityExpressionaccept, addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, fetchCount, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, getSQL, getSQL, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toString, union, union, union, unionAll, unionAll, unionAll, with, with, with, withRecursive, withRecursive, withRecursivecontains, contains, eq, eq, exists, getMetadata, getType, goe, goe, gt, gt, hashCode, in, in, isNotNull, isNull, 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, waitdistinct, limit, offset, orderBy, restrict, setwhereselect, select, transformfetchFirstprotected 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()
protected SQLSerializer createSerializer()
createSerializer in class ProjectableSQLQuery<T,Q extends AbstractJPASQLQuery<T,Q>>public List<T> fetch()
Fetchablefetch in interface Fetchable<T>fetch in class FetchableQueryBase<T,Q extends AbstractJPASQLQuery<T,Q>>public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchablepublic QueryResults<T> fetchResults()
FetchableQueryResults formprotected void cleanupMDC()
protected void reset()
public T fetchOne() throws NonUniqueResultException
FetchablefetchOne in interface Fetchable<T>fetchOne in class ProjectableSQLQuery<T,Q extends AbstractJPASQLQuery<T,Q>>NonUniqueResultException - if there is more than one matching resultpublic Q setLockMode(javax.persistence.LockModeType lockMode)
public Q setFlushMode(javax.persistence.FlushModeType flushMode)
protected void clone(Q query)
clone in class ProjectableSQLQuery<T,Q extends AbstractJPASQLQuery<T,Q>>public abstract Q clone(javax.persistence.EntityManager entityManager)
public Q clone()
clone in class ProjectableSQLQuery<T,Q extends AbstractJPASQLQuery<T,Q>>Copyright © 2007–2020 Querydsl. All rights reserved.