{@inheritDoc}

@see jp.co.future.uroborosql.fluent.ExtractionCondition#in(java.lang.String, java.lang.Iterable)
764185
@SuppressWarnings("unchecked")
	@Override
	public T in(final String col, final Iterable<?> valueList) {
		context().param(CaseFormat.CAMEL_CASE.convert(col), new In(col, valueList));
		this.useOperator = true;
		return (T) this;
	}
654840
public <E> TerminalResult IN(DomainObjectMatch<E> domainObjects) {
		DomainObjectMatch<?> delegate = APIAccess.getDelegate(domainObjects);
		DomainObjectMatch<?> match = delegate != null ? delegate : domainObjects;
		getPredicateExpression().setOperator(Operator.IN);
		getPredicateExpression().setValue_2(match);
		TerminalResult ret = APIAccess.createTerminalResult(this.getPredicateExpression());
		QueryRecorder.recordInvocation(this, "IN", ret, QueryRecorder.placeHolder(match));
		return ret;
	}
1083457
@SuppressWarnings("unchecked")
	public <T> SqlBuilder in(String field, T... values) {
		sql.append(wrapper.wrap(field)).append(" IN ").append("(").append(ArrayUtil.join(values, StrUtil.COMMA)).append(")");
		return this;
	}
868645
private Iterable<String> getAllIncluding(String index, Iterable<String> keys, IterableChain<String> result) {
        result.addAll(keys);
        for (String key : keys) {
            Iterable<String> values = get(index, key);
            if (values.iterator().hasNext()) {
                getAllIncluding(index, values, result);
            }
        }
        return result;
    }
1372533
public BooleanExpression in(SubQueryExpression<? extends T> right) {
        return Expressions.booleanOperation(Ops.IN, mixin, right);
    }
350186
public static Query in(String field, Collection<?> values) {
        return new Query().in(field, values);
    }
516787
public void in2in(String in, Object... to) {
        for (Object cmd : to) {
            in2in(in, cmd, in);
        }
    }
1005592
public static Predicates<Object> in(Iterable<?> iterable)
    {
        if (iterable instanceof SetIterable<?>)
        {
            return new InSetIterablePredicate((SetIterable<?>) iterable);
        }
        if (iterable instanceof Set<?>)
        {
            return new InSetPredicate((Set<?>) iterable);
        }
        if (iterable instanceof Collection<?> && ((Collection<?>) iterable).size() <= SMALL_COLLECTION_THRESHOLD)
        {
            return new InCollectionPredicate((Collection<?>) iterable);
        }
        return new InSetIterablePredicate(UnifiedSet.newSet(iterable));
    }
385764
static public String safeSqlQueryStringValue(String in) throws Exception {
		if( null == in ) {
			return "NULL";
		}
		if( in.indexOf('\0') >= 0 ) {
			throw new Exception("Null character found in string value");
		}
		// All quotes should be escaped
		in = in.replace("'", "''");
		
		// Add quotes again
		return "'" + in + "'";
	}
1167742
protected String constructInStringsQuery(String query, Set<String> values) {
        String replace = "IN (?)";
        assert query.lastIndexOf(replace) == query.indexOf(replace);
        String sql = query.replace("IN (?)", "IN (%s)");

        StringBuffer list = new StringBuffer();
        for (String value : values) {
            if (list.length() > 0) {
                list.append(",");
            }
            value = String.format("'%s'", StringEscapeUtils.escapeSql(value));
            list.append(value);
        }

        return String.format(sql, list.toString());
    }
1280301
@Override
	public SqlBatch by(final BiPredicate<SqlContext, Map<String, Object>> condition) {
		this.condition = condition;
		return this;
	}
645282
@Override
    public boolean checkCondition(IValue test) throws FilterException {
        Iterator iter = values.iterator();
        while (iter.hasNext()) {
            IValue value = (IValue) iter.next();
            if (value.containedBy(test)) {
                return true;
            }
        }
        return false;
    }
