Package org.blueoxygen.cimande

Examples of org.blueoxygen.cimande.LogInformation


      return INPUT;
    }
   
    ArticleCategory ACategory;
    ArticleCategory iparent;
    LogInformation logInfo;
    if("".equals(getId())){
      ACategory = new ArticleCategory();
      logInfo = new LogInformation();
     
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      setMsg("Add New");
    }else{
      ACategory = (ArticleCategory) getManager().getById(ArticleCategory.class, getId());
      logInfo = ACategory.getLogInformation();
      setMsg("update");
    }
   
    logInfo.setActiveFlag(1);
    logInfo.setLastUpdateBy(sess.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    if(!"".equals(getParentId())){
      iparent = (ArticleCategory) getManager().getById(ArticleCategory.class, getParentId());
    } else {
      iparent = null;
View Full Code Here


    }

    if (hasActionErrors()) {
      return INPUT;
    }
    LogInformation logInfo;
    PageCollection pCol;
    if (getPCol().getId() == null || "".equalsIgnoreCase(getPCol().getId())) {
      logInfo = new LogInformation();
      pCol = new PageCollection();

      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      pCol = (PageCollection) getManager().getById(PageCollection.class,
          getPCol().getId());
      logInfo = pCol.getLogInformation();
    }

    logInfo.setLastUpdateBy(sess.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    logInfo.setActiveFlag(getActive());

    pCol.setName(getPCol().getName());
    pCol.setDescription(getPCol().getDescription());
    pCol.setLogInformation(logInfo);
    getManager().save(pCol);
View Full Code Here

   
    return SUCCESS;
  }
  public String AddNew(){
    PageCollectionDetail pColDel;
    LogInformation logInfo;
    if("".equalsIgnoreCase(getId())){
      pColDel = new PageCollectionDetail();
      logInfo = new LogInformation();
     
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      logInfo.setCreateBy(sc.getCurrentUser().getId());
    }else{
      pColDel = (PageCollectionDetail) getManager().getById(PageCollectionDetail.class, getId());
      logInfo = pColDel.getLogInformation();
    }
   
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    logInfo.setLastUpdateBy(sc.getCurrentUser().getId());
   
    if(getPCol().getId() != null && !"".equalsIgnoreCase(getPCol().getId())){
      pCol = (PageCollection) getManager().getById(PageCollection.class, getPCol().getId());
    }else{
      pCol = null;
View Full Code Here

    }
    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);
View Full Code Here

    moduleDescriptorDescription = getModuleDescriptorDescription();
    if(getVm().equalsIgnoreCase("non-search")){
     
     
    }else if(getVm().equalsIgnoreCase("search")){
      LogInformation logInfo;
      CollectionSelectedDetail SelectedDetail;
      if("".equals(getId())){
       
        setSelectedDetails( getManager().getList("SELECT w FROM "+CollectionSelectedDetail.class.getName()+" w WHERE w.collection.id='"+getCollection().getId()+"'",null, null));
        if(!getSelectedDetails().isEmpty()){
          ranking = getSelectedDetails().size()+1;
        }else{
          ranking = 1;
        }
       
      logInfo = new LogInformation();
      SelectedDetail = new CollectionSelectedDetail();
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      SelectedDetail.setRank(ranking);
      }
      else{
        SelectedDetail = (CollectionSelectedDetail) getManager().getById(CollectionSelectedDetail.class, getId());
        logInfo = SelectedDetail.getLogInformation();
      }
      logInfo.setActiveFlag(getCollection().getLogInformation().getActiveFlag());
      logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
     
      if(getModuleDescriptorId() != null && !"".equalsIgnoreCase(getModuleDescriptorId())){
        descriptor = (Descriptor) getManager().getById(Descriptor.class, getModuleDescriptorId());
       
      }else {
View Full Code Here

    }
    return SUCCESS;
  }
  public String AddOrdered(){
   
    LogInformation logInfo;
    if("".equals(getId())){
      logInfo = new LogInformation();
      collectionDescriptor = new CollectionDescriptor();
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    }
    else {
      collectionDescriptor = (CollectionDescriptor) getManager().getById(CollectionDescriptor.class, getId());
      logInfo = getCollectionDescriptor().getLogInformation();
    }
   
    logInfo.setActiveFlag(getCollection().getLogInformation().getActiveFlag());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    if(getModuleDescriptorId() != null && !"".equalsIgnoreCase(getModuleDescriptorId())){
      descriptor = (Descriptor) getManager().getById(Descriptor.class, getModuleDescriptorId());
     
    }else {
View Full Code Here

   
    if(hasActionErrors()){
      return INPUT;
    }
    vm = getVm();
    LogInformation logInfo;
   
    logInfo = new LogInformation();
    logInfo.setCreateBy(sess.getCurrentUser().getId());
    logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    getCollection().setName(getCollection().getName());
    getCollection().setDescription(getCollection().getDescription());
    getCollection().setLogInformation(logInfo);
    getManager().save(getCollection());
View Full Code Here

    }
   
  }
  public String updateCollection(){
    ACollection collection;
    LogInformation logInfo;
   
    if("".equalsIgnoreCase(getCollection().getId())){
      collection = new ACollection();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    }else{
      collection = (ACollection) getManager().getById(ACollection.class, getCollection().getId());
      logInfo = collection.getLogInformation();
     
    }
    logInfo.setActiveFlag(1);
    logInfo.setLastUpdateBy(sess.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    collection.setName(getCollection().getName());
    collection.setDescription(getCollection().getDescription());
    collection.setLogInformation(logInfo);
    getManager().save(collection);
View Full Code Here

  @Override
  public String execute() throws Exception {
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log;
    if (getSemester().getId() == null
        || "".equalsIgnoreCase(getSemester().getId())) {
      log = new LogInformation();
      log.setCreateBy(sessionCredentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getSemester().setId(null);
    } else {
      Semester semester = getSemester();
      setSemester((Semester) manager.getById(Semester.class,
          getSemester().getId()));
      log = getSemester().getLogInformation();
      try {
        PropertyUtils.copyProperties(getSemester(), semester);
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
      }
    }
    log.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    if (getSemester().getLogInformation().getActiveFlag() == 1) {
      log.setActiveFlag(1);
    }
    // getSemester().setMajor(sessionCredentials.getCurrentUser().getMajor().getId());
    getSemester().setLogInformation(log);
    manager.save(getSemester());
    return SUCCESS;
View Full Code Here

import org.blueoxygen.pedimedi.Semester;

public class OpenOrder extends SemesterForm {
  @Override
  public String execute() throws Exception {
    LogInformation log = null;
    Semester semester = getSemester();
    setSemester((Semester) manager.getById(Semester.class, getSemester()
        .getId()));
    log = getSemester().getLogInformation();

    try {
      PropertyUtils.copyProperties(getSemester(), semester);
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    } catch (InvocationTargetException e) {
      e.printStackTrace();
    } catch (NoSuchMethodException e) {
      e.printStackTrace();
    }
    log.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    if (getSemester().getDescription() == "close for order") {
      getSemester().setDescription("close for order");
    }
    if (getSemester().getDescription() == "open for order") {
      getSemester().setDescription("open for order");
View Full Code Here

TOP

Related Classes of org.blueoxygen.cimande.LogInformation

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.