public List<GroupMember> getGroupMembers(User user, GroupMember.Ship ship) {
if (isAdmin(user)) {
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");