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

## Class CustomerCreditItemWriter

- java.lang.Object
- - org.springframework.batch.sample.domain.trade.internal.CustomerCreditItemWriter

- All Implemented Interfaces:
    ItemWriter<CustomerCredit>

      public class CustomerCreditItemWriter
      extends java.lang.Object
      implements ItemWriter<CustomerCredit>

  Delegates actual writing to a custom DAO.
  Author:
    Robert Kasanicky

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomerCreditItemWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setCustomerCreditDao(CustomerCreditDao customerCreditDao)` Public setter for the `CustomerCreditDao`.
    `void` | `write(java.util.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(java.util.List<? extends CustomerCredit> customerCredits)
                     throws java.lang.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>`
      Parameters:
        `customerCredits` - items to be written
      Throws:
        `java.lang.Exception` - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.