/** * INTERNAL: * Normalize all subselect expressions found in the course of normalizing the * enclosing query. * This method allows one to completely normalize the parent statement first * (which should treat its sub selects as black boxes), and then normalize the * subselects (which require full knowledge of the enclosing statement). * This should make things clearer too, * Assumes encounteredSubSelectExpressions() true. * For CR#4223. */ public void normalizeSubSelects(Map clonedExpressions) { for (SubSelectExpression next : this.subSelectExpressions) { next.normalizeSubSelect(this, clonedExpressions); } }
/** * INTERNAL: * Normalize all subselect expressions found in the course of normalizing the * enclosing query. * This method allows one to completely normalize the parent statement first * (which should treat its sub selects as black boxes), and then normalize the * subselects (which require full knowledge of the enclosing statement). * This should make things clearer too, * Assumes encounteredSubSelectExpressions() true. * For CR#4223. */ public void normalizeSubSelects(Map clonedExpressions) { for (SubSelectExpression next : this.subSelectExpressions) { next.normalizeSubSelect(this, clonedExpressions); } }
/** * INTERNAL: * Normalize all subselect expressions found in the course of normalizing the * enclosing query. * This method allows one to completely normalize the parent statement first * (which should treat its sub selects as black boxes), and then normalize the * subselects (which require full knowledge of the enclosing statement). * This should make things clearer too, * Assumes encounteredSubSelectExpressions() true. * For CR#4223. */ public void normalizeSubSelects(Map clonedExpressions) { for (Enumeration enumtr = subSelectExpressions.elements(); enumtr.hasMoreElements();) { SubSelectExpression next = (SubSelectExpression)enumtr.nextElement(); next.normalizeSubSelect(this, clonedExpressions); } }
/** * INTERNAL: * Normalize the expression into a printable structure. * Any joins must be added to form a new root. */ @Override public Expression normalize(ExpressionNormalizer normalizer) { if (this.subSelect != null) { // Each item that is a function must have an alias defined for it. for (ReportItem item : this.subSelect.getSubQuery().getItems()) { if (!item.getAttributeExpression().isQueryKeyExpression()) { item.setAttributeExpression(item.getAttributeExpression().as(item.getName())); } } // Need to force the sub-slect to normalize instead of deferring. this.subSelect.normalizeSubSelect(normalizer, normalizer.getClonedExpressions()); } return super.normalize(normalizer); }
/** * INTERNAL: * Normalize the expression into a printable structure. * Any joins must be added to form a new root. */ @Override public Expression normalize(ExpressionNormalizer normalizer) { if (this.subSelect != null) { // Each item that is a function must have an alias defined for it. for (ReportItem item : this.subSelect.getSubQuery().getItems()) { if (!item.getAttributeExpression().isQueryKeyExpression()) { item.setAttributeExpression(item.getAttributeExpression().as(item.getName())); } } // Need to force the sub-slect to normalize instead of deferring. this.subSelect.normalizeSubSelect(normalizer, normalizer.getClonedExpressions()); } return super.normalize(normalizer); }