Package com.querydsl.jpa.hibernate.sql
Class AbstractHibernateSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>
java.lang.Object
com.querydsl.core.support.QueryBase<Q>
com.querydsl.core.support.FetchableQueryBase<T,Q>
com.querydsl.core.support.FetchableSubQueryBase<T,Q>
com.querydsl.sql.ProjectableSQLQuery<T,Q>
com.querydsl.jpa.AbstractSQLQuery<T,Q>
com.querydsl.jpa.hibernate.sql.AbstractHibernateSQLQuery<T,Q>
- Type Parameters:
T- result typeQ- concrete subtype
- All Implemented Interfaces:
Fetchable<T>,FetchableQuery<T,,Q> FilteredClause<Q>,Query<Q>,SimpleQuery<Q>,ExtendedSubQuery<T>,Expression<T>,SubQueryExpression<T>,SQLCommonQuery<Q>,Serializable
- Direct Known Subclasses:
HibernateSQLQuery
public abstract class AbstractHibernateSQLQuery<T,Q extends AbstractHibernateSQLQuery<T,Q>>
extends AbstractSQLQuery<T,Q>
AbstractHibernateSQLQuery is the base class for Hibernate Native SQL queries- Author:
- tiwe
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Booleanprotected Stringprotected intprotected Booleanprotected intFields inherited from class com.querydsl.sql.ProjectableSQLQuery
configuration, firstUnionSubQuery, union, unionAllFields inherited from class com.querydsl.core.support.QueryBase
MDC_PARAMETERS, MDC_QUERY, queryMixin -
Constructor Summary
ConstructorsConstructorDescriptionAbstractHibernateSQLQuery(SessionHolder session, Configuration conf, QueryMetadata metadata) AbstractHibernateSQLQuery(org.hibernate.Session session, Configuration conf) AbstractHibernateSQLQuery(org.hibernate.StatelessSession session, Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionclone()protected abstract Qclone(SessionHolder session) clone(org.hibernate.Session session) clone(org.hibernate.StatelessSession statelessSession) protected voidorg.hibernate.query.Queryprotected SQLSerializerfetch()fetchOne()com.mysema.commons.lang.CloseableIterator<T>iterate()protected voidprotected voidreset()setCacheable(boolean cacheable) Enable caching of this query result set.setCacheRegion(String cacheRegion) Set the name of the cache region.setFetchSize(int fetchSize) Set a fetchJoin size for the underlying JDBC query.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(int timeout) Set a timeout for the underlying JDBC query.stream()Methods inherited from class com.querydsl.jpa.AbstractSQLQuery
extractEntityExpression, isEntityExpressionMethods inherited from class com.querydsl.sql.ProjectableSQLQuery
accept, addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, fetchCount, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, getSQL, getSQL, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toString, union, union, union, unionAll, unionAll, unionAll, with, with, with, withRecursive, withRecursive, withRecursiveMethods inherited from class com.querydsl.core.support.FetchableSubQueryBase
contains, contains, eq, eq, exists, getMetadata, getType, goe, goe, gt, gt, hashCode, in, in, isNotNull, isNull, loe, loe, lt, lt, ne, ne, notExistsMethods inherited from class com.querydsl.core.support.FetchableQueryBase
equals, fetchFirst, transform, uniqueResultMethods inherited from class com.querydsl.core.support.QueryBase
distinct, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, restrict, set, where, whereMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.querydsl.core.Fetchable
fetchFirstMethods inherited from interface com.querydsl.core.FetchableQuery
select, select, transformMethods inherited from interface com.querydsl.core.FilteredClause
where
-
Field Details
-
cacheable
-
readOnly
-
cacheRegion
-
fetchSize
protected int fetchSize -
timeout
protected int timeout
-
-
Constructor Details
-
AbstractHibernateSQLQuery
-
AbstractHibernateSQLQuery
-
AbstractHibernateSQLQuery
-
-
Method Details
-
createQuery
public org.hibernate.query.Query createQuery() -
createSerializer
- Specified by:
createSerializerin classProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T, Q>>
-
fetch
- Specified by:
fetchin interfaceFetchable<T>- Overrides:
fetchin classFetchableQueryBase<T,Q extends AbstractHibernateSQLQuery<T, Q>>
-
iterate
-
stream
-
fetchResults
-
logQuery
-
reset
protected void reset() -
fetchOne
- Specified by:
fetchOnein interfaceFetchable<T>- Overrides:
fetchOnein classProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T, Q>> - Throws:
NonUniqueResultException
-
setCacheable
Enable caching of this query result set.- Parameters:
cacheable- Should the query results be cacheable?
-
setCacheRegion
Set the name of the cache region.- Parameters:
cacheRegion- the name of a query cache region, ornullfor the default query cache
-
setFetchSize
Set a fetchJoin size for the underlying JDBC query.- Parameters:
fetchSize- the fetchJoin size
-
setReadOnly
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
Set a timeout for the underlying JDBC query.- Parameters:
timeout- the timeout in seconds
-
clone
- Overrides:
clonein classProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T, Q>>
-
clone
-
clone
-
clone
-
clone
- Specified by:
clonein classProjectableSQLQuery<T,Q extends AbstractHibernateSQLQuery<T, Q>>
-