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.
This query provider creates Hibernate 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
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated, for removal: This API element is subject to removal in a future version.org.hibernate.query.NativeQuery<E>
Deprecated, for removal: This API element is subject to removal in a future version.Create anNativeQuery
from the session provided (preferring stateless if both are available).void
setEntityClass
(Class<E> entityClazz) Deprecated, for removal: This API element is subject to removal in a future version.void
setSqlQuery
(String sqlQuery) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.springframework.batch.item.database.orm.AbstractHibernateQueryProvider
getStatefulSession, getStatelessSession, isStatelessSession, setSession, setStatelessSession
-
Constructor Details
-
HibernateNativeQueryProvider
public HibernateNativeQueryProvider()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
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
Deprecated, for removal: This API element is subject to removal in a future version. -
setEntityClass
Deprecated, for removal: This API element is subject to removal in a future version. -
afterPropertiesSet
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
Exception
-
JpaNativeQueryProvider
instead.