Class HibernateNativeQueryProvider<E>

java.lang.Object
org.springframework.batch.item.database.orm.AbstractHibernateQueryProvider<E>
org.springframework.batch.item.database.orm.HibernateNativeQueryProvider<E>
Type Parameters:
E - entity returned by executing the query
All Implemented Interfaces:
HibernateQueryProvider<E>

@Deprecated(since="5.0", forRemoval=true) public class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider<E>
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.0 for removal in 5.2. Use the JpaNativeQueryProvider instead.

This query provider creates Hibernate Querys from injected native SQL queries. This is useful if there is a need to utilize database-specific features such as query hints, the CONNECT keyword in Oracle, etc.

Author:
Anatoly Polinsky, Mahmoud Ben Hassine
  • Constructor Details

    • HibernateNativeQueryProvider

      public HibernateNativeQueryProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • createQuery

      public org.hibernate.query.NativeQuery<E> createQuery()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Create an NativeQuery from the session provided (preferring stateless if both are available).

      Returns:
      created query
    • setSqlQuery

      public void setSqlQuery(String sqlQuery)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setEntityClass

      public void setEntityClass(Class<E> entityClazz)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception