Here you can find the source of createParameterizedWhereClause(Collection> columns)
static String createParameterizedWhereClause(Collection<?> columns)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Iterator; public class Main { static String createParameterizedWhereClause(Collection<?> columns) { StringBuilder builder = new StringBuilder(); builder.append(" WHERE "); Iterator<?> iter = columns.iterator(); while (iter.hasNext()) { Object column = iter.next(); builder.append(column + " = ?"); if (iter.hasNext()) { builder.append(" AND "); }/*from ww w . j av a2s.com*/ } return builder.toString(); } }