/** * Function used to fill in the OrderInvestigation.Containers field * <br>While this function doesn't have a return value, it does have a side-effect as it * modifies the OrderInvestigation VO */ private void fillInOrderInvestigationContainers(OrderInvestigationVo orderInvestigation, OrderSpecimenContainerVoCollection containers) { if (orderInvestigation == null || containers == null) return; orderInvestigation.setContainer(new OrderSpecimenContainerVoCollection()); for (OrderSpecimenContainerVo container : containers) { if (container.getOrderInvestigation() != null) { for (OrderInvestigationRefVo investigation : container.getOrderInvestigation()) { if (investigation.equals(orderInvestigation)) orderInvestigation.getContainer().add(container); } } } }