/** * INTERNAL * Check the left child node for an unqualified field access. The method * delegates to the left most expression of multi-navigation path * expression. */ public Node qualifyAttributeAccess(ParseTreeContext context) { if (getLeft() != null) { setLeft(getLeft().qualifyAttributeAccess(context)); } return this; }
/** * INTERNAL * Check the left child node for an unqualified field access. The method * delegates to the left most expression of multi-navigation path * expression. */ public Node qualifyAttributeAccess(ParseTreeContext context) { if (getLeft() != null) { setLeft(getLeft().qualifyAttributeAccess(context)); } return this; }
/** * INTERNAL * Check the left child node for an unqualified field access. The method * delegates to the left most expression of multi-navigation path * expression. */ public Node qualifyAttributeAccess(ParseTreeContext context) { if (getLeft() != null) { setLeft(getLeft().qualifyAttributeAccess(context)); } return this; }
/** * INTERNAL * Answer the mapping resulting from traversing the receiver's nodes */ public DatabaseMapping resolveMapping(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveMapping(context, leftClass); }
/** * resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes */ public Class resolveClass(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveClass(context, leftClass); }
/** * INTERNAL * Answer the mapping resulting from traversing the receiver's nodes */ public DatabaseMapping resolveMapping(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveMapping(context, leftClass); }
/** * resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes */ public Class resolveClass(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveClass(context, leftClass); }
/** * resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes */ public Class resolveClass(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveClass(context, leftClass); }
/** * INTERNAL * Answer the mapping resulting from traversing the receiver's nodes */ public DatabaseMapping resolveMapping(GenerationContext context) { Class leftClass = getLeft().resolveClass(context); return getRight().resolveMapping(context, leftClass); }
/** * INTERNAL * Generate the EclipseLink expression for this node */ public Expression generateExpression(GenerationContext context) { DotNode dotNode = (DotNode)getLeft(); Node prefix = dotNode.getLeft(); String variableName = ((AttributeNode)dotNode.getRight()).getAttributeName(); // check whether variable denotes a collection valued field if (!dotNode.endsWithCollectionField(context)) { throw JPQLException.invalidSizeArgument( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), variableName); } Expression whereClause = prefix.generateExpression(context); whereClause = whereClause.size(variableName); return whereClause; }
/** * INTERNAL * Generate the EclipseLink expression for this node */ public Expression generateExpression(GenerationContext context) { DotNode dotNode = (DotNode)getLeft(); Node prefix = dotNode.getLeft(); String variableName = ((AttributeNode)dotNode.getRight()).getAttributeName(); // check whether variable denotes a collection valued field if (!dotNode.endsWithCollectionField(context)) { throw JPQLException.invalidSizeArgument( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), variableName); } Expression whereClause = prefix.generateExpression(context); whereClause = whereClause.size(variableName); return whereClause; }
/** * INTERNAL * Generate the EclipseLink expression for this node */ public Expression generateExpression(GenerationContext context) { DotNode dotNode = (DotNode)getLeft(); Node prefix = dotNode.getLeft(); String variableName = ((AttributeNode)dotNode.getRight()).getAttributeName(); // check whether variable denotes a collection valued field if (!dotNode.endsWithCollectionField(context)) { throw JPQLException.invalidSizeArgument( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), variableName); } Expression whereClause = prefix.generateExpression(context); whereClause = whereClause.size(variableName); return whereClause; }
/** * INTERNAL * Return a TopLink expression by getting the required variables using the * left and right nodes * "emp.address.city" = builder.get("address").get("city") */ public Expression generateExpression(GenerationContext context) { Node right = getRight(); if (enumConstant != null) { // enum literal access return new ConstantExpression(enumConstant, new ExpressionBuilder()); } else { // Get the left expression Expression whereClause = getLeft().generateExpression(context); // Calculate the mapping and pass it to the right expression if (right.isAttributeNode()) { ((AttributeNode)right).setMapping(resolveMapping(context)); } // Or it with whatever the right expression is whereClause = right.addToExpression(whereClause, context); if (alias != null){ context.addExpression(whereClause, alias); } // and return the expression... return whereClause; } }
/** * INTERNAL * Return a TopLink expression by getting the required variables using the * left and right nodes * "emp.address.city" = builder.get("address").get("city") */ public Expression generateExpression(GenerationContext context) { Node right = getRight(); if (enumConstant != null) { // enum literal access return new ConstantExpression(enumConstant, new ExpressionBuilder()); } else { // Get the left expression Expression whereClause = getLeft().generateExpression(context); // Calculate the mapping and pass it to the right expression if (right.isAttributeNode()) { ((AttributeNode)right).setMapping(resolveMapping(context)); } // Or it with whatever the right expression is whereClause = right.addToExpression(whereClause, context); if (alias != null){ context.addExpression(whereClause, alias); } // and return the expression... return whereClause; } }