接口 HibernateQueryProvider<T>
public interface HibernateQueryProvider<T>
Interface defining the functionality to be provided for generating queries for use with Hibernate
ItemReader
s or other custom built artifacts.- 从以下版本开始:
- 2.1
- 作者:
- Anatoly Polinsky, Dave Syer
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 org.hibernate.query.Query<T>
createQuery()
Create the query object which type will be determined by the underline implementation (e.g.void
setSession(org.hibernate.Session session)
Inject aSession
that can be used as a factory for queries.void
setStatelessSession(org.hibernate.StatelessSession session)
Inject aStatelessSession
that can be used as a factory for queries.
方法详细资料
createQuery
org.hibernate.query.Query<T> createQuery()
Create the query object which type will be determined by the underline implementation (e.g. Hibernate, JPA, etc.)
- 返回:
- created query
setSession
void setSession(org.hibernate.Session session)
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
setStatelessSession(StatelessSession)
- 参数:
session
- theSession
to set
setStatelessSession
void setStatelessSession(org.hibernate.StatelessSession session)
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
setSession(Session)
- 参数:
session
- theStatelessSession
to set