Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.ProductBrandAttribute


            productBrandForm.setCode(productBrand.getCode());
            productBrandForm.setDescription(productBrand.getDescription());
           
            List<ProductBrandAttribute> globalAttributes = productBrand.getGlobalAttributes();
            for (Iterator<ProductBrandAttribute> iterator = globalAttributes.iterator(); iterator.hasNext();) {
                ProductBrandAttribute productBrandAttribute = (ProductBrandAttribute) iterator.next();
                productBrandForm.getGlobalAttributes().put(productBrandAttribute.getAttributeDefinition().getCode(), productBrandAttribute.getValueAsString());
            }
           
            List<ProductBrandAttribute> marketAreaAttributes = productBrand.getMarketAreaAttributes(currentMarketArea.getId());
            for (Iterator<ProductBrandAttribute> iterator = marketAreaAttributes.iterator(); iterator.hasNext();) {
                ProductBrandAttribute productBrandAttribute = (ProductBrandAttribute) iterator.next();
                productBrandForm.getMarketAreaAttributes().put(productBrandAttribute.getAttributeDefinition().getCode(), productBrandAttribute.getValueAsString());
            }
        }
        return productBrandForm;
    }
View Full Code Here


    private ProductBrandAttribute buildProductBrandAttribute(final MarketArea marketArea, final Localization localization, final String attributeKey, final String attributeValue, boolean isGlobal) {

        // TODO : denis : 20130125 : add cache
        AttributeDefinition attributeDefinition = attributeService.getAttributeDefinitionByCode(attributeKey);

        ProductBrandAttribute productBrandAttribute = new ProductBrandAttribute();
        productBrandAttribute.setAttributeDefinition(attributeDefinition);
        productBrandAttribute.setLocalizationCode(localization.getCode());
        productBrandAttribute.setMarketAreaId(marketArea.getId());
        productBrandAttribute.setStartDate(new Date());
        productBrandAttribute.setValue(attributeValue);
        return productBrandAttribute;
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.ProductBrandAttribute

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.