Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.CustomAttributeOptionLanguage


          em.persist(customAttribOptionCurrency);
        }
      }
      else {
        exist = true;
        CustomAttributeOptionLanguage customAttribOptionLanguage = customAttributeOption.getCustomAttributeOptionLanguage();
        if (customAttribOptionLanguage == null) {
          SiteProfileClass siteProfileClass = SiteProfileClassDAO.load(form.getSiteProfileClassId());
          customAttribOptionLanguage = new CustomAttributeOptionLanguage();
          exist = false;
          customAttribOptionLanguage.setCustomAttributeOption(customAttributeOption);
          customAttribOptionLanguage.setSiteProfileClass(siteProfileClass);
          customAttribOptionLanguage.setRecCreateBy(adminBean.getUser().getUserId());
          customAttribOptionLanguage.setRecCreateDatetime(new Date(System.currentTimeMillis()));
          customAttributeOption.setCustomAttributeOptionLanguage(customAttribOptionLanguage);
          customAttributeOption.getCustomAttributeOptionLanguages().add(customAttribOptionLanguage);
        }
        customAttribOptionLanguage.setCustomAttribValue(optionForm.getCustomAttribValue());
        customAttribOptionLanguage.setRecUpdateBy(adminBean.getUser().getUserId());
        customAttribOptionLanguage.setRecUpdateDatetime(new Date(System.currentTimeMillis()))
        if (!exist) {
          em.persist(customAttribOptionLanguage);
        }
      }
      optionForm.setCustomAttribOptionId(customAttributeOption.getCustomAttribOptionId().toString());
View Full Code Here


      CustomAttributeOptionDisplayForm optionForm = form.getCustomAttribOptions()[i];
      CustomAttributeOption customAttributeOption = null;
      Long customAttribOptionId = Format.getLong(optionForm.getCustomAttribOptionId());
      customAttributeOption = CustomAttributeOptionDAO.load(adminBean.getSite().getSiteId(), customAttribOptionId);
      boolean exist = true;
      CustomAttributeOptionLanguage customAttributeOptionLanguage = null;
      for (CustomAttributeOptionLanguage optionLang : customAttributeOption.getCustomAttributeOptionLanguages()) {
        if (optionLang.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClassId)) {
          customAttributeOptionLanguage = optionLang;
        }
      }
      if (customAttributeOptionLanguage == null) {
        customAttributeOptionLanguage = new CustomAttributeOptionLanguage();
        exist = false;
        customAttributeOptionLanguage.setRecCreateBy(user.getUserId());
        customAttributeOptionLanguage.setRecCreateDatetime(new Date(System.currentTimeMillis()));
          SiteProfileClass siteProfileClass = (SiteProfileClass) em.find(SiteProfileClass.class, siteProfileClassId);
          customAttributeOptionLanguage.setSiteProfileClass(siteProfileClass);
          customAttributeOptionLanguage.setCustomAttributeOption(customAttributeOption);
          customAttributeOption.getCustomAttributeOptionLanguages().add(customAttributeOptionLanguage);
      }
     
      if (form.isCustomAttribOptionLangFlag()) {
        customAttributeOptionLanguage.setCustomAttribValue(optionForm.getCustomAttribValueLang());
      }
      else {
        customAttributeOptionLanguage.setCustomAttribValue(null);
      }
      customAttributeOptionLanguage.setRecUpdateBy(user.getUserId());
      customAttributeOptionLanguage.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      if (!exist) {
        em.persist(customAttributeOptionLanguage);
      }
      optionForm.setCustomAttribValueLangFlag(form.isCustomAttribOptionLangFlag());
    }
View Full Code Here

TOP

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

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.