/** * Adds a new order to the existing list of orders. * The <tt>sortWeight</tt> for the order is auto calculated based on the given position. * * @param order the new order to be added * @param position the position where the order has to be added */ public void addOrder(Order order, Integer position) { if (order == null || getOrders().contains(order)) { return; } order.setOrderGroup(this); Integer listIndex = findListIndexForGivenPosition(position); getOrders().add(listIndex, order); if (order.getSortWeight() == null) { order.setSortWeight(findSortWeight(listIndex)); } }
target.setOrderReasonNonCoded(getOrderReasonNonCoded()); target.setOrderGroup(getOrderGroup()); target.setSortWeight(getSortWeight()); target.setFulfillerStatus(getFulfillerStatus()); target.setFulfillerComment(getFulfillerComment());
target.setScheduledDate(getScheduledDate()); target.setOrderGroup(getOrderGroup()); target.setSortWeight(getSortWeight()); target.setFulfillerComment(getFulfillerComment()); target.setFulfillerStatus(getFulfillerStatus());