Class AbstractHibernateQueryProvider<T>
- All Implemented Interfaces:
HibernateQueryProvider<T>
- Direct Known Subclasses:
HibernateNativeQueryProvider
Abstract Hibernate Query Provider to serve as a base class for all Hibernate
Query providers.
The implementing provider can be configured to use either StatelessSession
sufficient for simple mappings without the need to cascade to associated objects or
standard Hibernate Session for more advanced mappings or when caching is
desired.
- Since:
- 2.1
- Author:
- Anatoly Polinsky, Dave Syer, Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.hibernate.SessionDeprecated, for removal: This API element is subject to removal in a future version.protected org.hibernate.StatelessSessionDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.voidsetSession(org.hibernate.Session statefulSession) Deprecated, for removal: This API element is subject to removal in a future version.Inject aSessionthat can be used as a factory for queries.voidsetStatelessSession(org.hibernate.StatelessSession statelessSession) Deprecated, for removal: This API element is subject to removal in a future version.Inject aStatelessSessionthat can be used as a factory for queries.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.batch.item.database.orm.HibernateQueryProvider
createQuery
-
Constructor Details
-
AbstractHibernateQueryProvider
public AbstractHibernateQueryProvider()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setStatelessSession
public void setStatelessSession(org.hibernate.StatelessSession statelessSession) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:HibernateQueryProviderInject a
StatelessSessionthat can be used as a factory for queries. The state of the session is controlled by the caller (i.e. it should be closed if necessary).Use either this method or
HibernateQueryProvider.setSession(Session)- Specified by:
setStatelessSessionin interfaceHibernateQueryProvider<T>- Parameters:
statelessSession- theStatelessSessionto set
-
setSession
public void setSession(org.hibernate.Session statefulSession) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:HibernateQueryProviderInject a
Sessionthat can be used as a factory for queries. The state of the session is controlled by the caller (i.e. it should be closed if necessary).Use either this method or
HibernateQueryProvider.setStatelessSession(StatelessSession)- Specified by:
setSessionin interfaceHibernateQueryProvider<T>- Parameters:
statefulSession- theSessionto set
-
isStatelessSession
public boolean isStatelessSession()Deprecated, for removal: This API element is subject to removal in a future version. -
getStatelessSession
protected org.hibernate.StatelessSession getStatelessSession()Deprecated, for removal: This API element is subject to removal in a future version. -
getStatefulSession
protected org.hibernate.Session getStatefulSession()Deprecated, for removal: This API element is subject to removal in a future version.
-