Package com.camunda.fox.model.dto

Examples of com.camunda.fox.model.dto.Order


*/
public class OrderToMapProcessor implements Processor {

  @Override
  public void process(Exchange exchange) throws Exception {
    Order order = exchange.getIn().getBody(Order.class);

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("accounttype", order.getAccounttype());
    map.put("city", order.getAddress().getCity());
    map.put("country", order.getAddress().getCountry());
    map.put("number", order.getAddress().getNumber());
    map.put("state", order.getAddress().getState());
    map.put("street", order.getAddress().getStreet());
    map.put("zipcode", order.getAddress().getZipcode());
    map.put("ordernumber", order.getOrdernumber());
    map.put("dateofbirth", order.getPerson().getDateofbirth());
    map.put("email", order.getPerson().getEmail());
    map.put("firstname", order.getPerson().getFirstname());
    map.put("gender", order.getPerson().getGender());
    map.put("lastname", order.getPerson().getLastname());
    map.put("phonenumber", order.getPerson().getPhonenumber());
    map.put("placeofbirth", order.getPerson().getPlaceofbirth());
    map.put("title", order.getPerson().getTitle());

    exchange.getIn().setBody(map);
  }
View Full Code Here


    Address address = new Address((String) map.get("street"),
        (Integer) map.get("number"), (String) map.get("zipcode"),
        (String) map.get("city"), (String) map.get("state"),
        (String) map.get("country"));

    Order order = new Order((String) map.get("ordernumber"), person,
        address, (String) map.get("accounttype"));

    exchange.getIn().setBody(order);
  }
View Full Code Here

    }
    Person person = new Person("John", "Doe", "Mr.", date, "Some Place",
        "male", "123456", "john.doe@somecompany.com");
    Address address = new Address("The Street", 1, "1234", "The City",
        "The State", "The Country");
    Order order = new Order("0001", person, address, "debit");
    return order;
  }
View Full Code Here

    }
    Person person = new Person("John", "Doe", "Mr.", date, "Some Place",
        "male", "123456", "john.doe@somecompany.com");
    Address address = new Address("The Street", 1, "1234", "The City",
        "The State", "The Country");
    Order order = new Order("0001", person, address, "debit");
    return order;
  }
View Full Code Here

    Address address = new Address((String) map.get("street"),
        (Integer) map.get("number"), (String) map.get("zipcode"),
        (String) map.get("city"), (String) map.get("state"),
        (String) map.get("country"));

    Order order = new Order((String) map.get("ordernumber"), person,
        address, (String) map.get("accounttype"));

    return order;
  }
View Full Code Here

TOP

Related Classes of com.camunda.fox.model.dto.Order

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.