Package org.jboss.example.service

Examples of org.jboss.example.service.Employee


   
    return result;
  }
 
  boolean addEmployee() throws ParseException, NumberFormatException, IllegalArgumentException, IOException {
    Employee newEmployee = userInterface.getEmployee();   
    Address address = userInterface.getAddress();
    Date dateOfBirth = userInterface.getDateOfBirth();   
    newEmployee.setAddress(address);
    newEmployee.setDateOfBirth(dateOfBirth);
   
    if (useBus)
      return (Boolean) invoke(HRSERVICE, "addEmployee", new Object[] {newEmployee}, new String[] {EMPLOYEE});
    else
      return manager.addEmployee(newEmployee);     
View Full Code Here


    else
      return manager.getEmployees();
  }
 
  void removeEmployee() throws IllegalArgumentException, IOException {     
    Employee employee = userInterface.getEmployee();
   
    if (useBus)
      invoke(HRSERVICE, "removeEmployee", new Object[] {employee}, new String[] {EMPLOYEE});
    else
      manager.removeEmployee(employee);
View Full Code Here

    else
      manager.removeEmployee(employee);
  }
 
  Integer getSalary() throws IllegalArgumentException, IOException {
    Employee employee = userInterface.getEmployee();

    if (useBus)
      return(Integer) invoke(HRSERVICE, "getSalary", new Object[] {employee}, new String[] {EMPLOYEE});
    else
      return manager.getSalary(employee);
View Full Code Here

    else
      return manager.getSalary(employee);
  }
 
  void setSalary() throws NumberFormatException, IllegalArgumentException, IOException {
    Employee employee = userInterface.getEmployee()
    Integer salary = userInterface.getSalary();   
   
    Employee actualEmployee;
    if (useBus) {
      actualEmployee = (Employee) invoke(HRSERVICE, "getEmployee", new Object[] {employee.getFirstName(), employee.getLastName()}, new String[] {"java.lang.String","java.lang.String"})
      invoke(HRSERVICE, "setSalary", new Object[] {actualEmployee, salary}, new String[] {EMPLOYEE, "java.lang.Integer"})
    } else {
      actualEmployee = manager.getEmployee(employee.getFirstName(), employee.getLastName());
View Full Code Here

    System.out.println("Please enter the employee's name [firstName lastName]:");
    String name = in.readLine();
    String[] names = name.split("\\s");
    if (names.length != 2) { throw new IllegalArgumentException("Employees must have a first and last name."); }
    return new Employee(names[0], names[1]);
  }
View Full Code Here

    age.set(year - 43, month, day);
    return age.getTime();
  }

  public Employee getEmployee() throws IOException {
    return new Employee("David", "Hasselhof");
  }
View Full Code Here

   
    return result;
  }
 
  boolean addEmployee() throws ParseException, NumberFormatException, IllegalArgumentException, IOException {
    Employee newEmployee = userInterface.getEmployee();   
    Address address = userInterface.getAddress();
    Date dateOfBirth = userInterface.getDateOfBirth();   
    newEmployee.setAddress(address);
    newEmployee.setDateOfBirth(dateOfBirth);
   
    if (useBus)
      return (Boolean) invoke(HRSERVICE, "addEmployee", new Object[] {newEmployee}, new String[] {EMPLOYEE});
    else
      return manager.addEmployee(newEmployee);     
View Full Code Here

    else
      return manager.getEmployees();
  }
 
  void removeEmployee() throws IllegalArgumentException, IOException {     
    Employee employee = userInterface.getEmployee();
   
    if (useBus)
      invoke(HRSERVICE, "removeEmployee", new Object[] {employee}, new String[] {EMPLOYEE});
    else
      manager.removeEmployee(employee);
View Full Code Here

    else
      manager.removeEmployee(employee);
  }
 
  Integer getSalary() throws IllegalArgumentException, IOException {
    Employee employee = userInterface.getEmployee();

    if (useBus)
      return(Integer) invoke(HRSERVICE, "getSalary", new Object[] {employee}, new String[] {EMPLOYEE});
    else
      return manager.getSalary(employee);
View Full Code Here

    else
      return manager.getSalary(employee);
  }
 
  void setSalary() throws NumberFormatException, IllegalArgumentException, IOException {
    Employee employee = userInterface.getEmployee()
    Integer salary = userInterface.getSalary();   
   
    Employee actualEmployee;
    if (useBus) {
      actualEmployee = (Employee) invoke(HRSERVICE, "getEmployee", new Object[] {employee.getFirstName(), employee.getLastName()}, new String[] {"java.lang.String","java.lang.String"})
      invoke(HRSERVICE, "setSalary", new Object[] {actualEmployee, salary}, new String[] {EMPLOYEE, "java.lang.Integer"})
    } else {
      actualEmployee = manager.getEmployee(employee.getFirstName(), employee.getLastName());
View Full Code Here

TOP

Related Classes of org.jboss.example.service.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.