Examples of OfferingBundleVO


Examples of com.cloud.bridge.model.OfferingBundleVO

        SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.done();
        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
        OfferingBundleVO offering = null;
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            offering = findOneBy(sc);
            if (null == offering) {
                offering = new OfferingBundleVO();
            }
            offering.setAmazonOffering(amazonEC2Offering);
            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);
            txn.commit();
         } finally {
             txn.close();
         }
View Full Code Here

Examples of com.cloud.bridge.model.OfferingBundleVO

        SearchBuilder<OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering(), SearchCriteria.Op.EQ);
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering(), SearchCriteria.Op.EQ);
        searchByAmazon.done();
        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
        OfferingBundleVO offering = null;
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            offering = findOneBy(sc);
            if (null == offering) {
                offering = new OfferingBundleVO();
            }
            offering.setAmazonOffering(amazonEC2Offering);
            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);
            txn.commit();
        } finally {
            txn.close();
        }
View Full Code Here

Examples of com.cloud.bridge.model.OfferingBundleVO

        SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.done();
        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
        OfferingBundleVO offering = null;
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            offering = findOneBy(sc);
            if (null == offering) {
                offering = new OfferingBundleVO();
            }
            offering.setAmazonOffering(amazonEC2Offering);
            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);

            txn.commit();
         } finally {
             txn.close();
         }
View Full Code Here

Examples of com.cloud.bridge.model.OfferingBundleVO

        SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.done();
        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
        OfferingBundleVO offering = null;
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            offering = findOneBy(sc);
            if (null == offering) {
                offering = new OfferingBundleVO();
            }
            offering.setAmazonOffering(amazonEC2Offering);
            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);
            txn.commit();
         } finally {
             txn.close();
         }
View Full Code Here

Examples of com.cloud.bridge.model.OfferingBundleVO

        SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.done();
        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
        OfferingBundleVO offering = null;
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            offering = findOneBy(sc);
            if (null == offering) {
                offering = new OfferingBundleVO();
            }
            offering.setAmazonOffering(amazonEC2Offering);
            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);

            txn.commit();
         } finally {
             txn.close();
         }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.