public class AggregateItemFieldSetMapper<T> extends 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(String begin)
Public setter for the begin value.
|
void |
setDelegate(FieldSetMapper<T> delegate)
Public setter for the delegate.
|
void |
setEnd(String end)
Public setter for the end field value.
|
public void setDelegate(FieldSetMapper<T> delegate)
delegate
- the delegate to setpublic void setEnd(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(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 Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.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 doesCopyright © 2014 Pivotal. All rights reserved.