@Override public List<User> findUsersByGroup(String groupId) { List<AppUser> userList = appUserService.findByRoleId(new Long(groupId)); List<User> list = new ArrayList<User>(); for (User user : userList) { list.add((User) user); } return list; }
@Override public List<User> findUsers() { List<AppUser> userList = appUserService.getAll(); List<User> list = new ArrayList<User>(); for (User user : userList) { list.add((User) user); } return list; }
@Override public List<Group> findGroupsByUser(String userId) { AppUser user = appUserService.get(new Long(userId)); List<Group> list = new ArrayList<Group>(); Iterator it = user.getRoles().iterator(); while (it.hasNext()) { list.add((Group) it.next()); } return list; }
@Override public User findUserById(String userId) { return appUserService.get(new Long(userId)); }