Class JpaNativeQueryProvider<E>
java.lang.Object
org.springframework.batch.item.database.orm.AbstractJpaQueryProvider
org.springframework.batch.item.database.orm.JpaNativeQueryProvider<E>
- Type Parameters:
E
- entity returned by executing the query
- All Implemented Interfaces:
JpaQueryProvider
,org.springframework.beans.factory.InitializingBean
This query provider creates JPA Query
s 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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
jakarta.persistence.Query
Create the query object.void
setEntityClass
(Class<E> entityClazz) void
setSqlQuery
(String sqlQuery) Methods inherited from class org.springframework.batch.item.database.orm.AbstractJpaQueryProvider
getEntityManager, setEntityManager
-
Constructor Details
-
JpaNativeQueryProvider
public JpaNativeQueryProvider()
-
-
Method Details
-
createQuery
public jakarta.persistence.Query createQuery()Description copied from interface:JpaQueryProvider
Create the query object.
- Returns:
- created query
-
setSqlQuery
-
setEntityClass
-
afterPropertiesSet
- Throws:
Exception
-