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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addEntity​(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)
      Add the given entity to the given native query
      void addScalar​(jakarta.persistence.Query query, java.lang.String alias, java.lang.Class<?> type)
      Add the given scalar to the given native query
      boolean createNativeQueryTyped()
      Return whether native queries should be created as typed queries
      <T> com.mysema.commons.lang.CloseableIterator<T> iterate​(jakarta.persistence.Query query, @Nullable 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 projection
      boolean transform​(jakarta.persistence.Query query, FactoryExpression<?> projection)
      Transform the results of the given query using the given factory expression
      boolean wrapEntityProjections()
      Return whether entity projections need to be wrapped
    • Method Detail

      • 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​(jakarta.persistence.Query query,
                                                                 @Nullable
                                                                 @Nullable FactoryExpression<?> projection)
        Iterate the results with the optional projection
        Parameters:
        query - query
        Returns:
        iterator
      • stream

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

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

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

        boolean transform​(jakarta.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