|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mysema.query.support.QueryBase<Q> com.mysema.query.support.ProjectableQuery<T> com.mysema.query.jpa.AbstractSQLQuery<HibernateSQLQuery> com.mysema.query.jpa.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(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 |
|
|
list(Expression<RT> projection)
list the results for the given projection |
|
|
listResults(Expression<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(Expression<RT> expr)
return a unique result for the given projection or null if not result is found |
Methods inherited from class com.mysema.query.jpa.AbstractSQLQuery |
---|
count, exists, from, from, fullJoin, fullJoin, fullJoin, getMetadata, innerJoin, innerJoin, innerJoin, join, join, join, leftJoin, leftJoin, leftJoin, on, rightJoin, rightJoin, rightJoin |
Methods inherited from class com.mysema.query.support.ProjectableQuery |
---|
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, uniqueResult, uniqueResult |
Methods inherited from class com.mysema.query.support.QueryBase |
---|
distinct, groupBy, having, limit, offset, orderBy, restrict, set, toString, where |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.mysema.query.sql.SQLCommonQuery |
---|
from, from, fullJoin, fullJoin, fullJoin, innerJoin, innerJoin, innerJoin, join, join, join, leftJoin, leftJoin, leftJoin, on, rightJoin, rightJoin, rightJoin |
Methods inherited from interface com.mysema.query.Query |
---|
distinct, groupBy, having, limit, offset, orderBy, restrict, set |
Methods inherited from interface com.mysema.query.FilteredClause |
---|
where |
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(Expression<?>... args)
public List<Object[]> list(Expression<?>[] projection)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<HibernateSQLQuery>
public <RT> List<RT> list(Expression<RT> projection)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<HibernateSQLQuery>
RT
- generic type of the List
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
Projectable
iterate
in interface Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
Projectable
iterate
in interface Projectable
RT
- generic type of the Iterator
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectable
listResults
in interface Projectable
protected void logQuery(String queryString)
protected void reset()
protected String toCountRowsString()
protected String toQueryString()
public <RT> RT uniqueResult(Expression<RT> expr)
Projectable
uniqueResult
in interface Projectable
uniqueResult
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 |