/** * Return <code>true</code> if any of the {@link ProjectionNode}, * {@link GroupByNode}, or {@link HavingNode} indicate that this is an * aggregation query. All arguments are optional. */ public static boolean isAggregate(final ProjectionNode projection, final GroupByNode groupBy, final HavingNode having) { if (groupBy != null && !groupBy.isEmpty()) return true; if (having != null && !having.isEmpty()) return true; if (projection != null) { for (IValueExpressionNode exprNode : projection) { if (isAggregateExpressionNode(exprNode)) { return true; } } } return false; }
/** * Return <code>true</code> if any of the {@link ProjectionNode}, * {@link GroupByNode}, or {@link HavingNode} indicate that this is an * aggregation query. All arguments are optional. */ public static boolean isAggregate(final ProjectionNode projection, final GroupByNode groupBy, final HavingNode having) { if (groupBy != null && !groupBy.isEmpty()) return true; if (having != null && !having.isEmpty()) return true; if (projection != null) { for (IValueExpressionNode exprNode : projection) { if (isAggregateExpressionNode(exprNode)) { return true; } } } return false; }
if (groupBy != null && !groupBy.isEmpty()) {
if (groupBy != null && !groupBy.isEmpty()) {
: queryBase.getGroupBy().isEmpty() ? null : queryBase.getGroupBy();
: queryBase.getGroupBy().isEmpty() ? null : queryBase.getGroupBy();
if (queryRoot.getGroupBy() != null && !queryRoot.getGroupBy().isEmpty()) {
if (queryRoot.getGroupBy() != null && !queryRoot.getGroupBy().isEmpty()) {
: queryBase.getGroupBy().isEmpty() ? null : queryBase .getGroupBy();
: queryBase.getGroupBy().isEmpty() ? null : queryBase .getGroupBy();
: queryBase.getGroupBy().isEmpty() ? null : queryBase .getGroupBy();
: queryBase.getGroupBy().isEmpty() ? null : queryBase .getGroupBy();