类 HibernateAwareCustomerCreditItemWriter
- java.lang.Object
- org.springframework.batch.sample.domain.trade.internal.HibernateAwareCustomerCreditItemWriter
- 所有已实现的接口:
ItemWriter<CustomerCredit>,org.springframework.beans.factory.InitializingBean
public class HibernateAwareCustomerCreditItemWriter extends java.lang.Object implements ItemWriter<CustomerCredit>, org.springframework.beans.factory.InitializingBean
Delegates writing to a custom DAO and flushes + clears hibernate session to fulfill theItemWritercontract.- 作者:
- Robert Kasanicky, Michael Minella
构造器概要
构造器 构造器 说明 HibernateAwareCustomerCreditItemWriter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()voidsetDao(CustomerCreditDao dao)voidsetSessionFactory(org.hibernate.SessionFactory sessionFactory)voidwrite(java.util.List<? extends CustomerCredit> items)Process the supplied data element.
构造器详细资料
HibernateAwareCustomerCreditItemWriter
public HibernateAwareCustomerCreditItemWriter()
方法详细资料
write
public void write(java.util.List<? extends CustomerCredit> items) throws java.lang.Exception
从接口复制的说明:ItemWriterProcess the supplied data element. Will not be called with any null items in normal operation.- 指定者:
write在接口中ItemWriter<CustomerCredit>- 参数:
items- items to be written- 抛出:
java.lang.Exception- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
setDao
public void setDao(CustomerCreditDao dao)
setSessionFactory
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
java.lang.Exception