Examples of CatalogCategoryVirtual


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

        criteria.add(Restrictions.eq("categoryMaster.code", handleCodeValue(catalogCategoryCode)));

        criteria.createAlias("categoryMaster.catalog", "catalogMaster", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.eq("catalogMaster.code", handleCodeValue(catalogMasterCode)));
       
        CatalogCategoryVirtual catalogCategory = (CatalogCategoryVirtual) criteria.uniqueResult();
        if(catalogCategory != null){
            catalogCategory.setFetchPlan(fetchPlan);
        }
        return catalogCategory;
    }
View Full Code Here

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

    catalogCategory.setDateUpdate(new Date());
        if (catalogCategory.getId() != null) {
            if(em.contains(catalogCategory)){
                em.refresh(catalogCategory);
            }
            CatalogCategoryVirtual mergedCatalogCategoryVirtual = em.merge(catalogCategory);
            em.flush();
            return mergedCatalogCategoryVirtual;
        } else {
            em.persist(catalogCategory);
            return catalogCategory;
View Full Code Here

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

  public ModelAndView productLine(final HttpServletRequest request, final Model model, @PathVariable(RequestConstants.URL_PATTERN_CATEGORY_CODE) final String categoryCode) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CATEGORY_AS_LINE.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Cart currentCart = requestData.getCart();
       
    final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(categoryCode, requestData.getVirtualCatalogCode(), requestData.getMasterCatalogCode(), new FetchPlan(categoryVirtualFetchPlans));
   
    if(catalogCategory != null){
        final CatalogCategoryViewBean catalogCategoryViewBean = frontofficeViewBeanFactory.buildViewBeanVirtualCatalogCategory(requestUtil.getRequestData(request), catalogCategory,
                                                                                           new FetchPlan(categoryVirtualFetchPlans), new FetchPlan(productMarketingFetchPlans), new FetchPlan(productSkuFetchPlans));
   
View Full Code Here

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

        CatalogVirtual catalogVirtual = catalogService.getVirtualCatalogbyMarketAreaId(marketArea.getId());
        if (catalogVirtual != null) {
            final List<CatalogCategoryVirtual> catalogCategories = catalogVirtual.getSortedRootCatalogCategories();
            if (catalogCategories != null) {
                for (Iterator<CatalogCategoryVirtual> iteratorCatalogCategory = catalogCategories.iterator(); iteratorCatalogCategory.hasNext();) {
                    final CatalogCategoryVirtual catalogCategory = (CatalogCategoryVirtual) iteratorCatalogCategory.next();
                    final CatalogCategoryVirtual catalogCategoryReloaded = catalogCategoryService.getVirtualCatalogCategoryById(catalogCategory.getId(), categoryFetchPlan);
                   
                    menu = new MenuViewBean();
                    final String seoCatalogCategoryName = catalogCategoryReloaded.getI18nName(localeCode);
                    menu.setName(seoCatalogCategoryName);
                    menu.setUrl(urlService.generateUrl(FoUrls.CATEGORY_AS_AXE, requestData, catalogCategoryReloaded));

                    List<CatalogCategoryVirtual> subCatalogCategories = catalogCategoryReloaded.getSortedChildCatalogCategories();
                    if (subCatalogCategories != null) {
                        List<MenuViewBean> subMenus = new ArrayList<MenuViewBean>();
                        for (Iterator<CatalogCategoryVirtual> iteratorSubCatalogCategory = subCatalogCategories.iterator(); iteratorSubCatalogCategory.hasNext();) {
                            final CatalogCategoryVirtual subCatalogCategory = (CatalogCategoryVirtual) iteratorSubCatalogCategory.next();
                            final CatalogCategoryVirtual subCatalogCategoryReloaded = catalogCategoryService.getVirtualCatalogCategoryById(subCatalogCategory.getId(), categoryFetchPlan);
                            final MenuViewBean subMenu = new MenuViewBean();
                            final String seoSubCatalogCategoryName = catalogCategoryReloaded.getI18nName(localeCode) + " " + subCatalogCategoryReloaded.getI18nName(localeCode);
                            subMenu.setName(seoSubCatalogCategoryName);
                            subMenu.setUrl(urlService.generateUrl(FoUrls.CATEGORY_AS_LINE, requestData, subCatalogCategoryReloaded));
                            subMenus.add(subMenu);
                        }
                        menu.setSubMenus(subMenus);
View Full Code Here

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

        final ProductSku productSku = productService.getProductSkuByCode(productMarketing.getDefaultProductSku().getCode());
        final String productSkuName = productSku.getI18nName(localeCode);
       
        final SearchProductItemViewBean searchItemViewBean = new SearchProductItemViewBean();
       
        final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getDefaultVirtualCatalogCategoryByProductSkuId(productSku.getId());
        String categoryName = "";
        if(catalogCategory != null){
            categoryName = catalogCategory.getI18nName(localeCode);
            searchItemViewBean.setCategoryCode(catalogCategory.getCode());
            searchItemViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.PRODUCT_DETAILS, requestData, catalogCategory, productMarketing, productSku));
        }
        final String productName = productMarketing.getCode();

        searchItemViewBean.setName(categoryName + " " + productName + " " + productSkuName);
View Full Code Here

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

        final String localeCode = localization.getCode();
      for (String productSkuCode : listProductSkuCodes) {
        RecentProductViewBean recentProductViewBean = new RecentProductViewBean();
            final ProductSku reloadedProductSku = productService.getProductSkuByCode(productSkuCode, productSkuFetchPlans);
            final ProductMarketing productMarketing = productService.getProductMarketingByCode(reloadedProductSku.getProductMarketing().getCode(), productMarketingFetchPlans);
            final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getDefaultVirtualCatalogCategoryByProductSkuId(reloadedProductSku.getId(), categoryVirtualFetchPlans);
          recentProductViewBean.setId(productMarketing.getId());
        recentProductViewBean.setCode(productMarketing.getCode());
        recentProductViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.PRODUCT_DETAILS, requestData, catalogCategory, productMarketing, productMarketing.getDefaultProductSku()))
          recentProductViewBean.setI18nName(productMarketing.getI18nName(localeCode));
          recentProductViewBeans.add(recentProductViewBean);
View Full Code Here

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

     if (catalogCategory.isRoot()) {
      catalogBreadCumViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.CATEGORY_AS_AXE, requestData, catalogCategory));
     } else {
      catalogBreadCumViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.CATEGORY_AS_LINE, requestData, catalogCategory));
     }
     final CatalogCategoryVirtual parentCatalogCategoryVirtual = catalogCategory.getParentCatalogCategory();
     if(!catalogCategory.isRoot() && parentCatalogCategoryVirtual != null){
       final CatalogCategoryVirtual pareCatalogCategoryVirtualReload = catalogCategoryService.getVirtualCatalogCategoryById(parentCatalogCategoryVirtual.getId());
      catalogBreadCumViewBean.setDefaultParentCategory(buildViewBeanCatalogBreadcrumb(requestData, pareCatalogCategoryVirtualReload));
     }

      return catalogBreadCumViewBean;
    }
