Package org.candlepin.model

Examples of org.candlepin.model.ProductPoolAttribute


        p.setSourceSubscription(
            new SourceSubscription("testsub" + TestUtil.randomInt(), "master"));
        p.setStartDate(startDate);
        p.setEndDate(endDate);
        for (ProductAttribute pa : product.getAttributes()) {
            p.addProductAttribute(new ProductPoolAttribute(pa.getName(),
                pa.getValue(), product.getId()));
        }
        return p;
    }
View Full Code Here


        // Build a set of what we would expect and compare them to the current:
        Set<ProductPoolAttribute> currentAttrs = pool.getProductAttributes();
        Set<ProductPoolAttribute> incomingAttrs = new HashSet<ProductPoolAttribute>();
        if (product != null) {
            for (Attribute attr : product.getAttributes()) {
                ProductPoolAttribute newAttr = new ProductPoolAttribute(attr.getName(),
                    attr.getValue(), product.getId());
                newAttr.setPool(pool);
                incomingAttrs.add(newAttr);
            }
        }

        if (!currentAttrs.equals(incomingAttrs)) {
View Full Code Here

    private void accumulateProductAttributes(Pool stackedSubPool, Pool nextStackedPool) {

        if (nextStackedPool.getDerivedProductId() == null) {
            for (ProductPoolAttribute attr : nextStackedPool.getProductAttributes()) {
                expectedAttrs.put(attr.getName(),
                    new ProductPoolAttribute(attr.getName(), attr.getValue(),
                        stackedSubPool.getProductId()));
            }
        }
        else {
            for (DerivedProductPoolAttribute attr :
                nextStackedPool.getDerivedProductAttributes()) {
                expectedAttrs.put(attr.getName(),
                    new ProductPoolAttribute(attr.getName(), attr.getValue(),
                        stackedSubPool.getProductId()));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.candlepin.model.ProductPoolAttribute

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.