FileDocCategorySizeDatePackage
EmployeeInfo.javaAPI DocApache Axis 1.4993Sat Apr 22 18:56:52 BST 2006samples.faults

EmployeeInfo

public class EmployeeInfo extends Object

Fields Summary
static HashMap
map
Constructors Summary
Methods Summary
public voidaddEmployee(samples.faults.Employee in)

     
        Employee emp = new Employee();
        emp.setEmployeeID("#001");
        emp.setEmployeeName("Bill Gates");
        map.put(emp.getEmployeeID(), emp);
    
        map.put(in.getEmployeeID(), in);
    
public samples.faults.EmployeegetEmployee(java.lang.String id)

        Employee emp = (Employee) map.get(id);
        if (emp == null) {
            NoSuchEmployeeFault fault = new NoSuchEmployeeFault();
            fault.setInfo("Could not find employee:" + id);
            throw fault;
        }
        return emp;
    
public samples.faults.Employee[]getEmployees()

        Collection values = map.values();
        Employee[] emps = new Employee[values.size()];
        values.toArray(emps);
        return emps;