Package com.querydsl.jpa
Class HibernateHandler
- java.lang.Object
-
- com.querydsl.jpa.HibernateHandler
-
- All Implemented Interfaces:
QueryHandler
public class HibernateHandler extends java.lang.Object implements QueryHandler
HibernateHandleris theQueryHandlerimplementation for Hibernate- Author:
- tiwe
-
-
Constructor Summary
Constructors Constructor Description HibernateHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntity(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)Add the given entity to the given native queryvoidaddScalar(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)Add the given scalar to the given native querybooleancreateNativeQueryTyped()Return whether native queries should be created as typed queries<T> com.mysema.commons.lang.CloseableIterator<T>iterate(jakarta.persistence.Query query, FactoryExpression<?> projection)Iterate the results with the optional projection<T> java.util.stream.Stream<T>stream(jakarta.persistence.Query query, @Nullable FactoryExpression<?> projection)Stream the results with the optional projectionbooleantransform(jakarta.persistence.Query query, FactoryExpression<?> projection)Transform the results of the given query using the given factory expressionbooleanwrapEntityProjections()Return whether entity projections need to be wrapped
-
-
-
Method Detail
-
addEntity
public void addEntity(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)Description copied from interface:QueryHandlerAdd the given entity to the given native query- Specified by:
addEntityin interfaceQueryHandler- Parameters:
query- queryalias- aliastype- type
-
addScalar
public void addScalar(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)Description copied from interface:QueryHandlerAdd the given scalar to the given native query- Specified by:
addScalarin interfaceQueryHandler- Parameters:
query- queryalias- aliastype- type
-
createNativeQueryTyped
public boolean createNativeQueryTyped()
Description copied from interface:QueryHandlerReturn whether native queries should be created as typed queries- Specified by:
createNativeQueryTypedin interfaceQueryHandler- Returns:
- whether native queries should be created as typed queries
-
iterate
public <T> com.mysema.commons.lang.CloseableIterator<T> iterate(jakarta.persistence.Query query, FactoryExpression<?> projection)Description copied from interface:QueryHandlerIterate the results with the optional projection- Specified by:
iteratein interfaceQueryHandler- Parameters:
query- query- Returns:
- iterator
-
stream
public <T> java.util.stream.Stream<T> stream(jakarta.persistence.Query query, @Nullable @Nullable FactoryExpression<?> projection)Description copied from interface:QueryHandlerStream the results with the optional projection- Specified by:
streamin interfaceQueryHandler- Parameters:
query- query- Returns:
- stream
-
transform
public boolean transform(jakarta.persistence.Query query, FactoryExpression<?> projection)Description copied from interface:QueryHandlerTransform the results of the given query using the given factory expression- Specified by:
transformin interfaceQueryHandler- Parameters:
query- queryprojection- projection- Returns:
- true, if query as been modified
-
wrapEntityProjections
public boolean wrapEntityProjections()
Description copied from interface:QueryHandlerReturn whether entity projections need to be wrapped- Specified by:
wrapEntityProjectionsin interfaceQueryHandler- Returns:
- whether entity projections need to be wrapped
-
-