List<GroupMember> members = CollectUtils.newArrayList();
OqlBuilder<Group> builder = OqlBuilder.from(Group.class, "g");
builder.where("g.id not in(:groupIds)", new Long[] { Group.ANONYMOUS_ID, Group.ANYONE_ID });
List<Group> groups = entityDao.search(builder);
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");