org.springframework.batch.sample.domain.trade.internal
Class CustomerCreditItemWriter

java.lang.Object
  extended by org.springframework.batch.sample.domain.trade.internal.CustomerCreditItemWriter
All Implemented Interfaces:
ItemWriter<CustomerCredit>

public class CustomerCreditItemWriter
extends Object
implements ItemWriter<CustomerCredit>

Delegates actual writing to a custom DAO.

Author:
Robert Kasanicky

Constructor Summary
CustomerCreditItemWriter()
           
 
Method Summary
 void setCustomerCreditDao(CustomerCreditDao customerCreditDao)
          Public setter for the CustomerCreditDao.
 void write(List<? extends CustomerCredit> customerCredits)
          Process the supplied data element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerCreditItemWriter

public CustomerCreditItemWriter()
Method Detail

setCustomerCreditDao

public void setCustomerCreditDao(CustomerCreditDao customerCreditDao)
Public setter for the CustomerCreditDao.

Parameters:
customerCreditDao - the CustomerCreditDao to set

write

public void write(List<? extends CustomerCredit> customerCredits)
           throws Exception
Description copied from interface: ItemWriter
Process the supplied data element. Will not be called with any null items in normal operation.

Specified by:
write in interface ItemWriter<CustomerCredit>
Throws:
Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.


Copyright © 2009 SpringSource. All Rights Reserved.