use of org.eclipse.persistence.jpa.jpql.parser.SizeExpression in project eclipselink by eclipse-ee4j.
the class ReportItemBuilder method visit.
@Override
public void visit(SizeExpression expression) {
// Add the attribute
Expression queryExpression = queryContext.buildExpression(expression.getExpression());
addAttribute("size", queryExpression.count(), Integer.class);
// Now add the GROUP BY expression
CollectionValuedPathExpression pathExpression = (CollectionValuedPathExpression) expression.getExpression();
queryExpression = queryContext.buildGroupByExpression(pathExpression);
query.addGrouping(queryExpression);
}
Aggregations