whereClause = whereClause.in(reportQuery); } else if (isListParameterOrSubquery && firstArg.isParameterNode()) { if (notIndicated()) { whereClause = whereClause.notIn(firstArg.generateExpression(context));
whereClause = whereClause.in(reportQuery); } else if (isListParameterOrSubquery && firstArg.isParameterNode()) { if (notIndicated()) { whereClause = whereClause.notIn(firstArg.generateExpression(context));
whereClause = whereClause.in(reportQuery); } else if (isListParameterOrSubquery && firstArg.isParameterNode()) { if (notIndicated()) { whereClause = whereClause.notIn(firstArg.generateExpression(context));
/** * INTERNAL * Validate the current node and calculates its type. */ public void validate(ParseTreeContext context) { Object leftType = null; TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); // check to see if the argument is a parameter if (isListParameterOrSubquery && !getTheObjects().isEmpty() && ((Node)getTheObjects().get(0)).isParameterNode()){ leftType = Collection.class; } else { leftType = left.getType(); } } for (Iterator i = getTheObjects().iterator(); i.hasNext();) { Node node = (Node)i.next(); node.validate(context); node.validateParameter(context, leftType); Object nodeType = node.getType(); if ((leftType != null) && !typeHelper.isAssignableFrom(leftType, nodeType)) throw JPQLException.invalidExpressionArgument( context.getQueryInfo(), node.getLine(), node.getColumn(), "IN", node.getAsString(), typeHelper.getTypeName(leftType)); } setType(typeHelper.getBooleanType()); }
/** * INTERNAL * Validate the current node and calculates its type. */ public void validate(ParseTreeContext context) { Object leftType = null; TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); // check to see if the argument is a parameter if (isListParameterOrSubquery && !getTheObjects().isEmpty() && ((Node)getTheObjects().get(0)).isParameterNode()){ leftType = Collection.class; } else { leftType = left.getType(); } } for (Iterator i = getTheObjects().iterator(); i.hasNext();) { Node node = (Node)i.next(); node.validate(context); node.validateParameter(context, leftType); Object nodeType = node.getType(); if ((leftType != null) && !typeHelper.isAssignableFrom(leftType, nodeType)) throw JPQLException.invalidExpressionArgument( context.getQueryInfo(), node.getLine(), node.getColumn(), "IN", node.getAsString(), typeHelper.getTypeName(leftType)); } setType(typeHelper.getBooleanType()); }
/** * INTERNAL * Validate the current node and calculates its type. */ public void validate(ParseTreeContext context) { Object leftType = null; TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); // check to see if the argument is a parameter if (isListParameterOrSubquery && !getTheObjects().isEmpty() && ((Node)getTheObjects().get(0)).isParameterNode()){ leftType = Collection.class; } else { leftType = left.getType(); } } for (Iterator i = getTheObjects().iterator(); i.hasNext();) { Node node = (Node)i.next(); node.validate(context); node.validateParameter(context, leftType); Object nodeType = node.getType(); if ((leftType != null) && !typeHelper.isAssignableFrom(leftType, nodeType)) throw JPQLException.invalidExpressionArgument( context.getQueryInfo(), node.getLine(), node.getColumn(), "IN", node.getAsString(), typeHelper.getTypeName(leftType)); } setType(typeHelper.getBooleanType()); }
public Expression generateExpression(GenerationContext context) { // Need to make sure one of the node is marked as a one to many if (getRight().isParameterNode()) { makeNodeOneToMany(getLeft()); } else { makeNodeOneToMany(getRight()); } //Handle NOT. Store the expression for the left, let VariableNode handle it. if (notIndicated()) { Expression resultFromRight = null; context.setMemberOfNode(this); this.setLeftExpression(getLeft().generateExpression(context)); resultFromRight = getRight().generateExpression(context); //clean up context.setMemberOfNode(null); this.setLeftExpression(null); return resultFromRight; } else { //otherwise, handle like normal anyOf() return getRight().generateExpression(context).equal(getLeft().generateExpression(context)); } }
public Expression generateExpression(GenerationContext context) { // Need to make sure one of the node is marked as a one to many if (getRight().isParameterNode()) { makeNodeOneToMany(getLeft()); } else { makeNodeOneToMany(getRight()); } //Handle NOT. Store the expression for the left, let VariableNode handle it. if (notIndicated()) { Expression resultFromRight = null; context.setMemberOfNode(this); this.setLeftExpression(getLeft().generateExpression(context)); resultFromRight = getRight().generateExpression(context); //clean up context.setMemberOfNode(null); this.setLeftExpression(null); return resultFromRight; } else { //otherwise, handle like normal anyOf() return getRight().generateExpression(context).equal(getLeft().generateExpression(context)); } }
public Expression generateExpression(GenerationContext context) { // Need to make sure one of the node is marked as a one to many if (getRight().isParameterNode()) { makeNodeOneToMany(getLeft()); } else { makeNodeOneToMany(getRight()); } //Handle NOT. Store the expression for the left, let VariableNode handle it. if (notIndicated()) { Expression resultFromRight = null; context.setMemberOfNode(this); this.setLeftExpression(getLeft().generateExpression(context)); resultFromRight = getRight().generateExpression(context); //clean up context.setMemberOfNode(null); this.setLeftExpression(null); return resultFromRight; } else { //otherwise, handle like normal anyOf() return getRight().generateExpression(context).equal(getLeft().generateExpression(context)); } }