Package org.blueoxygen.aconix.entity

Examples of org.blueoxygen.aconix.entity.Article


      addActionError("Status is required");
    }
    if(hasActionErrors()){
      return INPUT;
    }
    Article article;
    LogInformation logInfo;
    if("".equalsIgnoreCase(getArticle().getId())){
      logInfo = new LogInformation();
      article = new Article();
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      setMsg("Add");
    }else {
      article = (Article) getManager().getById(Article.class, getArticle().getId());
      logInfo = article.getLogInformation();
      setMsg("update");
     
    }
    if(getCategoryId() != null && !"".equalsIgnoreCase(getCategoryId())){
      ACategory = (ArticleCategory) getManager().getById(ArticleCategory.class, getCategoryId());
    }else{
      ACategory = null;
    }
   
    logInfo.setActiveFlag(getStatus());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    article.setName(getArticle().getName());
    article.setAbstrak(getArticle().getAbstrak());
    article.setDescription(getArticle().getDescription());
    article.setCategoryId(ACategory);
    article.setLogInformation(logInfo);
    getManager().save(article);
   
   
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.blueoxygen.aconix.entity.Article

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.