org.springframework.batch.item.database.orm

## Class JpaNamedQueryProvider<E>

- java.lang.Object
- - org.springframework.batch.item.database.orm.AbstractJpaQueryProvider
  - - org.springframework.batch.item.database.orm.JpaNamedQueryProvider<E>

- Type Parameters:
    `E` - entity returned by executing the query
  All Implemented Interfaces:
    JpaQueryProvider, org.springframework.beans.factory.InitializingBean

      public class JpaNamedQueryProvider<E>
      extends AbstractJpaQueryProvider

  This query provider creates JPA named `Query`s.

  Since:
    4.3
  Author:
    Mahmoud Ben Hassine, Parikshit Dutta

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JpaNamedQueryProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `javax.persistence.Query` | `createQuery()` Create the query object.
    `void` | `setEntityClass(java.lang.Class<E> entityClazz)`
    `void` | `setNamedQuery(java.lang.String namedQuery)`

    - ### Methods inherited from class org.springframework.batch.item.database.orm.AbstractJpaQueryProvider

      `getEntityManager, setEntityManager`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JpaNamedQueryProvider

          public JpaNamedQueryProvider()

  - ### Method Detail

    - #### createQuery

          public javax.persistence.Query createQuery()

      Description copied from interface: `JpaQueryProvider`

      Create the query object.

      Returns:
        created query

    - #### setNamedQuery

          public void setNamedQuery(java.lang.String namedQuery)

      Parameters:
        `namedQuery` - name of a jpa named query

    - #### setEntityClass

          public void setEntityClass(java.lang.Class<E> entityClazz)

      Parameters:
        `entityClazz` - name of a jpa entity class

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`