newItems.add(new ReportItem(item.getName(), item.getAttributeExpression().twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression()))); List<Expression> groupByExpressions = new ArrayList<Expression>(reportQuery.getGroupByExpressions().size()); for (Expression groupByExpression : reportQuery.getGroupByExpressions()) { groupByExpressions.add(groupByExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); List<Expression> orderByExpressions = new ArrayList<Expression>(reportQuery.getOrderByExpressions().size()); for (Expression orderByExpression : reportQuery.getOrderByExpressions()) { orderByExpressions.add(orderByExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); List<Expression> unionExpressions = new ArrayList<Expression>(reportQuery.getUnionExpressions().size()); for (Expression unionExpression : reportQuery.getUnionExpressions()) { unionExpressions.add(unionExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); reportQuery.setSelectionCriteria(reportQuery.getSelectionCriteria().twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression()));
newItems.add(new ReportItem(item.getName(), item.getAttributeExpression().twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression()))); List<Expression> groupByExpressions = new ArrayList<Expression>(reportQuery.getGroupByExpressions().size()); for (Expression groupByExpression : reportQuery.getGroupByExpressions()) { groupByExpressions.add(groupByExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); List<Expression> orderByExpressions = new ArrayList<Expression>(reportQuery.getOrderByExpressions().size()); for (Expression orderByExpression : reportQuery.getOrderByExpressions()) { orderByExpressions.add(orderByExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); List<Expression> unionExpressions = new ArrayList<Expression>(reportQuery.getUnionExpressions().size()); for (Expression unionExpression : reportQuery.getUnionExpressions()) { unionExpressions.add(unionExpression.twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression())); reportQuery.setSelectionCriteria(reportQuery.getSelectionCriteria().twistedForBaseAndContext(newBase, getBuilder(), getBaseExpression()));