/** * Apply a predicate to test whether the expression is a member * of the collection. * @param values collection * @return predicate testing for membership */ public Predicate in(Collection<?> values) { List list = new ArrayList(); list.add(this); return new CompoundExpressionImpl(this.metamodel, this.currentNode.in(values), list, "in"); } /**
public Predicate in(Object... values) { List list = new ArrayList(); list.add(this); return new CompoundExpressionImpl(this.metamodel, this.currentNode.in(values), list, "in"); }
/** * Apply a predicate to test whether the expression is a member * of the collection. * @param values expression corresponding to collection * @return predicate testing for membership */ public Predicate in(Expression<Collection<?>> values) { List list = new ArrayList(); list.add(this); return new CompoundExpressionImpl(this.metamodel, this.currentNode.in(((InternalSelection)values).getCurrentNode()), list, "in"); }
/** * Apply a predicate to test whether the expression is a member * of the argument list. * @param values * @return predicate testing for membership */ public Predicate in(Expression<?>... values) { List list = new ArrayList(); list.add(this); for (Expression exp: values){ if (!((InternalExpression)exp).isLiteral() && !((InternalExpression) exp).isParameter()){ Object[] params = new Object[]{exp}; throw new IllegalArgumentException(ExceptionLocalization.buildMessage("CRITERIA_NON_LITERAL_PASSED_TO_IN",params)); } } return new CompoundExpressionImpl(this.metamodel, this.currentNode.in(values), list, "in"); }