|
||||||||||
| 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.hql.AbstractSQLQuery<HibernateSQLQuery>
com.mysema.query.hql.hibernate.sql.HibernateSQLQuery
public final class HibernateSQLQuery
HibernateSQLQuery is an SQLQuery implementation that uses Hibernate's Native SQL functionality to execute queries
| Field Summary |
|---|
| Fields inherited from class com.mysema.query.support.QueryBase |
|---|
queryMixin |
| Constructor Summary | |
|---|---|
protected |
HibernateSQLQuery(SessionHolder session,
SQLTemplates sqlTemplates,
QueryMetadata metadata)
|
|
HibernateSQLQuery(org.hibernate.Session session,
SQLTemplates sqlTemplates)
|
|
HibernateSQLQuery(org.hibernate.StatelessSession session,
SQLTemplates sqlTemplates)
|
| Method Summary | ||
|---|---|---|
HibernateSQLQuery |
clone(org.hibernate.Session session)
|
|
org.hibernate.Query |
createQuery(Expr<?>... args)
|
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterate(Expr<?>[] args)
iterate over the results for the given projection |
|
|
iterate(Expr<RT> projection)
iterate over the results for the given projection |
|
List<Object[]> |
list(Expr<?>[] projection)
list the results for the given projection |
|
|
list(Expr<RT> projection)
list the results for the given projection |
|
|
listResults(Expr<RT> projection)
list the results for the given projection |
|
protected void |
logQuery(String queryString)
|
|
protected void |
reset()
|
|
HibernateSQLQuery |
setCacheable(boolean cacheable)
Enable caching of this query result set. |
|
HibernateSQLQuery |
setCacheRegion(String cacheRegion)
Set the name of the cache region. |
|
HibernateSQLQuery |
setFetchSize(int fetchSize)
Set a fetch size for the underlying JDBC query. |
|
HibernateSQLQuery |
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. |
|
HibernateSQLQuery |
setTimeout(int timeout)
Set a timeout for the underlying JDBC query. |
|
protected String |
toCountRowsString()
|
|
protected String |
toQueryString()
|
|
|
uniqueResult(Expr<RT> expr)
return a unique result for the given projection |
|
| Methods inherited from class com.mysema.query.hql.AbstractSQLQuery |
|---|
count, from, fullJoin, getMetadata, innerJoin, join, leftJoin, on |
| Methods inherited from class com.mysema.query.support.ProjectableQuery |
|---|
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, uniqueResult, uniqueResult |
| Methods inherited from class com.mysema.query.support.QueryBase |
|---|
groupBy, having, limit, offset, orderBy, restrict, toString, where |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateSQLQuery(org.hibernate.Session session,
SQLTemplates sqlTemplates)
protected HibernateSQLQuery(SessionHolder session,
SQLTemplates sqlTemplates,
QueryMetadata metadata)
public HibernateSQLQuery(org.hibernate.StatelessSession session,
SQLTemplates sqlTemplates)
| Method Detail |
|---|
public HibernateSQLQuery clone(org.hibernate.Session session)
public org.hibernate.Query createQuery(Expr<?>... args)
public List<Object[]> list(Expr<?>[] projection)
Projectable
list in interface Projectablelist in class ProjectableQuery<HibernateSQLQuery>public <RT> List<RT> list(Expr<RT> projection)
Projectable
list in interface Projectablelist in class ProjectableQuery<HibernateSQLQuery>RT - generic type of the List
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expr<?>[] args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expr<RT> projection)
Projectable
RT - generic type of the Iteratpr
public <RT> SearchResults<RT> listResults(Expr<RT> projection)
Projectable
protected void logQuery(String queryString)
protected void reset()
protected String toCountRowsString()
protected String toQueryString()
public <RT> RT uniqueResult(Expr<RT> expr)
Projectable
uniqueResult in interface ProjectableuniqueResult in class ProjectableQuery<HibernateSQLQuery>RT - return type
public HibernateSQLQuery setCacheable(boolean cacheable)
cacheable - Should the query results be cacheable?public HibernateSQLQuery setCacheRegion(String cacheRegion)
cacheRegion - the name of a query cache region, or null
for the default query cachepublic HibernateSQLQuery setFetchSize(int fetchSize)
fetchSize - the fetch sizepublic HibernateSQLQuery setReadOnly(boolean readOnly)
public HibernateSQLQuery setTimeout(int timeout)
timeout - the timeout in seconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||