View Full Code Here

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

                }
            }
        }
       
        try {
            CatalogCategoryVirtual savedCatalogCategory = catalogCategoryService.saveOrUpdateCatalogCategory(catalogCategory);
           
            if(parentCatalogCategory != null) {
                if(!parentCatalogCategory.getCatalogCategories().contains(catalogCategory)) {
                    // PARENT DOESN'T CONTAIN THE NEW CATEGORY - ADD IT IN THE MANY TO MANY
                    CatalogCategoryVirtual reloadedCatalogCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(catalogCategoryCode, requestData.getVirtualCatalogCode(), requestData.getVirtualCatalogCode());
                    parentCatalogCategory.getCatalogCategories().add(reloadedCatalogCategory);
                    catalogCategoryService.saveOrUpdateCatalogCategory(parentCatalogCategory);
                }
            }
           
View Full Code Here

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

              }
          } else {
              catalogCategory.setRanking(1);
          }
    if(StringUtils.isNotEmpty(catalogCategoryForm.getDefaultParentCategoryId())) {
      final CatalogCategoryVirtual parentCatalogCategory = catalogCategoryService.getVirtualCatalogCategoryById(catalogCategoryForm.getDefaultParentCategoryId());
      catalogCategory.setParentCatalogCategory(parentCatalogCategory);
    } else {
        catalogCategory.setParentCatalogCategory(null);
    }
View Full Code Here

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

   
        final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode, new FetchPlan(productMarketingFetchPlans));
        final ProductSku productSku = productMarketing.getDefaultProductSku();
        final List<CatalogCategoryVirtual> catalogCategories = catalogCategoryService.findVirtualCategoriesByProductSkuId(productSku.getId());
       
        final CatalogCategoryVirtual defaultVirtualCatalogCategory = productService.getDefaultVirtualCatalogCategory(productSku, catalogCategories, true);
       
        ProductMarketingViewBean productMarketingViewBean = backofficeViewBeanFactory.buildViewBeanProductMarketing(requestUtil.getRequestData(request), defaultVirtualCatalogCategory, productMarketing, productSku);
        modelAndView.addObject(ModelConstants.PRODUCT_MARKETING_VIEW_BEAN, productMarketingViewBean);

        modelAndView.addObject("availableGlobaleAttributeDefinitions", backofficeViewBeanFactory.buildListViewBeanAttributeDefinition(requestData, attributeService.findProductMarketingGlobalAttributeDefinitions()));
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.