|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.sample.domain.multiline.AggregateItemFieldSetMapper<T>
public class AggregateItemFieldSetMapper<T>
Delegating mapper to convert form a vanilla FieldSetMapper
to one
that returns AggregateItem
instances for consumption by the
AggregateItemReader
.
Constructor Summary | |
---|---|
AggregateItemFieldSetMapper()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregateItemFieldSetMapper()
Method Detail |
---|
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 InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public AggregateItem<T> mapFieldSet(FieldSet fieldSet)
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 map
AggregateItem
that wraps the return value from the
delegate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |