类 AggregateItem<T>
- java.lang.Object
- org.springframework.batch.sample.domain.multiline.AggregateItem<T>
public class AggregateItem<T> extends java.lang.Object
A wrapper type for an item that is used byAggregateItemReader
to identify the start and end of an aggregate record.- 作者:
- Dave Syer
- 另请参阅:
AggregateItemReader
构造器概要
构造器 构造器 说明 AggregateItem(boolean header, boolean footer)
AggregateItem(T item)
构造器详细资料
AggregateItem
public AggregateItem(T item)
- 参数:
item
- the item to wrap
AggregateItem
public AggregateItem(boolean header, boolean footer)
方法详细资料
getFooter
public static <T> AggregateItem<T> getFooter()
- 类型参数:
T
- the type of item nominally wrapped- 返回:
- a static
AggregateItem
that is a footer.
getHeader
public static <T> AggregateItem<T> getHeader()
- 类型参数:
T
- the type of item nominally wrapped- 返回:
- a static
AggregateItem
that is a header.
getItem
public T getItem()
Accessor for the wrapped item.- 返回:
- the wrapped item
- 抛出:
java.lang.IllegalStateException
- if called on a record for which eitherisHeader()
orisFooter()
answers true.
isFooter
public boolean isFooter()
Responds true if this record is a footer in an aggregate.- 返回:
- true if this is the end of an aggregate record.
isHeader
public boolean isHeader()
Responds true if this record is a header in an aggregate.- 返回:
- true if this is the beginning of an aggregate record.