359924
public List<Map<String, Object>> queryObjJoinDataByPageCondition(String innerSql, int start,int end) {

		/*		JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder
		.getDbSource(dbName);*/
		JdbcTemplate jdbcTemplate = getMicroJdbcTemplate();
		String sql = "";
		String tempType=calcuDbType();
		if(tempType!=null && tempType.equals("mysql")){		
		//if(dbType!=null && dbType.equals("mysql")){
			int pageRows=end-start;
			String limit=start+","+pageRows;
			sql=innerSql+ " limit "+limit;
		}else{
			String startLimit=" WHERE NHPAGE_RN >= "+start;
			String endLimit=" WHERE ROWNUM < "+end;
/*			if(orclEndFlag==false){
				endLimit=" WHERE ROWNUM < "+end;
			}*/
			sql="SELECT * FROM ( SELECT NHPAGE_TEMP.*, ROWNUM NHPAGE_RN FROM ("+ innerSql +" ) NHPAGE_TEMP "+endLimit+" ) "+ startLimit;
		}
		logger.debug(sql);
		List<Map<String, Object>> retList0 = jdbcTemplate.queryForList(sql);
		//add 201807 ning
		//List<Map<String, Object>> retList=changeOutKeyCase4List(retList0);	
		//add 201902 ning
		List<Map<String, Object>> retList=ignoreKeyCase((List)retList0);
		return retList;
	}
