public List<GroupMember> getGroupMembers(User user, GroupMember.Ship ship) {
if (isRoot(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) {
List<GroupMember> members = CollectUtils.newArrayList();
List<Group> groups = entityDao.getAll(Group.class);
for (Group group : groups) {
GroupMemberBean gmb = new GroupMemberBean(group, user, GroupMember.Ship.MEMBER);
gmb.setGranter(true);
gmb.setManager(true);
members.add(gmb);
}
return members;
}
OqlBuilder<GroupMember> builder = OqlBuilder.from(GroupMember.class, "gm");