T - result typeQ - concrete subtypepublic abstract class AbstractHibernateSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>> extends AbstractSQLQuery<T,Q>
AbstractHibernateSQLQuery is the base class for Hibernate Native SQL queries| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
cacheable |
protected String |
cacheRegion |
protected int |
fetchSize |
protected Boolean |
readOnly |
protected int |
timeout |
configuration, firstUnionSubQuery, union, unionAllMDC_PARAMETERS, MDC_QUERY, queryMixin| Constructor and Description |
|---|
AbstractHibernateSQLQuery(org.hibernate.Session session,
Configuration conf) |
AbstractHibernateSQLQuery(SessionHolder session,
Configuration conf,
QueryMetadata metadata) |
AbstractHibernateSQLQuery(org.hibernate.StatelessSession session,
Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupMDC() |
Q |
clone() |
protected void |
clone(Q query) |
Q |
clone(org.hibernate.Session session) |
protected abstract Q |
clone(SessionHolder session) |
Q |
clone(org.hibernate.StatelessSession statelessSession) |
org.hibernate.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 |
setCacheable(boolean cacheable)
Enable caching of this query result set.
|
Q |
setCacheRegion(String cacheRegion)
Set the name of the cache region.
|
Q |
setFetchSize(int fetchSize)
Set a fetchJoin size for the underlying JDBC query.
|
Q |
setReadOnly(boolean readOnly)
Entities retrieved by this query will be loaded in
a read-only mode where Hibernate will never dirty-check
them or make changes persistent.
|
Q |
setTimeout(int timeout)
Set a timeout for the underlying JDBC query.
|
extractEntityExpression, isEntityExpressionaccept, addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, fetchCount, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, 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 Boolean cacheable
protected Boolean readOnly
protected String cacheRegion
protected int fetchSize
protected int timeout
public AbstractHibernateSQLQuery(org.hibernate.Session session,
Configuration conf)
public AbstractHibernateSQLQuery(org.hibernate.StatelessSession session,
Configuration conf)
public AbstractHibernateSQLQuery(SessionHolder session, Configuration conf, QueryMetadata metadata)
public org.hibernate.Query createQuery()
protected SQLSerializer createSerializer()
createSerializer in class ProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>public List<T> fetch()
Fetchablefetch in interface Fetchable<T>fetch in class FetchableQueryBase<T,Q extends AbstractHibernateSQLQuery<T,Q>>public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchablepublic QueryResults<T> fetchResults()
FetchableQueryResults formprotected void cleanupMDC()
protected void reset()
public T fetchOne()
FetchablefetchOne in interface Fetchable<T>fetchOne in class ProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>public Q setCacheable(boolean cacheable)
cacheable - Should the query results be cacheable?public Q setCacheRegion(String cacheRegion)
cacheRegion - the name of a query cache region, or null
for the default query cachepublic Q setFetchSize(int fetchSize)
fetchSize - the fetchJoin sizepublic Q setReadOnly(boolean readOnly)
public Q setTimeout(int timeout)
timeout - the timeout in secondsprotected void clone(Q query)
clone in class ProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>protected abstract Q clone(SessionHolder session)
public Q clone(org.hibernate.Session session)
public Q clone(org.hibernate.StatelessSession statelessSession)
public Q clone()
clone in class ProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>Copyright © 2007–2016 Querydsl. All rights reserved.