* Apply this node to the passed query
*/
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) {
if (theQuery instanceof ReportQuery) {
SelectGenerationContext selectContext = (SelectGenerationContext)context;
ReportQuery reportQuery = (ReportQuery)theQuery;
reportQuery.beginAddingConstructorArguments(
getConstructorClass(context.getParseTreeContext()));
for (Iterator i = constructorItems.iterator(); i.hasNext();) {
Node node = (Node)i.next();
if (selectingRelationshipField(node, context)) {
selectContext.useOuterJoins();
}
node.applyToQuery(reportQuery, context);
selectContext.dontUseOuterJoins();
}
reportQuery.endAddingToConstructorItem();
}
}