Package org.blueoxygen.cimande

Examples of org.blueoxygen.cimande.LogInformation


      addActionError("Please select a table first");
    }
    if(hasActionErrors()){
      return INPUT;
    }
    LogInformation logInfo = new LogInformation();
    if(getId().equalsIgnoreCase("")){
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      logInfo.setCreateBy(session.getCurrentUser().getId());
    } else {
      temp = (PurchaseOrderItem)manager.getById(PurchaseOrderItem.class, getId());
      logInfo = temp.getLogInformation();
    }
   
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    logInfo.setLastUpdateBy(session.getCurrentUser().getId());
    logInfo.setActiveFlag(1);
    po = (PurchaseOrder)manager.getById(PurchaseOrder.class, poId);
    item = (Item)manager.getById(Item.class, getItemId());
    temp.setPo(po);
    temp.setItem(item);
    temp.setQuantity(poItem.getQuantity());
View Full Code Here


  public List<SemesterSorting> getSemSorts() {
    return semSorts;
  }

  private void saveStudentSemester() {
    LogInformation log = new LogInformation();
    log.setCreateBy(credentials.getCurrentUser().getId());
    log.setCreateDate(new Timestamp(System.currentTimeMillis()));
    log.setLastUpdateBy(credentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    log.setActiveFlag(1);
    setStudentSemesters(manager.getList("FROM "
        + StudentSemester.class.getName()
        + " ss WHERE ss.semester.id='" + getSemester().getId()
        + "' AND ss.student.id='" + getStudent().getId() + "'", null,
        null));
View Full Code Here

      addActionError("Kode tidak boleh kosong");
    }
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log;
    if (getFaculty().getId() == null
        || "".equalsIgnoreCase(getFaculty().getId())) {
      log = new LogInformation();
      log.setCreateBy(sessionCredentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getFaculty().setId(null);
    } else {
      Faculty category = getFaculty();
      setFaculty((Faculty) manager.getById(Faculty.class, getFaculty()
          .getId()));
      log = getFaculty().getLogInformation();
      try {
        PropertyUtils.copyProperties(getFaculty(), category);
      } 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()));
    log.setActiveFlag(1);
    getFaculty().setLogInformation(log);
    manager.save(getFaculty());
    return SUCCESS;
  }
View Full Code Here

      addActionError("Address cannot empty");
    }
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log;
    if (getCompany().getId() == null
        || "".equalsIgnoreCase(getCompany().getId())) {
      log = new LogInformation();
      log.setCreateBy(sessionCredentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getCompany().setId(null);
    } else {
      Company category = getCompany();
      setCompany((Company) manager.getById(Company.class, getCompany()
          .getId()));
      log = getCompany().getLogInformation();
      try {
        PropertyUtils.copyProperties(getCompany(), category);
      } 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()));
    log.setActiveFlag(1);
    getCompany().setLogInformation(log);
    manager.save(getCompany());
    return SUCCESS;
  }
View Full Code Here

  @Override
  public String execute() {
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log ;
    if (getUser().getId() == null || "".equalsIgnoreCase(getUser().getId())) {
      log = new LogInformation();
      log.setCreateBy(credentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getUser().setPassword(null);
      getUser().setId(null);
    } else {
      User category = getUser();
      setUser((User)manager.getById(User.class, getUser().getId()));
      log = getUser().getLogInformation();
      getUser().setPassword(getUser().getPassword());
      try {
        PropertyUtils.copyProperties(getUser(), category);
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
      }
    }

    log.setActiveFlag(1);
    log.setLastUpdateBy(credentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));

    getUser().setLogInformation(log);
    getUser().setAddress(getAddress());
    getUser().setName(getName());
    getUser().setMajor(credentials.getCurrentUser().getMajor());
View Full Code Here

    setMajors(manager.findAllSorted(Major.class, "name"));
    setRoles(manager.findAllSorted(Role.class, "name"));
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log ;
    if (getUser().getId() == null || "".equalsIgnoreCase(getUser().getId())) {
      log = new LogInformation();
      log.setCreateBy(sessionCredentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getUser().setPassword(null);
      getUser().setId(null);
    } else {
      User category = getUser();
      setUser((User)manager.getById(User.class, getUser().getId()));
      log = getUser().getLogInformation();
      getUser().setPassword(getUser().getPassword());
      try {
        PropertyUtils.copyProperties(getUser(), category);
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
      }
    }

    log.setActiveFlag(1);
    log.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));

    getUser().setLogInformation(log);
    getUser().setAddress(getAddress());
    getUser().setName(getName());
    getUser().setCompany(getCompany());
View Full Code Here

    setUser((User) getManager().getById(User.class, getUser().getId()));
    if (hasErrors()) {
      return INPUT;
    }
    User user;
    LogInformation logInfo;

    user = getUser();
    logInfo = user.getLogInformation();

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

    user.setPassword(su.encodeBase64(getNewPassword()));
    user.setLogInformation(logInfo);

    ua.update(user);
View Full Code Here


public class InactiveUser extends UserForm{
  @Override
  public String execute() throws Exception {
    LogInformation log = new LogInformation();
    setUser((User)manager.getById(User.class, getUser().getId()));
    log.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    log.setActiveFlag(0);
    getUser().setLogInformation(log);
    manager.save(getUser());
    return SUCCESS;
  }
View Full Code Here

  public String execute() {
    setFaculties(manager.findAllSorted(Faculty.class, "name"));
    if (hasErrors()) {
      return INPUT;
    }
    LogInformation log;
    if (getMajor().getId() == null
        || "".equalsIgnoreCase(getMajor().getId())) {
      log = new LogInformation();
      log.setCreateBy(sessionCredentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getMajor().setId(null);
    } else {
      Major category = getMajor();
      setMajor((Major) manager.getById(Major.class, getMajor().getId()));
      log = getMajor().getLogInformation();
      try {
        PropertyUtils.copyProperties(getMajor(), category);
      } 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()));
    log.setActiveFlag(1);
    getMajor().setFaculty(getFaculty());
    getMajor().setLogInformation(log);
    manager.save(getMajor());
    return SUCCESS;
  }
View Full Code Here

      return INPUT;
    }
    setStudent((User) manager.getById(User.class, getStudent().getId()));
    setSemester((Semester) manager.getById(Semester.class, getSemester()
        .getId()));
    LogInformation log;
    if (getPayment().getId() == null
        || "".equalsIgnoreCase(getPayment().getId())) {
      log = new LogInformation();
      log.setCreateBy(credentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getPayment().setId(null);

    } else {
      Payment category = getPayment();
      setPayment((Payment) manager.getById(Payment.class, getPayment()
          .getId()));
      log = getPayment().getLogInformation();
      try {
        PropertyUtils.copyProperties(getPayment(), category);
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
      }
    }

    log.setLastUpdateBy(credentials.getCurrentUser().getId());
    log.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    log.setActiveFlag(1);
    getPayment().setLogInformation(log);
    getPayment().setStudent(getStudent());
    getPayment().setSemester(getSemester());
    manager.save(getPayment());
    return SUCCESS;
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.