Class CompositeItemWriterBuilder<T>
- java.lang.Object
- org.springframework.batch.item.support.builder.CompositeItemWriterBuilder<T>
public class CompositeItemWriterBuilder<T> extends java.lang.Object
Creates a fully qualified CompositeItemWriter.- Since:
- 4.0
- Author:
- Glenn Renfro
Constructor Summary
Constructors Constructor Description CompositeItemWriterBuilder()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeItemWriter<T>
build()
Returns a fully constructedCompositeItemWriter
.CompositeItemWriterBuilder<T>
delegates(java.util.List<ItemWriter<? super T>> delegates)
The list of item writers to use as delegates.CompositeItemWriterBuilder<T>
ignoreItemStream(boolean ignoreItemStream)
Establishes the policy whether to call the open, close, or update methods for the item writer delegates associated with the CompositeItemWriter.
Method Detail
ignoreItemStream
public CompositeItemWriterBuilder<T> ignoreItemStream(boolean ignoreItemStream)
Establishes the policy whether to call the open, close, or update methods for the item writer delegates associated with the CompositeItemWriter.- Parameters:
ignoreItemStream
- if false the delegates' open, close, or update methods will be called when the corresponding methods on the CompositeItemWriter are called. If true the delegates' open, close, nor update methods will not be called (default is false).- Returns:
- this instance for method chaining.
- See Also:
CompositeItemWriter.setIgnoreItemStream(boolean)
delegates
public CompositeItemWriterBuilder<T> delegates(java.util.List<ItemWriter<? super T>> delegates)
The list of item writers to use as delegates. Items are written to each of the delegates.- Parameters:
delegates
- the list of delegates to use. The delegates list must not be null nor be empty.- Returns:
- this instance for method chaining.
- See Also:
CompositeItemWriter.setDelegates(List)
build
public CompositeItemWriter<T> build()
Returns a fully constructedCompositeItemWriter
.- Returns:
- a new
CompositeItemWriter