this.aggregateQuery = this.checkIfAggregateQuery();
}
private boolean checkIfAggregateQuery() throws HBqlException {
final SelectElement firstElement = this.getSelectElementList().get(0);
final boolean firstIsAggregate = firstElement.isAnAggregateElement();
for (final SelectElement selectElement : this.getSelectElementList()) {
if (selectElement.isAnAggregateElement() != firstIsAggregate)
throw new HBqlException("Cannot mix aggregate and non-aggregate select elements");
}
return firstIsAggregate;