final List<ProductMarketing> productMarketings = productService.findProductMarketings(currentMarketArea.getId(), searchText);
for (Iterator<ProductMarketing> iterator = productMarketings.iterator(); iterator.hasNext();) {
ProductMarketing productMarketing = (ProductMarketing) iterator.next();
final GlobalSearchViewBean globalSearchViewBean = new GlobalSearchViewBean();
globalSearchViewBean.setValue(productMarketing.getName() + " : " + productMarketing.getCode());
globalSearchViewBean.setType("ProductMarketing");
globalSearchViewBean.setUrl(backofficeUrlService.generateUrl(BoUrls.PRODUCT_MARKETING_DETAILS, requestData, productMarketing));
globalSearchViewBeans.add(globalSearchViewBean);
}
final List<ProductSku> productSkus = productService.findProductSkus(searchText);
for (Iterator<ProductSku> iterator = productSkus.iterator(); iterator.hasNext();) {
ProductSku productSku = (ProductSku) iterator.next();
final GlobalSearchViewBean globalSearchViewBean = new GlobalSearchViewBean();
globalSearchViewBean.setValue(productSku.getName() + " : " + productSku.getCode());
globalSearchViewBean.setType("ProductSku");
globalSearchViewBean.setUrl(backofficeUrlService.generateUrl(BoUrls.PRODUCT_SKU_DETAILS, requestData, productSku));
globalSearchViewBeans.add(globalSearchViewBean);
}
return globalSearchViewBeans;