@Override public OrderCancel createOrderCancel(ExecutionReport inLatestReport) { OrderCancelImpl order = new OrderCancelImpl(); assignOrderID(order); if (inLatestReport != null) { order.setAccount(inLatestReport.getAccount()); order.setBrokerID(inLatestReport.getBrokerID()); order.setBrokerOrderID(inLatestReport.getBrokerOrderID()); order.setQuantity(inLatestReport.getOrderQuantity()); order.setSide(inLatestReport.getSide()); order.setInstrument(inLatestReport.getInstrument()); order.setText(inLatestReport.getText()); addCustomFieldsFromReport(inLatestReport, order, SystemFIXMessageFactory.EXECUTION_REPORT_FIELDS); Map<String,String> customFields = order.getCustomFields(); if(customFields != null) { customFields.remove(String.valueOf(quickfix.field.MaxFloor.FIELD)); order.setCustomFields(customFields); } // set this manually after the customFields are copied, so that we take the OrigClOrdId from the report itself, // not from the custom field of the report order.setOriginalOrderID(inLatestReport.getOrderID()); } return order; }
@Override public OrderReplace createOrderReplace(ExecutionReport inLatestReport) { OrderReplaceImpl order = new OrderReplaceImpl(); assignOrderID(order); if (inLatestReport != null) { order.setAccount(inLatestReport.getAccount()); order.setBrokerID(inLatestReport.getBrokerID()); order.setBrokerOrderID(inLatestReport.getBrokerOrderID()); order.setOrderType(inLatestReport.getOrderType()); order.setPrice(inLatestReport.getPrice()); order.setQuantity(inLatestReport.getOrderQuantity()); order.setDisplayQuantity(inLatestReport.getOrderDisplayQuantity()); order.setSide(inLatestReport.getSide()); order.setInstrument(inLatestReport.getInstrument()); order.setTimeInForce(inLatestReport.getTimeInForce()); order.setOrderCapacity(inLatestReport.getOrderCapacity()); order.setPositionEffect(inLatestReport.getPositionEffect()); order.setText(inLatestReport.getText()); addCustomFieldsFromReport(inLatestReport, order, SystemFIXMessageFactory.CANCEL_REPLACE_EXCLUSION_FIELDS); // set this manually after the customFields are copied, so that we take the OrigClOrdId from the report itself, // not from the custom field of the report order.setOriginalOrderID(inLatestReport.getOrderID()); } return order; }