Here you can find the source of createEntireInStatement(List
public static String createEntireInStatement(List<String> values)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String createEntireInStatement(List<String> values) { StringBuilder builder = new StringBuilder(" IN ("); for (String value : values) { builder.append("'" + value + "',"); }/*from w ww . j a v a 2 s . c o m*/ return builder.subSequence(0, builder.length() - 1).toString() + ")"; } }