Package org.candlepin.json.model

Examples of org.candlepin.json.model.Order


        return toReturn;
    }

    public Order createOrder(Pool pool) {
        SimpleDateFormat iso8601DateFormat = Util.getUTCDateFormat();
        Order toReturn = new Order();

        toReturn.setNumber(pool.getOrderNumber());
        toReturn.setQuantity(pool.getQuantity());
        toReturn.setStart(iso8601DateFormat.format(pool.getStartDate()));
        toReturn.setEnd(iso8601DateFormat.format(pool.getEndDate()));

        if (pool.getContractNumber() != null &&
            !pool.getContractNumber().trim().equals("")) {
            toReturn.setContract(pool.getContractNumber());
        }

        if (pool.getAccountNumber() != null &&
            !pool.getAccountNumber().trim().equals("")) {
            toReturn.setAccount(pool.getAccountNumber());
        }

        return toReturn;
    }
View Full Code Here

TOP

Related Classes of org.candlepin.json.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.