Class CompositeItemWriterBuilder<T>
java.lang.Object
org.springframework.batch.item.support.builder.CompositeItemWriterBuilder<T>
Creates a fully qualified CompositeItemWriter.
- Since:
- 4.0
- Author:
- Glenn Renfro, Drummond Dawson, Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a fully constructedCompositeItemWriter
.delegates
(List<ItemWriter<? super T>> delegates) The list of item writers to use as delegates.final CompositeItemWriterBuilder<T>
delegates
(ItemWriter<? super T>... delegates) The item writers to use as delegates.ignoreItemStream
(boolean ignoreItemStream) Establishes the policy whether to call the open, close, or update methods for the item writer delegates associated with the CompositeItemWriter.
-
Constructor Details
-
CompositeItemWriterBuilder
public CompositeItemWriterBuilder()
-
-
Method Details
-
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:
-
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:
-
delegates
@SafeVarargs public final CompositeItemWriterBuilder<T> delegates(ItemWriter<? super T>... delegates) The item writers to use as delegates. Items are written to each of the delegates.- Parameters:
delegates
- the delegates to use.- Returns:
- this instance for method chaining.
- See Also:
-
build
Returns a fully constructedCompositeItemWriter
.- Returns:
- a new
CompositeItemWriter
-