Examples of FreightCategory


Examples of org.blueoxygen.postila.distributionmanagement.entity.FreightCategory

    }
    if(hasErrors()){
      return INPUT;
    }
   
    FreightCategory freightCategory;
    if(getFreightCategory().getId() == null || "".equalsIgnoreCase(getFreightCategory().getId())){
      freightCategory = new FreightCategory();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      msg = "Successfully Add "+getFreightCategory().getName();
    } else {
      freightCategory = (FreightCategory) manager.getById(FreightCategory.class, getFreightCategory().getId());
      logInfo = freightCategory.getLogInformation();
      msg = "Successfully Edit "+getFreightCategory().getName();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    freightCategory.setLogInformation(logInfo);
    freightCategory.setSearchKey(getFreightCategory().getSearchKey());
    freightCategory.setName(getFreightCategory().getName());
    freightCategory.setDescription(getFreightCategory().getDescription());
    freightCategory.setCommentsHelp(getFreightCategory().getCommentsHelp());
   
    manager.save(freightCategory);
    setFreightCategory(freightCategory);
           
    return SUCCESS;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.