public class CompositeItemWriter<T> extends java.lang.Object implements ItemStreamWriter<T>, org.springframework.beans.factory.InitializingBean
コンストラクターと説明 |
---|
CompositeItemWriter() |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
void | close() ストリームの動作にリソースが必要な場合、ここで破棄する必要があります。 |
void | open(ExecutionContext executionContext) 提供された ExecutionContext のストリームを開きます。 |
void | setDelegates(java.util.List<ItemWriter<? super T>> delegates) デリゲートとして使用するアイテムライターのリスト。 |
void | setIgnoreItemStream(boolean ignoreItemStream) CompositeItemWriter に関連付けられたアイテムライターデリゲートの open、close、update メソッドを呼び出すかどうかのポリシーを確立します。 |
void | update(ExecutionContext executionContext) オープン中に提供された実行コンテキストが保存されようとしていることを示します。 |
void | write(java.util.List<? extends T> item) 指定されたデータ要素を処理します。 |
public void setIgnoreItemStream(boolean ignoreItemStream)
ignoreItemStream
- false の場合、CompositeItemWriter の対応するメソッドが呼び出されると、デリゲートの open、close、update メソッドが呼び出されます。true の場合、デリゲートの open、close、update メソッドは呼び出されません(デフォルトは false)。public void write(java.util.List<? extends T> item) throws java.lang.Exception
ItemWriter
ItemWriter<T>
の write
item
- 書かれる項目 java.lang.Exception
- エラーがある場合。フレームワークは例外をキャッチし、必要に応じて変換または再スローします。public void afterPropertiesSet() throws java.lang.Exception
org.springframework.beans.factory.InitializingBean
の afterPropertiesSet
java.lang.Exception
public void setDelegates(java.util.List<ItemWriter<? super T>> delegates)
delegates
- 使用するデリゲートのリスト。デリゲートリストは、null または空であってはなりません。public void close() throws ItemStreamException
ItemStream
ItemStream
の close
ItemStreamException
public void open(ExecutionContext executionContext) throws ItemStreamException
ItemStream
ExecutionContext
のストリームを開きます。ItemStream
の open
executionContext
- 現在のステップの ExecutionContext
再起動時のステップの最後の実行からの executionContext になります。ItemStreamException
public void update(ExecutionContext executionContext) throws ItemStreamException
ItemStream
ItemStream
の update
executionContext
- 更新される ItemStreamException