com.mysema.query.jpa.hibernate.sql
Class AbstractHibernateSQLQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>
java.lang.Object
com.mysema.query.support.QueryBase<Q>
com.mysema.query.support.ProjectableQuery<T>
com.mysema.query.jpa.AbstractSQLQuery<Q>
com.mysema.query.jpa.hibernate.sql.AbstractHibernateSQLQuery<Q>
- Type Parameters:
Q -
- All Implemented Interfaces:
- Projectable
- Direct Known Subclasses:
- HibernateSQLQuery
public abstract class AbstractHibernateSQLQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>
- extends AbstractSQLQuery<Q>
AbstractHibernateSQLQuery is the base class for Hibernate Native SQL queries
- Author:
- tiwe
| Methods inherited from class com.mysema.query.jpa.AbstractSQLQuery |
addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, count, exists, from, from, fullJoin, fullJoin, fullJoin, fullJoin, getMetadata, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, on, rightJoin, rightJoin, rightJoin, rightJoin |
| Methods inherited from class com.mysema.query.support.ProjectableQuery |
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, singleResult, transform, uniqueResult, uniqueResult |
| Methods inherited from class com.mysema.query.support.QueryBase |
distinct, equals, groupBy, hashCode, having, limit, offset, orderBy, restrict, set, toString, where |
cacheable
protected Boolean cacheable
readOnly
protected Boolean readOnly
cacheRegion
protected String cacheRegion
fetchSize
protected int fetchSize
templates
protected final SQLTemplates templates
timeout
protected int timeout
union
@Nullable
protected SubQueryExpression<?>[] union
AbstractHibernateSQLQuery
public AbstractHibernateSQLQuery(org.hibernate.Session session,
SQLTemplates sqlTemplates)
AbstractHibernateSQLQuery
public AbstractHibernateSQLQuery(org.hibernate.StatelessSession session,
SQLTemplates sqlTemplates)
AbstractHibernateSQLQuery
public AbstractHibernateSQLQuery(SessionHolder session,
SQLTemplates sqlTemplates,
QueryMetadata metadata)
createQuery
public org.hibernate.Query createQuery(Expression<?>... args)
list
public List<Object[]> list(Expression<?>[] projection)
- Specified by:
list in interface Projectable- Overrides:
list in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>
list
public <RT> List<RT> list(Expression<RT> projection)
- Specified by:
list in interface Projectable- Overrides:
list in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>
iterate
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
iterate
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
listResults
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
logQuery
protected void logQuery(String queryString)
reset
protected void reset()
toCountRowsString
protected String toCountRowsString()
toQueryString
protected String toQueryString()
uniqueResult
public Object[] uniqueResult(Expression<?>[] args)
uniqueResult
public <RT> RT uniqueResult(Expression<RT> expr)
union
public <RT> Union<RT> union(ListSubQuery<RT>... sq)
union
public <RT> Union<RT> union(SubQueryExpression<RT>... sq)
unionAll
public <RT> Union<RT> unionAll(ListSubQuery<RT>... sq)
unionAll
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq)
union
public <RT> Q union(Path<?> alias,
ListSubQuery<RT>... sq)
union
public <RT> Q union(Path<?> alias,
SubQueryExpression<RT>... sq)
unionAll
public <RT> Q unionAll(Path<?> alias,
ListSubQuery<RT>... sq)
unionAll
public <RT> Q unionAll(Path<?> alias,
SubQueryExpression<RT>... sq)
setCacheable
public Q setCacheable(boolean cacheable)
- Enable caching of this query result set.
- Parameters:
cacheable - Should the query results be cacheable?
setCacheRegion
public Q setCacheRegion(String cacheRegion)
- Set the name of the cache region.
- Parameters:
cacheRegion - the name of a query cache region, or null
for the default query cache
setFetchSize
public Q setFetchSize(int fetchSize)
- Set a fetch size for the underlying JDBC query.
- Parameters:
fetchSize - the fetch size
setReadOnly
public 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.
setTimeout
public Q setTimeout(int timeout)
- Set a timeout for the underlying JDBC query.
- Parameters:
timeout - the timeout in seconds
Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.