@SuppressWarnings({ "rawtypes", "unchecked" })
public Collection<GroupProfile> getProfiles(Collection<Group> groups, Resource resource) {
if (groups.isEmpty()) return Collections.EMPTY_LIST;
OqlBuilder builder = OqlBuilder.from("from "+ Authority.class.getName() + " au,"+GroupProfile.class.getName()+" gp");
builder.where("au.group in (:groups) and au.resource = :resource and au.group=gp.group", groups, resource);
builder.select("gp");
return entityDao.search(builder);
}
private List<RestrictionHolder> getAuthorityRestrictions(User user, Resource resource) {