/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <blockquote><pre> * EclipseLink: employee.get("age").in(ages) * Java: ages.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </pre></blockquote> */ public Expression in(Collection theObjects) { return in(new CollectionExpression(theObjects, this)); }
/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * The collection can be a collection of constants or expressions. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <blockquote><pre> * EclipseLink: employee.get("age").in(ages) * Java: ages.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </pre></blockquote> */ public Expression notIn(Collection theObjects) { return notIn(new CollectionExpression(theObjects, this)); }
/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <blockquote><pre> * EclipseLink: employee.get("age").in(ages) * Java: ages.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </pre></blockquote> */ public Expression in(Collection theObjects) { return in(new CollectionExpression(theObjects, this)); }
/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * The collection can be a collection of constants or expressions. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <blockquote><pre> * EclipseLink: employee.get("age").in(ages) * Java: ages.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </pre></blockquote> */ public Expression notIn(Collection theObjects) { return notIn(new CollectionExpression(theObjects, this)); }
/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <pre><blockquote> * TopLink: employee.get("age").in(agesVector) * Java: agesVector.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </blockquote></pre> */ public Expression in(Collection theObjects) { return in(new CollectionExpression(theObjects, this)); }
/** * PUBLIC: * Return an expression that checks if the receivers value is contained in the collection. * The collection can be a collection of constants or expressions. * This is equivalent to the SQL "IN" operator and Java "contains" operator. * <p>Example: * <pre><blockquote> * TopLink: employee.get("age").in(agesVector) * Java: agesVector.contains(employee.getAge()) * SQL: AGE IN (55, 18, 30) * </blockquote></pre> */ public Expression notIn(Collection theObjects) { return notIn(new CollectionExpression(theObjects, this)); }
/** * {@inheritDoc} */ @Override public void visit(CollectionExpression expression) { // Assume this is a nested array List<Expression> children = new LinkedList<Expression>(); for (org.eclipse.persistence.jpa.jpql.parser.Expression child : expression.children()) { child.accept(this); children.add(queryExpression); } queryExpression = new org.eclipse.persistence.internal.expressions.CollectionExpression(children, queryContext.getBaseExpression()); }
/** * {@inheritDoc} */ @Override public void visit(CollectionExpression expression) { // Assume this is a nested array List<Expression> children = new LinkedList<Expression>(); for (org.eclipse.persistence.jpa.jpql.parser.Expression child : expression.children()) { child.accept(this); children.add(queryExpression); } queryExpression = new org.eclipse.persistence.internal.expressions.CollectionExpression(children, queryContext.getBaseExpression()); }