|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.item.database.orm.AbstractHibernateQueryProvider
public abstract class AbstractHibernateQueryProvider
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.
Constructor Summary | |
---|---|
AbstractHibernateQueryProvider()
|
Method Summary | |
---|---|
protected org.hibernate.Session |
getStatefulSession()
|
protected org.hibernate.StatelessSession |
getStatelessSession()
|
boolean |
isStatelessSession()
|
void |
setSession(org.hibernate.Session statefulSession)
Inject a Session that can be used as a factory for queries. |
void |
setStatelessSession(org.hibernate.StatelessSession statelessSession)
Inject a StatelessSession that 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, wait |
Methods inherited from interface org.springframework.batch.item.database.orm.HibernateQueryProvider |
---|
createQuery |
Constructor Detail |
---|
public AbstractHibernateQueryProvider()
Method Detail |
---|
public void setStatelessSession(org.hibernate.StatelessSession statelessSession)
HibernateQueryProvider
Inject a StatelessSession
that 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)
setStatelessSession
in interface HibernateQueryProvider
statelessSession
- the StatelessSession
to setpublic void setSession(org.hibernate.Session statefulSession)
HibernateQueryProvider
Inject a Session
that 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)
setSession
in interface HibernateQueryProvider
statefulSession
- the Session
to setpublic boolean isStatelessSession()
protected org.hibernate.StatelessSession getStatelessSession()
protected org.hibernate.Session getStatefulSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |