Here you can find the source of setValues(PreparedStatement statement, Object... values)
public static boolean setValues(PreparedStatement statement, Object... values)
//package com.java2s; //License from project: Open Source License import java.sql.PreparedStatement; import java.sql.SQLException; public class Main { public static boolean setValues(PreparedStatement statement, Object... values) { if (values != null) { for (int i = 0; i < values.length; ++i) { try { statement.setObject(i, values[i]); } catch (SQLException e) { return false; }/*from w ww . j a v a2 s .c o m*/ } } return true; } }