566097
public final EventFilterParser.in_predicate_return in_predicate() throws RecognitionException {
        EventFilterParser.in_predicate_return retval = new EventFilterParser.in_predicate_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IN58=null;
        Token char_literal59=null;
        Token STRING60=null;
        Token char_literal61=null;
        Token STRING62=null;
        Token char_literal63=null;
        Token IN65=null;
        Token char_literal66=null;
        Token NUMBER67=null;
        Token char_literal68=null;
        Token NUMBER69=null;
        Token char_literal70=null;
        EventFilterParser.path_function_return path_function57 =null;

        EventFilterParser.path_function_return path_function64 =null;


        CommonTree IN58_tree=null;
        CommonTree char_literal59_tree=null;
        CommonTree STRING60_tree=null;
        CommonTree char_literal61_tree=null;
        CommonTree STRING62_tree=null;
        CommonTree char_literal63_tree=null;
        CommonTree IN65_tree=null;
        CommonTree char_literal66_tree=null;
        CommonTree NUMBER67_tree=null;
        CommonTree char_literal68_tree=null;
        CommonTree NUMBER69_tree=null;
        CommonTree char_literal70_tree=null;
        RewriteRuleTokenStream stream_IN=new RewriteRuleTokenStream(adaptor,"token IN");
        RewriteRuleTokenStream stream_35=new RewriteRuleTokenStream(adaptor,"token 35");
        RewriteRuleTokenStream stream_33=new RewriteRuleTokenStream(adaptor,"token 33");
        RewriteRuleTokenStream stream_34=new RewriteRuleTokenStream(adaptor,"token 34");
        RewriteRuleTokenStream stream_STRING=new RewriteRuleTokenStream(adaptor,"token STRING");
        RewriteRuleTokenStream stream_NUMBER=new RewriteRuleTokenStream(adaptor,"token NUMBER");
        RewriteRuleSubtreeStream stream_path_function=new RewriteRuleSubtreeStream(adaptor,"rule path_function");
        try {
            // EventFilter.g:147:2: ( path_function IN '(' STRING ( ',' STRING )* ')' -> ^( IN path_function ( STRING )+ ) | path_function IN '(' NUMBER ( ',' NUMBER )* ')' -> ^( IN path_function ( NUMBER )+ ) )
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==XPATH_FUN_NAME) ) {
                int LA10_1 = input.LA(2);

                if ( (LA10_1==33) ) {
                    int LA10_2 = input.LA(3);

                    if ( (LA10_2==STRING) ) {
                        int LA10_3 = input.LA(4);

                        if ( (LA10_3==34) ) {
                            int LA10_4 = input.LA(5);

                            if ( (LA10_4==IN) ) {
                                int LA10_5 = input.LA(6);

                                if ( (LA10_5==33) ) {
                                    int LA10_6 = input.LA(7);

                                    if ( (LA10_6==STRING) ) {
                                        alt10=1;
                                    }
                                    else if ( (LA10_6==NUMBER) ) {
                                        alt10=2;
                                    }
                                    else {
                                        NoViableAltException nvae =
                                            new NoViableAltException("", 10, 6, input);

                                        throw nvae;

                                    }
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 10, 5, input);

                                    throw nvae;

                                }
                            }
                            else {
                                NoViableAltException nvae =
                                    new NoViableAltException("", 10, 4, input);

                                throw nvae;

                            }
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 10, 3, input);

                            throw nvae;

                        }
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 10, 2, input);

                        throw nvae;

                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 10, 1, input);

                    throw nvae;

                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 10, 0, input);

                throw nvae;

            }
            switch (alt10) {
                case 1 :
                    // EventFilter.g:147:4: path_function IN '(' STRING ( ',' STRING )* ')'
                    {
                    pushFollow(FOLLOW_path_function_in_in_predicate796);
                    path_function57=path_function();

                    state._fsp--;

                    stream_path_function.add(path_function57.getTree());

                    IN58=(Token)match(input,IN,FOLLOW_IN_in_in_predicate798);
                    stream_IN.add(IN58);


                    char_literal59=(Token)match(input,33,FOLLOW_33_in_in_predicate800);
                    stream_33.add(char_literal59);


                    STRING60=(Token)match(input,STRING,FOLLOW_STRING_in_in_predicate802);
                    stream_STRING.add(STRING60);


                    // EventFilter.g:147:32: ( ',' STRING )*
                    loop8:
                    do {
                        int alt8=2;
                        int LA8_0 = input.LA(1);

                        if ( (LA8_0==35) ) {
                            alt8=1;
                        }


                        switch (alt8) {
                    	case 1 :
                    	    // EventFilter.g:147:33: ',' STRING
                    	    {
                    	    char_literal61=(Token)match(input,35,FOLLOW_35_in_in_predicate805);
                    	    stream_35.add(char_literal61);


                    	    STRING62=(Token)match(input,STRING,FOLLOW_STRING_in_in_predicate807);
                    	    stream_STRING.add(STRING62);


                    	    }
                    	    break;

                    	default :
                    	    break loop8;
                        }
                    } while (true);


                    char_literal63=(Token)match(input,34,FOLLOW_34_in_in_predicate811);
                    stream_34.add(char_literal63);


                    // AST REWRITE
                    // elements: IN, STRING, path_function
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 147:50: -> ^( IN path_function ( STRING )+ )
                    {
                        // EventFilter.g:147:53: ^( IN path_function ( STRING )+ )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        new StringInTreeNode(stream_IN.nextToken())
                        , root_1);

                        adaptor.addChild(root_1, stream_path_function.nextTree());

                        if ( !(stream_STRING.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_STRING.hasNext() ) {
                            adaptor.addChild(root_1,
                            new StringTreeNode(stream_STRING.nextToken())
                            );

                        }
                        stream_STRING.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;
                case 2 :
                    // EventFilter.g:148:3: path_function IN '(' NUMBER ( ',' NUMBER )* ')'
                    {
                    pushFollow(FOLLOW_path_function_in_in_predicate836);
                    path_function64=path_function();

                    state._fsp--;

                    stream_path_function.add(path_function64.getTree());

                    IN65=(Token)match(input,IN,FOLLOW_IN_in_in_predicate838);
                    stream_IN.add(IN65);


                    char_literal66=(Token)match(input,33,FOLLOW_33_in_in_predicate840);
                    stream_33.add(char_literal66);


                    NUMBER67=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_in_predicate842);
                    stream_NUMBER.add(NUMBER67);


                    // EventFilter.g:148:31: ( ',' NUMBER )*
                    loop9:
                    do {
                        int alt9=2;
                        int LA9_0 = input.LA(1);

                        if ( (LA9_0==35) ) {
                            alt9=1;
                        }


                        switch (alt9) {
                    	case 1 :
                    	    // EventFilter.g:148:32: ',' NUMBER
                    	    {
                    	    char_literal68=(Token)match(input,35,FOLLOW_35_in_in_predicate845);
                    	    stream_35.add(char_literal68);


                    	    NUMBER69=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_in_predicate847);
                    	    stream_NUMBER.add(NUMBER69);


                    	    }
                    	    break;

                    	default :
                    	    break loop9;
                        }
                    } while (true);


                    char_literal70=(Token)match(input,34,FOLLOW_34_in_in_predicate851);
                    stream_34.add(char_literal70);


                    // AST REWRITE
                    // elements: NUMBER, path_function, IN
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 148:49: -> ^( IN path_function ( NUMBER )+ )
                    {
                        // EventFilter.g:148:52: ^( IN path_function ( NUMBER )+ )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        new NumericInTreeNode(stream_IN.nextToken())
                        , root_1);

                        adaptor.addChild(root_1, stream_path_function.nextTree());

                        if ( !(stream_NUMBER.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_NUMBER.hasNext() ) {
                            adaptor.addChild(root_1,
                            new NumberTreeNode(stream_NUMBER.nextToken())
                            );

                        }
                        stream_NUMBER.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
66771
static public String safeSqlQueryIdentifier(String in) throws Exception {
		if( null == in ) {
			throw new Exception("Null string passed as identifier");
		}
		if( in.indexOf('\0') >= 0 ) {
			throw new Exception("Null character found in identifier");
		}
		
		// All quotes should be escaped
		in = in.replace("\"", "\"\"");
		
		in = "\"" + in + "\"";

		return in;
	}
373136
@Override
	public Collection<T> find(final SearchTerm[] terms, JiteratorFilter<T> filter,
			Boolean orderDesc, String... orderFields)
			throws PersistenceException {

		PopulatorThread<T> populator;

		populator = new PopulatorThread<T>(new JiteratorPopulator<T>() {
			public void populate(Jiterator<T> iterator) throws PersistenceException {
				ResultSet rs = null;
				try {             
					String index = null;
					String[] values = new String[terms.length];
					FindOperator operator = null;

					for (int i = 0; i < terms.length; i++) {
						// since no other way to get index, just assume column
						index = terms[i].getColumn(); 
						values[i] = terms[i].getValue().toString();		
						
						switch (terms[i].getOperator()) {
							case EQUALS: operator = FindOperator.EQ; break;
							case GREATER_THAN: operator = FindOperator.GT; break;
							case GREATER_THAN_OR_EQUAL_TO: operator = FindOperator.GE; break;
							case LESS_THAN: operator = FindOperator.LT; break;
							case LESS_THAN_OR_EQUAL_TO: operator = FindOperator.LE; break;
							default: throw new PersistenceException("Operator " + operator + " not supported!");							
						}						
					}

					// open a session to retrieve the primary key of the table by the values of the specified index
					rs = getSession(index, getPrimaryKeyField()).find(values, operator, 1, 0);

					// for each row, get the object from cache
					while (rs.next()) {
						T object = get(getValue(getPrimaryKeyField(), 1, rs));
						if (object != null) {
							iterator.push(object);
						}
					}
				} catch (Exception e) {
					throw new PersistenceException(e.getMessage());
				} finally {
					try {
						rs.close();
					} catch (SQLException e) {
						throw new PersistenceException(e.getMessage());
					}
				}
			}
		});
		populator.populate();
		return populator.getResult();
	}
490315
public void parse(CharSequence in, Appendable out) throws IOException, HttpErrorPage {
        ParserContextImpl ctx = new ParserContextImpl(out, httpRequest, httpResponse);
        Matcher matcher = pattern.matcher(in);
        int currentPosition = 0;
        while (matcher.find()) {
            String tag = matcher.group();
            ctx.characters(in, currentPosition, matcher.start());
            currentPosition = matcher.end();
            if (ctx.isCurrentTagEnd(tag)) {
                // check if this is the end tag for current element
                LOG.info("Processing end tag {}", tag);
                ctx.endElement(tag);
            } else {
                // if not, it is an opening tag for a new element
                LOG.info("Processing start tag {}", tag);
                ElementType type = null;
                for (ElementType t : elementTypes) {
                    if (t.isStartTag(tag)) {
                        type = t;
                        break;
                    }
                }
                Element element = type.newInstance();
                ctx.startElement(type, element, tag);
                if (type.isSelfClosing(tag)) {
                    ctx.endElement(tag);
                }

            }
        }
        // we reached the end of input
        ctx.characters(in, currentPosition, in.length());
    }