001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.pub.hl7v2.common.abstraction; 011 012import java.util.List; 013 014import static ca.cdr.api.pub.hl7v2.common.abstraction.VisitMessage.call; 015 016public class OrderMessage implements IOrderMessage { 017 private List<IOrder> myOrders; 018 private IAddCallback<IOrder> myAddOrderCallable; 019 020 @Override 021 public List<IOrder> getOrders() { 022 return myOrders; 023 } 024 025 @Override 026 public IOrder addOrder() { 027 return call(myAddOrderCallable); 028 } 029 030 public void setOrders(List<IOrder> theOrders, IAddCallback<IOrder> theAddOrderCallable) { 031 myOrders = theOrders; 032 myAddOrderCallable = theAddOrderCallable; 033 } 034}