Class AbstractJpaQueryProvider

java.lang.Object
org.springframework.batch.item.database.orm.AbstractJpaQueryProvider
All Implemented Interfaces:
JpaQueryProvider, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
JpaNamedQueryProvider, JpaNativeQueryProvider

public abstract class AbstractJpaQueryProvider extends Object implements JpaQueryProvider, org.springframework.beans.factory.InitializingBean

Abstract JPA Query Provider to serve as a base class for all JPA Query providers.

Since:
2.1
Author:
Anatoly Polinsky, Dave Syer, Mahmoud Ben Hassine
  • Constructor Details

    • AbstractJpaQueryProvider

      public AbstractJpaQueryProvider()
  • Method Details

    • setEntityManager

      public void setEntityManager(jakarta.persistence.EntityManager entityManager)

      Public setter to override the entityManager that was created by this JpaQueryProvider. This is currently needed to allow JpaQueryProvider to participate in a user's managed transaction.

      Specified by:
      setEntityManager in interface JpaQueryProvider
      Parameters:
      entityManager - EntityManager to use
    • getEntityManager

      protected jakarta.persistence.EntityManager getEntityManager()

      Getter for EntityManager

      Returns:
      entityManager the injected EntityManager