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.BillingInfo;
5   import org.springframework.batch.sample.domain.order.Order;
6   
7   /**
8    * @author Dan Garrette
9    * @since 2.0.1
10   */
11  public class BillingInfoFieldExtractor implements FieldExtractor<Order> {
12  
13  	public Object[] extract(Order order) {
14  		BillingInfo billingInfo = order.getBilling();
15  		return new Object[] { "BILLING:", billingInfo.getPaymentId(), billingInfo.getPaymentDesc() };
16  	}
17  
18  }