Search in sources :

Example 1 with Security

use of org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Security in project camel by apache.

the class BindyComplexCsvMarshallTest method generateModel.

private List<Map<String, Object>> generateModel() {
    Map<String, Object> model = new HashMap<String, Object>();
    Order order = new Order();
    order.setOrderNr(10);
    order.setAmount(new BigDecimal("150"));
    order.setOrderType("BUY");
    order.setInstrumentType("Share");
    order.setCurrency("USD");
    Calendar calendar = new GregorianCalendar();
    calendar.set(2009, 0, 14);
    order.setOrderDate(calendar.getTime());
    Client client = new Client();
    client.setClientNr("A1");
    client.setFirstName("Julia");
    client.setLastName("Roberts");
    order.setClient(client);
    Security security = new Security();
    security.setInstrumentCode("ISIN");
    security.setInstrumentNumber("LU123456789");
    order.setSecurity(security);
    model.put(order.getClass().getName(), order);
    model.put(client.getClass().getName(), client);
    model.put(security.getClass().getName(), security);
    models.add(0, model);
    return models;
}
Also used : Order(org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order) HashMap(java.util.HashMap) GregorianCalendar(java.util.GregorianCalendar) Calendar(java.util.Calendar) GregorianCalendar(java.util.GregorianCalendar) Client(org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client) Security(org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Security) BigDecimal(java.math.BigDecimal)

Aggregations

BigDecimal (java.math.BigDecimal)1 Calendar (java.util.Calendar)1 GregorianCalendar (java.util.GregorianCalendar)1 HashMap (java.util.HashMap)1 Client (org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client)1 Order (org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order)1 Security (org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Security)1