use of java.util.HashMap in project camel by apache.
the class BindySimpleCsvMarshallDslTest method generateModel.
public List<Map<String, Object>> generateModel() {
Map<String, Object> modelObjects = new HashMap<String, Object>();
Order order = new Order();
order.setOrderNr(1);
order.setOrderType("BUY");
order.setClientNr("B2");
order.setFirstName("Keira");
order.setLastName("Knightley");
order.setAmount(new BigDecimal("450.45").setScale(2));
order.setInstrumentCode("ISIN");
order.setInstrumentNumber("XX23456789");
order.setInstrumentType("Share");
order.setCurrency("EUR");
Calendar calendar = new GregorianCalendar();
calendar.set(2009, 0, 14);
order.setOrderDate(calendar.getTime());
calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
// 4 hour shift
// 17-05-2010 23:21:59 by GMT+4
calendar.set(2010, 4, 17, 19, 21, 59);
order.setOrderDateTime(calendar.getTime());
modelObjects.put(order.getClass().getName(), order);
models.add(modelObjects);
return models;
}
use of java.util.HashMap in project camel by apache.
the class BindySimpleCsvMarshallTest method generateModel.
public List<Map<String, Object>> generateModel() {
Map<String, Object> modelObjects = new HashMap<String, Object>();
Order order = new Order();
order.setOrderNr(1);
order.setOrderType("BUY");
order.setClientNr("B2");
order.setFirstName("Keira");
order.setLastName("Knightley");
order.setAmount(new BigDecimal("400.25"));
order.setInstrumentCode("ISIN");
order.setInstrumentNumber("XX23456789");
order.setInstrumentType("Share");
order.setCurrency("EUR");
Calendar calendar = new GregorianCalendar();
calendar.set(2009, 0, 14);
order.setOrderDate(calendar.getTime());
calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
// 4 hour shift
// 17-02-2011 23:21:59 by GMT+4
calendar.set(2011, 1, 17, 19, 21, 59);
order.setOrderDateTime(calendar.getTime());
modelObjects.put(order.getClass().getName(), order);
models.add(modelObjects);
return models;
}
use of java.util.HashMap in project camel by apache.
the class BindySimpleFixedLengthMarshallTest method generateModel.
public List<Map<String, Object>> generateModel() {
Map<String, Object> modelObjects = new HashMap<String, Object>();
Order order = new Order();
order.setOrderNr(10);
order.setOrderType("BUY");
order.setClientNr("A9");
order.setFirstName("Pauline");
order.setLastName("M");
order.setAmount(new BigDecimal("2500.45"));
order.setInstrumentCode("ISIN");
order.setInstrumentNumber("XD12345678");
order.setInstrumentType("Share");
order.setCurrency("USD");
Calendar calendar = new GregorianCalendar();
calendar.set(2009, 7, 1);
order.setOrderDate(calendar.getTime());
modelObjects.put(order.getClass().getName(), order);
models.add(modelObjects);
return models;
}
use of java.util.HashMap in project camel by apache.
the class BindySimpleFixedLengthMarshallWithNoClipTest method generateModel.
public List<Map<String, Object>> generateModel() {
Map<String, Object> modelObjects = new HashMap<String, Object>();
Order order = new Order();
order.setOrderNr(10);
order.setOrderType("BUY");
order.setClientNr("A98");
order.setFirstName("Madame de Sol");
order.setLastName("M");
order.setAmount(new BigDecimal("2500.45"));
order.setInstrumentCode("ISIN");
order.setInstrumentNumber("XD12345678");
order.setInstrumentType("Share");
order.setCurrency("USD");
Calendar calendar = new GregorianCalendar();
calendar.set(2009, 7, 1);
order.setOrderDate(calendar.getTime());
modelObjects.put(order.getClass().getName(), order);
models.add(modelObjects);
return models;
}
use of java.util.HashMap in project camel by apache.
the class BindyFixedLengthHeaderFooterSkipHeaderTest method createHeaderRow.
private Map<String, Object> createHeaderRow() {
Map<String, Object> headerMap = new HashMap<String, Object>();
OrderHeader header = new OrderHeader();
Calendar calendar = new GregorianCalendar();
calendar.set(2009, 7, 1);
header.setRecordDate(calendar.getTime());
headerMap.put(OrderHeader.class.getName(), header);
return headerMap;
}
Aggregations