Package org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity

Examples of org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.ProductCategory


    }
    if(getProductCategory().getPlannedMargin() == 0){
      addActionError("Planned Margin is required ");
    }
   
    ProductCategory productCategory;
    if(getProductCategory().getId() == null || "".equalsIgnoreCase(getProductCategory().getId())){
      productCategory = new ProductCategory();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      productCategory = (ProductCategory) manager.getById(ProductCategory.class, getProductCategory().getId());
      logInfo = productCategory.getLogInformation();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    productCategory.setLogInformation(logInfo);
    productCategory.setSearchKey(getProductCategory().getSearchKey());
    productCategory.setDescription(getProductCategory().getDescription());
    productCategory.setParentId(getParentProductCategory());
    productCategory.setMaterialPolice(getProductCategory().getMaterialPolice());
    productCategory.setPdefault(getProductCategory().getPdefault());
    productCategory.setSelfService(getProductCategory().getSelfService());
    productCategory.setPlannedMargin(getProductCategory().getPlannedMargin());
    productCategory.setAssetGroup(getAssetGroup());

    manager.save(productCategory);
    setProductCategory(getProductCategory());
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.ProductCategory

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.