@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)); }