public Collection<User> getUserSubordinate(String username) {
return getUserDao().getUsersSubordinate(username, null, null, null, null);
}
public Collection<User> getUserDepartmentUser(String username) {
User user = getUserDao().getUser(username);
if (user != null && user.getEmployments() != null) {
Collection<Employment> employments = user.getEmployments();
//get only 1st employment record, currently only support 1 employment per user
Employment employment = employments.iterator().next();
if (employment.getDepartment() != null) {
return getUserDao().getUsers(null, null, employment.getDepartment().getId(), null, null, null, null, "username", false, null, null);
}