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
This query provider creates JPA named Query
s.
- Since:
- 4.3
- Author:
- Mahmoud Ben Hassine, Parikshit Dutta
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
jakarta.persistence.Query
Create the query object.void
setEntityClass
(Class<E> entityClazz) void
setNamedQuery
(String namedQuery) Methods inherited from class org.springframework.batch.item.database.orm.AbstractJpaQueryProvider
getEntityManager, setEntityManager
-
Constructor Details
-
JpaNamedQueryProvider
public JpaNamedQueryProvider()
-
-
Method Details
-
createQuery
public jakarta.persistence.Query createQuery()Description copied from interface:JpaQueryProvider
Create the query object.
- Returns:
- created query
-
setNamedQuery
- Parameters:
namedQuery
- name of a jpa named query
-
setEntityClass
- Parameters:
entityClazz
- name of a jpa entity class
-
afterPropertiesSet
- Throws:
Exception
-