/** * Adds the given <code>ReportBase</code> to the order history. * * @param inReport a <code>ReportBase</code> value */ private void add(ReportBase inReport) { orderHistory.addFirst(inReport); orderIdChain.add(inReport.getOrderID()); latestReport = inReport; } /**
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("OrderHistory [").append(latestReport == null ? "none" : latestReport.getOrderID()).append("]"); return builder.toString(); } /**
private OrderID getGroupID(ReportBase inReport) { return getGroupID(inReport.getOrderID()); }
/** * Gets the root order ID for the given order ID. * * @param inOrderID an <code>OrderID</code> value * @return an <code>OrderID</code> value or <code>null</code> */ public OrderID getRootOrderIdFor(OrderID inOrderID) { Deque<ReportBase> orders = getReportHistoryFor(inOrderID); if(orders == null || orders.isEmpty()) { return null; } return orders.getLast().getOrderID(); } /**
private void updateOrderIDMappings(ReportBase inReport) { if (inReport.getOrderID() != null && inReport.getOriginalOrderID() != null) { OrderID origOrderID = inReport.getOriginalOrderID(); OrderID orderID = inReport.getOrderID(); OrderID groupID; // first check to see if the orig is in the map, and if so, use // whatever it maps to as the groupID if (mOrderIDToGroupMap.containsKey(origOrderID)){ groupID = getGroupID(origOrderID); } else { // otherwise, do a mapping from clOrdId -> origOrderID groupID = origOrderID; } mOrderIDToGroupMap.put(orderID, groupID); } }
inReport.getOrderID() == null) { Messages.SKIPPNG_MALFORMED_REPORT.warn(this, inReport); inReport); synchronized(orders) { OrderID actualOrderID = inReport.getOrderID(); OrderID originalOrderID = inReport.getOriginalOrderID(); SLF4JLoggerProxy.debug(this, "{} represents an open order ({}), updating live order list for {}", //$NON-NLS-1$ inReport.getOrderID(), inReport.getOrderStatus(), history); openOrders.put(inReport.getOrderID(), (ExecutionReport)inReport); SLF4JLoggerProxy.debug(this, "{} represents a closed order ({}) updating live order list for {}", //$NON-NLS-1$ inReport.getOrderID(), inReport.getOrderStatus(), history); openOrders.remove(inReport.getOrderID()); inReport.getOrderID(), inReport.getOriginalOrderID()); openOrders.remove(inReport.getOriginalOrderID());
ReportHolder reportHolder = reversedHolders[i]; ReportBase report = reportHolder.getReport(); OrderID orderId = report.getOrderID(); if(eReport.getOriginator().forOrders() && eReport.getHierarchy().forOrders() && out.getReport().getOrderID().equals(orderId)) { return reportHolder;
&& inReport.getOrderID() != null) { OrderID id = inReport.getOrderID(); OrderStatus status = inReport.getOrderStatus(); if (Originator.Server == ((ExecutionReport) inReport)
ReportBase report = order.getLatestReport(); if(report != null && !handledOrders.contains(report.getOrderID())) { latestReportTable.addCell(order.getLatestReport().getOrderID().getValue()); latestReportTable.addCell(order.getLatestReport().getOrderStatus().name()); latestReportTable.addCell(DateUtils.dateToString(order.getLatestReport().getSendingTime())); latestReportTable.addCell(report instanceof ExecutionReport ? String.valueOf(((ExecutionReport)report).getPrice()) : none); latestReportTable.addCell(order.getLatestReport().getText()); handledOrders.add(report.getOrderID()); 1); for(ReportBase report : openOrders.values()) { latestReportTable.addCell(report.getOrderID().getValue()); latestReportTable.addCell(report.getOrderStatus().name()); latestReportTable.addCell(DateUtils.dateToString(report.getSendingTime()));