Package org.hoteia.qalingo.core.web.mvc.form

Examples of org.hoteia.qalingo.core.web.mvc.form.ProductBrandForm


    }
   
    public ProductBrandForm buildProductBrandForm(final RequestData requestData, final ProductBrand productBrand) throws Exception {
        final MarketArea currentMarketArea = requestData.getMarketArea();
       
        final ProductBrandForm productBrandForm = new ProductBrandForm();
        if(productBrand != null){
            productBrandForm.setId(productBrand.getId().toString());
            productBrandForm.setName(productBrand.getName());
            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

TOP

Related Classes of org.hoteia.qalingo.core.web.mvc.form.ProductBrandForm

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.