throw new RuntimeException("If you are filtering by member, then you must page members");
}
if (maxMemberships >= 0 && !pageMembers && queryOptionsForGroup == null) {
long size = byHqlStatic.createQuery(countPrefix + sql.toString()).uniqueResult(long.class);
if (size > maxMemberships) {
<BUG>if (queryOptionsForMember.isRetrieveCount() && !queryOptionsForMember.isRetrieveResults()) {
</BUG>
queryOptionsForMember.setCount(size + GrouperUtil.defaultIfNull(queryOptionsForMember.getCount(), 0L));
return totalResults;
}

throw new RuntimeException("If you are filtering by member, then you must page members");
}
if (maxMemberships >= 0 && !pageMembers && queryOptionsForGroup == null) {
long size = byHqlStatic.createQuery(countPrefix + sql.toString()).uniqueResult(long.class);
if (size > maxMemberships) {
if (queryOptionsForMember != null && queryOptionsForMember.isRetrieveCount() && !queryOptionsForMember.isRetrieveResults()) {
queryOptionsForMember.setCount(size + GrouperUtil.defaultIfNull(queryOptionsForMember.getCount(), 0L));
return totalResults;
}
