View Javadoc

1   package org.springframework.batch.sample.domain.order.internal.extractor;
2   
3   import org.springframework.batch.item.file.transform.FieldExtractor;
4   import org.springframework.batch.sample.domain.order.LineItem;
5   
6   /**
7    * @author Dan Garrette
8    * @since 2.0.1
9    */
10  public class LineItemFieldExtractor implements FieldExtractor<LineItem> {
11  
12  	public Object[] extract(LineItem item) {
13  		return new Object[] { "ITEM:", item.getItemId(), item.getPrice() };
14  	}
15  
16  }