Package gov.sandia.jess.example.pricing.model

Examples of gov.sandia.jess.example.pricing.model.Order


        marker = engine.mark();
    }

    private void loadOrderData(int orderNumber) throws JessException {
        // Retrive the order from the database
      Order order = database.getOrder(orderNumber);
       
      if (order != null) {
        // Add the order and its contents to working memory
        engine.add(order);
        engine.add(order.getCustomer());
        engine.addAll(order.getItems());
      }
    }
View Full Code Here


   
    Customer customer = new Customer(6);
    ArrayList orderItems = new ArrayList();
    orderItems.add(new OrderItem("CD Writer", 1234, 199.99f, 1));
    orderItems.add(new OrderItem("AA Batteries", 4323, 4.99f, 2));
    orders.put(new Integer(123), new Order(orderItems, customer));
   
    customer = new Customer(1);
    orderItems = new ArrayList();
    orderItems.add(new OrderItem("Gold-tipped cable", 9876, 19.99f, 4));
    orders.put(new Integer(567), new Order(orderItems, customer));
   
    customer = new Customer(1);
    orderItems = new ArrayList();
    orderItems.add(new OrderItem("Incredibles DVD", 222123, 29.99f, 1));
    orders.put(new Integer(666), new Order(orderItems, customer));
  }
View Full Code Here

TOP

Related Classes of gov.sandia.jess.example.pricing.model.Order

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.