Package org.blueoxygen.postila.partnerrelations.businesspartnerrules.entity

Examples of org.blueoxygen.postila.partnerrelations.businesspartnerrules.entity.Employee


  public String execute(){
    if(getBusinessPartner().getId() != null && !"".equalsIgnoreCase(getBusinessPartner().getId())){
      setBusinessPartner((BusinessPartner) manager.getById(BusinessPartner.class, getBusinessPartner().getId()));
    }
   
    Employee employee;
    if(getEmployee().getId() == null || "".equalsIgnoreCase(getEmployee().getId())){
      employee = new Employee();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      employee = (Employee) manager.getById(Employee.class, getEmployee().getId());
      logInfo = employee.getLogInformation();
    }
   
    logInfo.setActiveFlag(1);
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    employee.setBusinessPartner(getBusinessPartner());
    employee.setIsEmployee(getEmployee().getIsEmployee());
    employee.setSearchKey(getBusinessPartner().getSearchKey());
    employee.setName(getBusinessPartner().getName1());
    employee.setSalesRepresentative(getEmployee().getSalesRepresentative());
   
    manager.save(employee);
    setEmployee(employee);
   
    return SUCCESS;
View Full Code Here

TOP

Related Classes of org.blueoxygen.postila.partnerrelations.businesspartnerrules.entity.Employee

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.