Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.SiteProfileClass


              break;
            }
          }
         
          CategoryCustomAttributeInfo categoryCustomAttributeInfo = new CategoryCustomAttributeInfo();
          SiteProfileClass siteProfileClass = contentBean.getContentSessionBean().getSiteProfile().getSiteProfileClass();
          if (isFilterAttribute) {
            CategoryCustomAttributeOptionInfo optionInfo = new CategoryCustomAttributeOptionInfo();
            optionInfo.setCustomAttribOptionId(contentFilterBean.getCustomAttribOptionId().toString());
            CustomAttributeOption customAttribOption = CustomAttributeOptionDAO.load(siteDomain.getSite().getSiteId(), contentFilterBean.getCustomAttribOptionId());
            if (customAttribute.getSystemRecord() == Constants.VALUE_YES) {
              PriceRange priceRange = getAttributePriceRange(customAttribute, customAttribOption.getCustomAttribOptionId());
              String rangeValue = formatter.formatCurrency(priceRange.getMinPrice().floatValue()) +
                        " - " +
                        formatter.formatCurrency(priceRange.getMaxprice().floatValue());
              optionInfo.setCustomAttribValue(rangeValue);
            }
            else {
              optionInfo.setCustomAttribValue(customAttribOption.getCustomAttributeOptionLanguage().getCustomAttribValue());
              if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
                for (CustomAttributeOptionLanguage customAttributeOptionLanguage : customAttribOption.getCustomAttributeOptionLanguages()) {
                  if (!customAttributeOptionLanguage.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
                        continue;
                      }
                  if (customAttributeOptionLanguage.getCustomAttribValue() != null) {
                    optionInfo.setCustomAttribValue(customAttributeOptionLanguage.getCustomAttribValue());
                    break;
                  }
                }
              }
            }
            String customAttribUrl = categoryUrl + "?sortBy" + sortBy;
                for (ContentFilterBean bean : contentFilterBeans) {
                  if (bean.getCustomAttribId().equals(customAttribute.getCustomAttribId())) {
                    continue;
                  }
                  customAttribUrl += "&filter=" + bean.getCustomAttribId() + "," + bean.getCustomAttribOptionId();
                }
                optionInfo.setCustomAttribUrl(customAttribUrl);
               
            categoryCustomAttributeInfo.setCustomAttribId(customAttribute.getCustomAttribId().toString());
            categoryCustomAttributeInfo.setCustomAttribDesc(customAttribute.getCustomAttributeLanguage().getCustomAttribDesc());
            categoryCustomAttributeInfo.setSelected(true);
            categoryCustomAttributeInfo.setSelectedCustomAttribOptionInfo(optionInfo);
            if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
              for (CustomAttributeLanguage customAttributeLanguage : customAttribute.getCustomAttributeLanguages()) {
                if (!customAttributeLanguage.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
                      continue;
                    }
                if (customAttributeLanguage.getCustomAttribDesc() != null) {
                  categoryCustomAttributeInfo.setCustomAttribDesc(customAttributeLanguage.getCustomAttribDesc());
                  break;
                }
              }
            }
          }
          else {
            Vector<CategoryCustomAttributeOptionInfo> categoryCustomAttributeOptionVector = new Vector<CategoryCustomAttributeOptionInfo>();
            if (customAttribute.getSystemRecord() == Constants.VALUE_YES) {
              for (CustomAttributeOption customAttributeOption : customAttribute.getCustomAttributeOptions()) {
                long count = getDataInAttributeOptionCount(category, customAttribute, customAttributeOption, contentFilterBeans);
                    CategoryCustomAttributeOptionInfo optionInfo = new CategoryCustomAttributeOptionInfo();
                    optionInfo.setCustomAttribOptionId(customAttributeOption.getCustomAttribOptionId().toString());
                    PriceRange priceRange = getAttributePriceRange(customAttribute, customAttributeOption.getCustomAttribOptionId());
                    String rangeValue = formatter.formatCurrency(priceRange.getMinPrice().floatValue()) +
                              " - " +
                              formatter.formatCurrency(priceRange.getMaxprice().floatValue());
                    optionInfo.setCustomAttribValue(rangeValue);
                    optionInfo.setDataCount((int) count);
                    String customAttribUrl = categoryUrl + "?sortBy=" + sortBy;
                    for (ContentFilterBean bean : contentFilterBeans) {
                      customAttribUrl += "&filter=" + bean.getCustomAttribId() + "," + bean.getCustomAttribOptionId();
                    }
                    customAttribUrl += "&filter=" + customAttribute.getCustomAttribId() + "," + customAttributeOption.getCustomAttribOptionId();
                    optionInfo.setCustomAttribUrl(customAttribUrl);
                    categoryCustomAttributeOptionVector.add(optionInfo);
              }
            }
            else {
              for (CustomAttributeOption customAttributeOption : customAttribute.getCustomAttributeOptions()) {
                long count = getDataInAttributeOptionCount(category, customAttribute, customAttributeOption, contentFilterBeans);
                    CategoryCustomAttributeOptionInfo optionInfo = new CategoryCustomAttributeOptionInfo();
                    optionInfo.setCustomAttribOptionId(customAttributeOption.getCustomAttribOptionId().toString());
                    optionInfo.setCustomAttribValue(customAttributeOption.getCustomAttributeOptionLanguage().getCustomAttribValue());
                    optionInfo.setDataCount((int) count);
                    if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
                      for (CustomAttributeOptionLanguage customAttributeOptionLanguage : customAttributeOption.getCustomAttributeOptionLanguages()) {
                        if (!customAttributeOptionLanguage.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
                              continue;
                            }
                        if (customAttributeOptionLanguage.getCustomAttribValue() != null) {
                          optionInfo.setCustomAttribValue(customAttributeOptionLanguage.getCustomAttribValue());
                          break;
                        }
                      }
                    }
                    String customAttribUrl = categoryUrl + "?sortBy=" + sortBy;
                    for (ContentFilterBean bean : contentFilterBeans) {
                      customAttribUrl += "&filter=" + bean.getCustomAttribId() + "," + bean.getCustomAttribOptionId();
                    }
                    customAttribUrl += "&filter=" + customAttribute.getCustomAttribId() + "," + customAttributeOption.getCustomAttribOptionId();
                    optionInfo.setCustomAttribUrl(customAttribUrl);
                    categoryCustomAttributeOptionVector.add(optionInfo);
              }
            }
            categoryCustomAttributeInfo.setCustomAttribId(customAttribute.getCustomAttribId().toString());
            categoryCustomAttributeInfo.setCustomAttribDesc(customAttribute.getCustomAttributeLanguage().getCustomAttribDesc());
            categoryCustomAttributeInfo.setSelected(false);
            if (!contentBean.getContentSessionBean().isSiteProfileClassDefault()) {
              for (CustomAttributeLanguage customAttributeLanguage : customAttribute.getCustomAttributeLanguages()) {
                if (!customAttributeLanguage.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
                      continue;
                    }
                if (customAttributeLanguage.getCustomAttribDesc() != null) {
                  categoryCustomAttributeInfo.setCustomAttribDesc(customAttributeLanguage.getCustomAttribDesc());
                  break;
View Full Code Here

TOP

Related Classes of com.jada.jpa.entity.SiteProfileClass

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.