public class PropertyExtractingDelegatingItemWriter<T> extends AbstractMethodInvokingDelegator<T> implements ItemWriter<T>
ItemWriterAdapterAbstractMethodInvokingDelegator.InvocationTargetThrowableWrapper| Constructor and Description |
|---|
PropertyExtractingDelegatingItemWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
setFieldsUsedAsTargetMethodArguments(java.lang.String[] fieldsUsedAsMethodArguments) |
void |
write(java.util.List<? extends T> items)
Extracts values from item's fields named in
fieldsUsedAsTargetMethodArguments and passes them as arguments to the
delegate method.
|
invokeDelegateMethod, invokeDelegateMethodWithArgument, invokeDelegateMethodWithArguments, setArguments, setTargetMethod, setTargetObjectpublic PropertyExtractingDelegatingItemWriter()
public void write(java.util.List<? extends T> items) throws java.lang.Exception
write in interface ItemWriter<T>java.lang.Exception - if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractMethodInvokingDelegator<T>java.lang.Exceptionpublic void setFieldsUsedAsTargetMethodArguments(java.lang.String[] fieldsUsedAsMethodArguments)
fieldsUsedAsMethodArguments - the values of the these item's fields
will be used as arguments for the delegate method. Nested property values
are supported, e.g. address.city