Class HibernateHandler

java.lang.Object
com.querydsl.jpa.HibernateHandler
All Implemented Interfaces:
QueryHandler

public class HibernateHandler extends Object implements QueryHandler
HibernateHandler is the QueryHandler implementation for Hibernate
Author:
tiwe
  • Constructor Details

    • HibernateHandler

      public HibernateHandler()
  • Method Details

    • addEntity

      public void addEntity(javax.persistence.Query query, String alias, Class<?> type)
      Description copied from interface: QueryHandler
      Add the given entity to the given native query
      Specified by:
      addEntity in interface QueryHandler
      Parameters:
      query - query
      alias - alias
      type - type
    • addScalar

      public void addScalar(javax.persistence.Query query, String alias, Class<?> type)
      Description copied from interface: QueryHandler
      Add the given scalar to the given native query
      Specified by:
      addScalar in interface QueryHandler
      Parameters:
      query - query
      alias - alias
      type - type
    • createNativeQueryTyped

      public boolean createNativeQueryTyped()
      Description copied from interface: QueryHandler
      Return whether native queries should be created as typed queries
      Specified by:
      createNativeQueryTyped in interface QueryHandler
      Returns:
      whether native queries should be created as typed queries
    • iterate

      public <T> com.mysema.commons.lang.CloseableIterator<T> iterate(javax.persistence.Query query, FactoryExpression<?> projection)
      Description copied from interface: QueryHandler
      Iterate the results with the optional projection
      Specified by:
      iterate in interface QueryHandler
      Parameters:
      query - query
      Returns:
      iterator
    • stream

      public <T> Stream<T> stream(javax.persistence.Query query, @Nullable @Nullable FactoryExpression<?> projection)
      Description copied from interface: QueryHandler
      Stream the results with the optional projection
      Specified by:
      stream in interface QueryHandler
      Parameters:
      query - query
      Returns:
      stream
    • transform

      public boolean transform(javax.persistence.Query query, FactoryExpression<?> projection)
      Description copied from interface: QueryHandler
      Transform the results of the given query using the given factory expression
      Specified by:
      transform in interface QueryHandler
      Parameters:
      query - query
      projection - projection
      Returns:
      true, if query as been modified
    • wrapEntityProjections

      public boolean wrapEntityProjections()
      Description copied from interface: QueryHandler
      Return whether entity projections need to be wrapped
      Specified by:
      wrapEntityProjections in interface QueryHandler
      Returns:
      whether entity projections need to be wrapped