/** * INTERNAL * Check for any JOIN FETCH nodes of the current variable and add them as * joined attributes. This method is called in case of a non ReportQuery * instance. */ private void addFetchJoins(ObjectLevelReadQuery theQuery, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes != null) { for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); theQuery.addJoinedAttribute(node.generateExpression(context)); } } }
/** * INTERNAL * Add the variable as ReportQuery item. The method checks for any JOIN * FETCH nodes of the current variable and adds them as part of the * ReportQuery item. */ private void addAttributeWithFetchJoins(ReportQuery reportQuery, Expression expression, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes == null) { reportQuery.addAttribute(name, expression); } else { List fetchJoinExprs = new ArrayList(fetchJoinNodes.size()); for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); fetchJoinExprs.add(node.generateExpression(context)); } reportQuery.addItem(name, expression, fetchJoinExprs); } }
/** * INTERNAL * Check for any JOIN FETCH nodes of the current variable and add them as * joined attributes. This method is called in case of a non ReportQuery * instance. */ private void addFetchJoins(ObjectLevelReadQuery theQuery, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes != null) { for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); theQuery.addJoinedAttribute(node.generateExpression(context)); } } }
/** * INTERNAL * Check for any JOIN FETCH nodes of the current variable and add them as * joined attributes. This method is called in case of a non ReportQuery * instance. */ private void addFetchJoins(ObjectLevelReadQuery theQuery, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes != null) { for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); theQuery.addJoinedAttribute(node.generateExpression(context)); } } }
/** * INTERNAL * Add the variable as ReportQuery item. The method checks for any JOIN * FETCH nodes of the current variable and adds them as part of the * ReportQuery item. */ private void addAttributeWithFetchJoins(ReportQuery reportQuery, Expression expression, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes == null) { reportQuery.addAttribute(name, expression); } else { List fetchJoinExprs = new ArrayList(fetchJoinNodes.size()); for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); fetchJoinExprs.add(node.generateExpression(context)); } reportQuery.addItem(name, expression, fetchJoinExprs); } }
/** * INTERNAL * Add the variable as ReportQuery item. The method checks for any JOIN * FETCH nodes of the current variable and adds them as part of the * ReportQuery item. */ private void addAttributeWithFetchJoins(ReportQuery reportQuery, Expression expression, GenerationContext context) { String name = getCanonicalVariableName(); List fetchJoinNodes = context.getParseTreeContext().getFetchJoins(name); if (fetchJoinNodes == null) { reportQuery.addAttribute(name, expression); } else { List fetchJoinExprs = new ArrayList(fetchJoinNodes.size()); for (Iterator i = fetchJoinNodes.iterator(); i.hasNext(); ) { Node node = (Node)i.next(); fetchJoinExprs.add(node.generateExpression(context)); } reportQuery.addItem(name, expression, fetchJoinExprs); } }