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;
}