Package org.hoteia.qalingo.core.domain

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


    @Before
    public void setUp() throws Exception {
        marketArea = new MarketArea();
        marketArea.setId(new Long("1"));
       
        catalogCategoryMaster = new CatalogCategoryMaster();
        catalogCategoryMaster.setId(Long.parseLong("80"));
        catalogCategoryMaster.setCode("xyz123");
        catalogCategoryMaster.setName("Development");
        catalogCategoryMaster.setDateCreate(new Date());
        catalogCategoryMaster.setDateUpdate(new Date());
View Full Code Here


                    } else if (param instanceof CatalogCategoryVirtual) {
                        CatalogCategoryVirtual category = (CatalogCategoryVirtual) param;
                        urlParams.put(RequestConstants.URL_PATTERN_CATEGORY_CODE, handleParamValue(category.getCode()));
                        urlStr = addFullPrefixUrl(requestData, urlStr) + handleParamValue(category.getName()) + "/";
                    } else if (param instanceof CatalogCategoryMaster) {
                        CatalogCategoryMaster category = (CatalogCategoryMaster) param;
                        urlParams.put(RequestConstants.URL_PATTERN_CATEGORY_CODE, handleParamValue(category.getCode()));
                        urlStr = addFullPrefixUrl(requestData, urlStr) + handleParamValue(category.getName()) + "/";
                    } else if (param instanceof ProductBrand) {
                        ProductBrand productBrand = (ProductBrand) param;
                        urlParams.put(RequestConstants.URL_PATTERN_BRAND_CODE, handleParamValue(productBrand.getCode()));
                        urlStr = addFullPrefixUrl(requestData, urlStr) + handleParamValue(productBrand.getName()) + "/";
                    } else if (param instanceof CartItem) {
View Full Code Here

       
        FetchPlan fetchPlan = handleSpecificFetchMasterCategoryMode(criteria, params);

        criteria.add(Restrictions.eq("id", catalogCategoryId));

        CatalogCategoryMaster catalogCategory = (CatalogCategoryMaster) criteria.uniqueResult();
        if(catalogCategory != null){
            catalogCategory.setFetchPlan(fetchPlan);
        }
        return catalogCategory;
  }
View Full Code Here

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

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

            catalogCategoryForm.setDescription(catalogCategory.getDescription());
            if(catalogCategory.getRanking() != null){
                catalogCategoryForm.setRanking("" + catalogCategory.getRanking());
            }
            catalogCategoryForm.setCatalogCode(catalogCategory.getName());
            CatalogCategoryMaster catalogCategoryMaster = catalogCategory.getCategoryMaster();
            catalogCategoryForm.setMasterCategoryId("" + catalogCategoryMaster.getId());
        }
        return catalogCategoryForm;
    }
View Full Code Here

        if(ProductMarketingResponseBean.PRODUCT_MARKETING_DEFAULT_FACET_FIELD.equalsIgnoreCase(facetField.getName())){
          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
                Count count = (Count) iterator.next();
                final CatalogCategoryMaster catalogCategoryMaster = catalogCategoryService.getMasterCatalogCategoryByCode(count.getName(), requestData.getMasterCatalogCode());
                ValueBean valueBean = new ValueBean(catalogCategoryMaster.getCode(), catalogCategoryMaster.getI18nName(localeCode) + "(" + count.getCount() + ")");               
                values.add(valueBean);
            }
            searchFacetViewBean.setValues(values);
        }
       
View Full Code Here

        }
      }
    }
   
    try {
        CatalogCategoryMaster 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
          CatalogCategoryMaster reloadedCatalogCategory = catalogCategoryService.getMasterCatalogCategoryByCode(catalogCategoryCode, requestData.getVirtualCatalogCode(), requestData.getMasterCatalogCode());
          parentCatalogCategory.getCatalogCategories().add(reloadedCatalogCategory);
          catalogCategoryService.saveOrUpdateCatalogCategory(parentCatalogCategory);
        }
      }
     
View Full Code Here

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

    } else {
        catalogCategory.setParentCatalogCategory(null);
    }

        if (StringUtils.isNotEmpty(catalogCategoryForm.getMasterCategoryId())) {
            final CatalogCategoryMaster masterCatalogCategory = catalogCategoryService.getMasterCatalogCategoryById(catalogCategoryForm.getMasterCategoryId());
            catalogCategory.setCategoryMaster(masterCatalogCategory);
        } else {
            catalogCategory.setCategoryMaster(null);
        }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.CatalogCategoryMaster

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.