/** * Creates a copy of this expression node, without copying children. */ @Override public Expression shallowCopy() { return new ASTIn(id); }
/** * Creates a copy of this expression node, without copying children. */ public Expression shallowCopy() { return new ASTIn(id); }
/** * @since 4.0 * @see ExpressionFactory#inExp(String, Collection) */ static Expression inExp(Expression exp, Collection<?> values) { if (values.isEmpty()) { return new ASTFalse(); } if(!(exp instanceof SimpleNode)) { throw new IllegalArgumentException("exp should be instance of SimpleNode"); } return new ASTIn((SimpleNode)exp, new ASTList(values)); }
Expression trimmedInExpression(ASTPath path, Object[] values, int maxInSize) { Expression res = null; List<Object> in = new ArrayList<>(maxInSize); for (Object v : values) { in.add(v); if (in.size() == maxInSize) { Expression inExp = new ASTIn(path, new ASTList(in)); res = res != null ? res.orExp(inExp) : inExp; in = new ArrayList<>(maxInSize); } } if (in.size() > 0) { Expression inExp = new ASTIn(path, new ASTList(in)); res = res != null ? res.orExp(inExp) : inExp; } return res; }
/** * @since 4.0 * @see ExpressionFactory#inExp(String, Object[]) */ static Expression inExp(Expression exp, Object... values) { if (values.length == 0) { return new ASTFalse(); } if(!(exp instanceof SimpleNode)) { throw new IllegalArgumentException("exp should be instance of SimpleNode"); } return new ASTIn((SimpleNode)exp, new ASTList(values)); }
/** * A convenience shortcut for building IN DB expression. Return ASTFalse for * empty collection. */ public static Expression inDbExp(String pathSpec, Collection<?> values) { if (values.isEmpty()) { return new ASTFalse(); } return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values)); }
/** * A convenience shortcut for building IN DB expression. */ public static Expression inDbExp(String pathSpec, Collection values) { return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values)); }
/** * A convenience shortcut for building IN expression. */ public static Expression inExp(String pathSpec, Collection values) { return new ASTIn(new ASTObjPath(pathSpec), new ASTList(values)); }
/** * A convenience shortcut for building IN DB expression. */ public static Expression inDbExp(String pathSpec, Object[] values) { return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values)); }
/** * A convenience shortcut for building IN expression. */ public static Expression inExp(String pathSpec, Object[] values) { return new ASTIn(new ASTObjPath(pathSpec), new ASTList(values)); }
/** * A convenience shortcut for building IN DB expression. Return ASTFalse for * empty collection. */ public static Expression inDbExp(String pathSpec, Object... values) { if (values.length == 0) { return new ASTFalse(); } return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values)); }
SelectQuery sel = new SelectQuery(destEnt, new ASTIn(dbpath, listExp)); sel.setFetchingDataRows(true); List results = context.performQuery(sel);
case 15: jj_consume_token(15); ASTIn jjtn009 = new ASTIn(JJTIN); boolean jjtc009 = true; jjtree.openNodeScope(jjtn009);
case 15: jj_consume_token(15); ASTIn jjtn011 = new ASTIn(JJTIN); boolean jjtc011 = true; jjtree.openNodeScope(jjtn011);