public static TDepartment toSOA(Department dept) {
if (dept == null) {
return null;
}
TDepartment retval = new TDepartment();
retval.setId(toSOA(dept.getId()));
retval.setName(dept.getName());
retval.setManager(toSOA(dept.getManager()));
retval.setLocation(toSOA(dept.getLocation()));
List<TEmployee> emps = empRefsToSOA(dept.getEmployees());
if (!emps.isEmpty()) {
retval.setEmployees(new TDepartment.Employees());
retval.getEmployees().getEmployee().addAll(empRefsToSOA(dept.getEmployees()));
}
return retval;
}