public static Customer addOrdersFromDB(Customer c) { Customer newCustomer = new Customer(c.getID()); List<Order> orders = orderDAO.retrieveOrders(c); for (Order o : orders) { newCustomer.addOrder(o); } return newCustomer; }
public static List<Order> retrieveUnpaidOrders(Customer customer) { List<Order> orders = orderDAO.retrieveUnpaidOrders(customer.getID()); return orders; }