Package org.apache.xmlbeans.samples.enumeration.schemaenum.easypo

Examples of org.apache.xmlbeans.samples.enumeration.schemaenum.easypo.LineItem


        // There don't happen to be any under 10.00, but handle this case anyway.
        LineItem[] items = po.getLineItemArray();
        for (int i = 0; i < items.length; i++)
        {
            LineItem item = items[i];

            if (item.getPrice() < 10.00)
            {

                ItemType newItem = priceZero.addNewItem();
                newItem.setTitle(item.getDescription());
                newItem.xsetQuantity(item.xgetQuantity());
                newItem.setAmount(item.getPrice());

            } else if (item.getPrice() >= 10.00 && item.getPrice() < 20.00)
            {

                ItemType newItem = priceTen.addNewItem();
                newItem.setTitle(item.getDescription());
                newItem.xsetQuantity(item.xgetQuantity());
                newItem.setAmount(item.getPrice());

            } else if (item.getPrice() >= 20.00)
            {

                ItemType newItem = priceTwenty.addNewItem();
                newItem.setTitle(item.getDescription());
                newItem.xsetQuantity(item.xgetQuantity());
                newItem.setAmount(item.getPrice());
            }
        }
        return summaryDoc;
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.samples.enumeration.schemaenum.easypo.LineItem

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.