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

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


import org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.UnitOfMeasure;

public class SaveUOM extends UOMForm {
 
  public String execute(){
    UnitOfMeasure uom;
    if(getUnitOfMeasure().getId() != null || !"".equalsIgnoreCase(getUnitOfMeasure().getId())){
      uom = new UnitOfMeasure();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      uom = (UnitOfMeasure) manager.getById(UnitOfMeasure.class, getUnitOfMeasure().getId());
      logInfo = new LogInformation();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    uom.setLogInformation(logInfo);
    uom.setCode(getUnitOfMeasure().getCode());
    uom.setSymbol(getUnitOfMeasure().getCode());
    uom.setName(getUnitOfMeasure().getName());
    uom.setPdefault(getUnitOfMeasure().getPdefault());
    uom.setStandardPrecision(getUnitOfMeasure().getStandardPrecision());
    uom.setCostingPrecision(getUnitOfMeasure().getCostingPrecision());
   
    manager.save(uom);
    setUnitOfMeasure(uom);
    return SUCCESS;
  }
View Full Code Here

TOP

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

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.