Package org.blueoxygen.postila.asset.fixedassets.setupadnmaintain.fixedassetsetup.entity

Examples of org.blueoxygen.postila.asset.fixedassets.setupadnmaintain.fixedassetsetup.entity.AssetGroup


    }
    if(hasErrors()){
      return INPUT;
    }
   
    AssetGroup assetGroup;
    if(getAssetGroup().getId() == null || "".equalsIgnoreCase(getAssetGroup().getId())){
      assetGroup = new AssetGroup();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      msg = "Successfully Add "+getAssetGroup().getName();
    } else {
      assetGroup = (AssetGroup) manager.getById(AssetGroup.class, getAssetGroup().getId());
      logInfo = assetGroup.getLogInformation();
      msg = "Successfully Edit "+getAssetGroup().getName();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    assetGroup.setLogInformation(logInfo);
    assetGroup.setName(getAssetGroup().getName());
    assetGroup.setDescription(getAssetGroup().getDescription());
    assetGroup.setCommentHelp(getAssetGroup().getCommentHelp());
    assetGroup.setOwned(getAssetGroup().getOwned());
    assetGroup.setDepreciated(getAssetGroup().getDepreciated());
    assetGroup.setOneAssetPerUOM(getAssetGroup().getOneAssetPerUOM());
    assetGroup.setCreateAsActive(getAssetGroup().getCreateAsActive());
   
    manager.save(assetGroup);
    setAssetGroup(assetGroup);
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.blueoxygen.postila.asset.fixedassets.setupadnmaintain.fixedassetsetup.entity.AssetGroup

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.