Here you can find the source of addValuesToPreparedStatement(PreparedStatement preparedStatement, List values)
public static void addValuesToPreparedStatement(PreparedStatement preparedStatement, List values) throws SQLException
//package com.java2s; /*//from w ww. j a v a2s .com * Copyright 2000-2011 Enonic AS * http://www.enonic.com/license */ import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Iterator; import java.util.List; public class Main { public static void addValuesToPreparedStatement(PreparedStatement preparedStatement, List values) throws SQLException { int i = 1; for (Iterator iter = values.iterator(); iter.hasNext(); i++) { Object paramValue = iter.next(); preparedStatement.setObject(i, paramValue); } } }