Package org.springframework.batch.admin.sample.lead

Examples of org.springframework.batch.admin.sample.lead.Client


import org.springframework.batch.item.file.transform.FieldSet;

public class LeadFieldSetMapper implements FieldSetMapper<Lead> {

  public Lead mapFieldSet(FieldSet fieldSet) {
    Lead lead = new Lead(fieldSet.readLong("id"), new Client(fieldSet.readString("client.name"), fieldSet
        .readString("client.country")), new Product(fieldSet.readString("product.name")));
    lead.setAmount(fieldSet.readDouble("amount"));
    lead.setQuery(fieldSet.readString("query"));
    return lead;
  }
View Full Code Here


  public Lead read() throws Exception, UnexpectedInputException, ParseException {
    if (count>=maxCount) {
      return null;
    }
    ++count;
    return new Lead(123L+count, new Client("Client"+count, "UK"), new Product("Foo"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.admin.sample.lead.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.