org.springframework.batch.item.support
Class CompositeItemWriter<T>
java.lang.Object
org.springframework.batch.item.support.CompositeItemWriter<T>
- All Implemented Interfaces:
- ItemWriter<T>
public class CompositeItemWriter<T>
- extends Object
- implements ItemWriter<T>
Calls a collection of ItemWriter
s in fixed-order sequence.
The implementation is thread-safe if all delegates are thread-safe.
- Author:
- Robert Kasanicky, Dave Syer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeItemWriter
public CompositeItemWriter()
setDelegates
public void setDelegates(ItemWriter<? super T>[] delegates)
write
public void write(List<? extends T> item)
throws Exception
- Calls injected ItemProcessors in order.
- Specified by:
write
in interface ItemWriter<T>
- 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.