if (singleResult == null || singleResult.equals(Boolean.FALSE)) {
if (maxRes != 0) {
if (!returnCount) {
result = query.limit(maxRes).list(jpaQuery.getBasePath());
} else {
JPACountQueryResult queryResult = new JPACountQueryResult();
queryResult.setResult(query.limit(maxRes).list(jpaQuery.getBasePath()));
queryResult.setCount(query.count());
result = queryResult;
}
} else {
result = query.list(jpaQuery.getBasePath());
}