Interface QueryHandler

All Known Implementing Classes:
DefaultQueryHandler, HibernateHandler

public interface QueryHandler
QueryHandler provides injection of provider specific functionality into the query logic
Author:
tiwe
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEntity(javax.persistence.Query query, String alias, Class<?> type)
    Add the given entity to the given native query
    void
    addScalar(javax.persistence.Query query, String alias, Class<?> type)
    Add the given scalar to the given native query
    boolean
    Return whether native queries should be created as typed queries
    <T> com.mysema.commons.lang.CloseableIterator<T>
    iterate(javax.persistence.Query query, @Nullable FactoryExpression<?> projection)
    Iterate the results with the optional projection
    <T> Stream<T>
    stream(javax.persistence.Query query, @Nullable FactoryExpression<?> projection)
    Stream the results with the optional projection
    boolean
    transform(javax.persistence.Query query, FactoryExpression<?> projection)
    Transform the results of the given query using the given factory expression
    boolean
    Return whether entity projections need to be wrapped
  • Method Details

    • createNativeQueryTyped

      boolean createNativeQueryTyped()
      Return whether native queries should be created as typed queries
      Returns:
      whether native queries should be created as typed queries
    • iterate

      <T> com.mysema.commons.lang.CloseableIterator<T> iterate(javax.persistence.Query query, @Nullable @Nullable FactoryExpression<?> projection)
      Iterate the results with the optional projection
      Parameters:
      query - query
      Returns:
      iterator
    • stream

      <T> Stream<T> stream(javax.persistence.Query query, @Nullable @Nullable FactoryExpression<?> projection)
      Stream the results with the optional projection
      Parameters:
      query - query
      Returns:
      stream
    • addScalar

      void addScalar(javax.persistence.Query query, String alias, Class<?> type)
      Add the given scalar to the given native query
      Parameters:
      query - query
      alias - alias
      type - type
    • addEntity

      void addEntity(javax.persistence.Query query, String alias, Class<?> type)
      Add the given entity to the given native query
      Parameters:
      query - query
      alias - alias
      type - type
    • transform

      boolean transform(javax.persistence.Query query, FactoryExpression<?> projection)
      Transform the results of the given query using the given factory expression
      Parameters:
      query - query
      projection - projection
      Returns:
      true, if query as been modified
    • wrapEntityProjections

      boolean wrapEntityProjections()
      Return whether entity projections need to be wrapped
      Returns:
      whether entity projections need to be wrapped