Examples of ProductMarketingForm


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

    }
   
    public ProductMarketingForm buildProductMarketingForm(final RequestData requestData, final ProductMarketing productMarketing) throws Exception {
        final MarketArea currentMarketArea = requestData.getMarketArea();
       
        final ProductMarketingForm productMarketingForm = new ProductMarketingForm();
        if(productMarketing != null){
            productMarketingForm.setId(productMarketing.getId().toString());
            productMarketingForm.setName(productMarketing.getName());
            productMarketingForm.setCode(productMarketing.getCode());
            productMarketingForm.setDescription(productMarketing.getDescription());
           
            List<ProductMarketingAttribute> globalAttributes = productMarketing.getGlobalAttributes();
            for (Iterator<ProductMarketingAttribute> iterator = globalAttributes.iterator(); iterator.hasNext();) {
                ProductMarketingAttribute productMarketingAttribute = (ProductMarketingAttribute) iterator.next();
                productMarketingForm.getGlobalAttributes().put(productMarketingAttribute.getAttributeDefinition().getCode(), productMarketingAttribute.getValueAsString());
            }
           
            List<ProductMarketingAttribute> marketAreaAttributes = productMarketing.getMarketAreaAttributes(currentMarketArea.getId());
            for (Iterator<ProductMarketingAttribute> iterator = marketAreaAttributes.iterator(); iterator.hasNext();) {
                ProductMarketingAttribute productMarketingAttribute = (ProductMarketingAttribute) iterator.next();
                productMarketingForm.getMarketAreaAttributes().put(productMarketingAttribute.getAttributeDefinition().getCode(), productMarketingAttribute.getValueAsString());
            }
        }
        return productMarketingForm;
    }
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.