类 AggregateItemFieldSetMapper<T>
- java.lang.Object
- org.springframework.batch.sample.domain.multiline.AggregateItemFieldSetMapper<T>
- 所有已实现的接口:
FieldSetMapper<AggregateItem<T>>,org.springframework.beans.factory.InitializingBean
public class AggregateItemFieldSetMapper<T> extends java.lang.Object implements FieldSetMapper<AggregateItem<T>>, org.springframework.beans.factory.InitializingBean
Delegating mapper to convert form a vanillaFieldSetMapperto one that returnsAggregateIteminstances for consumption by theAggregateItemReader.- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 AggregateItemFieldSetMapper()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()Check mandatory properties (delegate).AggregateItem<T>mapFieldSet(FieldSet fieldSet)Build anAggregateItembased on matching the first column in the inputFieldSetto check for begin and end delimiters.voidsetBegin(java.lang.String begin)Public setter for the begin value.voidsetDelegate(FieldSetMapper<T> delegate)Public setter for the delegate.voidsetEnd(java.lang.String end)Public setter for the end field value.
构造器详细资料
AggregateItemFieldSetMapper
public AggregateItemFieldSetMapper()
方法详细资料
setDelegate
public void setDelegate(FieldSetMapper<T> delegate)
Public setter for the delegate.- 参数:
delegate- the delegate to set
setEnd
public void setEnd(java.lang.String end)
Public setter for the end field value. If theFieldSetinput has a first field with this value that signals the start of an aggregate record.- 参数:
end- the end to set
setBegin
public void setBegin(java.lang.String begin)
Public setter for the begin value. If theFieldSetinput has a first field with this value that signals the end of an aggregate record.- 参数:
begin- the begin to set
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
Check mandatory properties (delegate).- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
java.lang.Exception- 另请参阅:
InitializingBean.afterPropertiesSet()
mapFieldSet
public AggregateItem<T> mapFieldSet(FieldSet fieldSet) throws org.springframework.validation.BindException
Build anAggregateItembased on matching the first column in the inputFieldSetto 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在接口中FieldSetMapper<T>- 参数:
fieldSet- aFieldSetto map- 返回:
- an
AggregateItemthat wraps the return value from the delegate - 抛出:
org.springframework.validation.BindException- if one of the delegates does