public class AggregateItemFieldSetMapper<T> extends java.lang.Object implements FieldSetMapper<AggregateItem<T>>, org.springframework.beans.factory.InitializingBean
FieldSetMapper to one
that returns AggregateItem instances for consumption by the
AggregateItemReader.| Constructor and Description |
|---|
AggregateItemFieldSetMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Check mandatory properties (delegate).
|
AggregateItem<T> |
mapFieldSet(FieldSet fieldSet)
Build an
AggregateItem based on matching the first column in the
input FieldSet to check for begin and end delimiters. |
void |
setBegin(java.lang.String begin)
Public setter for the begin value.
|
void |
setDelegate(FieldSetMapper<T> delegate)
Public setter for the delegate.
|
void |
setEnd(java.lang.String end)
Public setter for the end field value.
|
public void setDelegate(FieldSetMapper<T> delegate)
delegate - the delegate to setpublic void setEnd(java.lang.String end)
FieldSet input has
a first field with this value that signals the start of an aggregate
record.end - the end to setpublic void setBegin(java.lang.String begin)
FieldSet input has a
first field with this value that signals the end of an aggregate record.begin - the begin to setpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.ExceptionInitializingBean.afterPropertiesSet()public AggregateItem<T> mapFieldSet(FieldSet fieldSet) throws org.springframework.validation.BindException
AggregateItem based on matching the first column in the
input FieldSet to check for begin and end delimiters. If the
current record is neither a begin nor an end marker then it is mapped
using the delegate.mapFieldSet in interface FieldSetMapper<AggregateItem<T>>fieldSet - a FieldSet to mapAggregateItem that wraps the return value from the
delegateorg.springframework.validation.BindException - if one of the delegates does