Class ItemWriterAdapter<T>
- java.lang.Object
- org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator<T>
- org.springframework.batch.item.adapter.ItemWriterAdapter<T>
- All Implemented Interfaces:
ItemWriter<T>
,org.springframework.beans.factory.InitializingBean
public class ItemWriterAdapter<T> extends AbstractMethodInvokingDelegator<T> implements ItemWriter<T>
Delegates item processing to a custom method - passes the item as an argument for the delegate method.- Author:
- Robert Kasanicky
- See Also:
PropertyExtractingDelegatingItemWriter
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator
AbstractMethodInvokingDelegator.InvocationTargetThrowableWrapper
Constructor Summary
Constructors Constructor Description ItemWriterAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(java.util.List<? extends T> items)
Process the supplied data element.Methods inherited from class org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator
afterPropertiesSet, getArguments, invokeDelegateMethod, invokeDelegateMethodWithArgument, invokeDelegateMethodWithArguments, setArguments, setTargetMethod, setTargetObject
Method Detail
write
public void write(java.util.List<? extends T> items) 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 interfaceItemWriter<T>
- Parameters:
items
- 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.