Q - public abstract class AbstractHibernateSQLQuery<Q extends AbstractHibernateSQLQuery<Q> & Query<Q>> extends AbstractSQLQuery<Q>
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
cacheable |
protected String |
cacheRegion |
protected Configuration |
configuration |
protected int |
fetchSize |
protected Boolean |
readOnly |
protected int |
timeout |
queryMixin, union, unionAll| 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 |
|---|---|
org.hibernate.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> projection)
iterate over the results for the given projection
|
List<Tuple> |
list(Expression<?>... projection)
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 |
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 fetch 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.
|
protected String |
toCountRowsString() |
protected String |
toQueryString() |
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, extractEntityExpression, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, getMetadata, innerJoin, innerJoin, innerJoin, innerJoin, innerUnion, isEntityExpression, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin, union, union, union, union, unionAll, unionAll, unionAll, unionAll, with, with, with, withRecursive, withRecursive, withRecursivemap, notExists, singleResult, singleResult, transform, uniqueResultdistinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, toString, where, whereclone, finalize, getClass, notify, notifyAll, wait, wait, waitdistinct, limit, offset, orderBy, restrict, setwhereprotected Boolean cacheable
protected Boolean readOnly
protected String cacheRegion
protected int fetchSize
protected final Configuration configuration
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(Expression<?>... args)
public List<Tuple> list(Expression<?>... projection)
Projectablelist in interface Projectablelist in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query<Q>>public <RT> List<RT> list(Expression<RT> projection)
Projectablelist in interface Projectablelist in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query<Q>>RT - generic type of the Listpublic com.mysema.commons.lang.CloseableIterator<Tuple> iterate(Expression<?>... args)
Projectablepublic <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
ProjectableRT - generic type of the Iteratorpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectablepublic <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectableprotected void logQuery(String queryString)
protected void reset()
protected String toCountRowsString()
protected String toQueryString()
public Tuple uniqueResult(Expression<?>... args)
ProjectableThere 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)
ProjectableThere is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
RT - return typepublic 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 fetch sizepublic Q setReadOnly(boolean readOnly)
public Q setTimeout(int timeout)
timeout - the timeout in secondsCopyright © 2007–2014 Mysema Ltd. All rights reserved.