List of usage examples for org.springframework.batch.sample.domain.multiline AggregateItem isFooter
public boolean isFooter()
From source file:org.springframework.batch.sample.domain.multiline.AggregateItemReader.java
private boolean process(AggregateItem<T> value, ResultHolder holder) { // finish processing if we hit the end of file if (value == null) { LOG.debug("Exhausted ItemReader"); holder.setExhausted(true);//from w w w. j a v a2s .c o m return false; } // start a new collection if (value.isHeader()) { LOG.debug("Start of new record detected"); return true; } // mark we are finished with current collection if (value.isFooter()) { LOG.debug("End of record detected"); return false; } // add a simple record to the current collection LOG.debug("Mapping: " + value); holder.addRecord(value.getItem()); return true; }