| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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>
Q - public abstract class AbstractHibernateSQLQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>
AbstractHibernateSQLQuery is the base class for Hibernate Native SQL queries
| Field Summary | |
|---|---|
| protected  Boolean | cacheable | 
| protected  String | cacheRegion | 
| protected  int | fetchSize | 
| protected  Boolean | readOnly | 
| protected  SQLTemplates | templates | 
| protected  int | timeout | 
| protected  SubQueryExpression<?>[] | union | 
| Fields inherited from class com.mysema.query.jpa.AbstractSQLQuery | 
|---|
| queryMixin | 
| Constructor Summary | |
|---|---|
| AbstractHibernateSQLQuery(SessionHolder session,
                          SQLTemplates sqlTemplates,
                          QueryMetadata metadata) | |
| AbstractHibernateSQLQuery(org.hibernate.Session session,
                          SQLTemplates sqlTemplates) | |
| AbstractHibernateSQLQuery(org.hibernate.StatelessSession session,
                          SQLTemplates sqlTemplates) | |
| Method Summary | ||
|---|---|---|
|  org.hibernate.Query | createQuery(Expression<?>... args) | |
|  com.mysema.commons.lang.CloseableIterator<Object[]> | iterate(Expression<?>[] args)iterate over the results for the given projection | |
| 
 | iterate(Expression<RT> projection)iterate over the results for the given projection | |
|  List<Object[]> | list(Expression<?>[] projection)list the results for the given projection An empty list is returned for no results. | |
| 
 | list(Expression<RT> projection)list the results for the given projection An empty list is returned for no results. | |
| 
 | 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() | |
| 
 | union(ListSubQuery<RT>... sq) | |
| 
 | union(Path<?> alias,
      ListSubQuery<RT>... sq) | |
| 
 | union(Path<?> alias,
      SubQueryExpression<RT>... sq) | |
| 
 | union(SubQueryExpression<RT>... sq) | |
| 
 | unionAll(ListSubQuery<RT>... sq) | |
| 
 | unionAll(Path<?> alias,
         ListSubQuery<RT>... sq) | |
| 
 | unionAll(Path<?> alias,
         SubQueryExpression<RT>... sq) | |
| 
 | unionAll(SubQueryExpression<RT>... sq) | |
|  Object[] | uniqueResult(Expression<?>[] args)return a unique result for the given projection or null if no result is found | |
| 
 | uniqueResult(Expression<RT> expr)return a unique result for the given projection or null if no result is found | |
| 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 | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected Boolean cacheable
protected Boolean readOnly
protected String cacheRegion
protected int fetchSize
protected final SQLTemplates templates
protected int timeout
@Nullable protected SubQueryExpression<?>[] union
| Constructor Detail | 
|---|
public AbstractHibernateSQLQuery(org.hibernate.Session session,
                                 SQLTemplates sqlTemplates)
public AbstractHibernateSQLQuery(org.hibernate.StatelessSession session,
                                 SQLTemplates sqlTemplates)
public AbstractHibernateSQLQuery(SessionHolder session,
                                 SQLTemplates sqlTemplates,
                                 QueryMetadata metadata)
| Method Detail | 
|---|
public org.hibernate.Query createQuery(Expression<?>... args)
public List<Object[]> list(Expression<?>[] projection)
Projectable
list in interface Projectablelist in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>public <RT> List<RT> list(Expression<RT> projection)
Projectable
list in interface Projectablelist in class ProjectableQuery<Q extends AbstractHibernateSQLQuery<Q> & Query>RT - generic type of the List
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
Projectable
RT - generic type of the Iterator
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectable
protected void logQuery(String queryString)
protected void reset()
protected String toCountRowsString()
protected String toQueryString()
public Object[] 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 type
public <RT> Union<RT> union(ListSubQuery<RT>... sq)
public <RT> Union<RT> union(SubQueryExpression<RT>... sq)
public <RT> Union<RT> unionAll(ListSubQuery<RT>... sq)
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq)
public <RT> Q union(Path<?> alias,
                    ListSubQuery<RT>... sq)
public <RT> Q union(Path<?> alias,
                    SubQueryExpression<RT>... sq)
public <RT> Q unionAll(Path<?> alias,
                       ListSubQuery<RT>... sq)
public <RT> Q unionAll(Path<?> alias,
                       SubQueryExpression<RT>... sq)
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 fetch sizepublic Q setReadOnly(boolean readOnly)
public Q setTimeout(int timeout)
timeout - the timeout in seconds| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||