1 21 package net.mlw.vlh.adapter.jdbc.util.setter; 22 23 import java.sql.PreparedStatement ; 24 import java.sql.SQLException ; 25 import java.text.ParseException ; 26 27 32 public class IntegerArraySetter extends AbstractArraySetter 33 { 34 37 public int set(PreparedStatement query, int index, Object value) throws SQLException , ParseException 38 { 39 if (isUseBindVarables()) 40 { 41 String [] values = (value instanceof String []) ? (String []) value : new String [] { (String ) value 42 }; 43 for (int i = 0, length = values.length; i < length; i++) 44 { 45 46 query.setInt(index++, Integer.parseInt(values[i])); 47 } 48 } 49 50 return index; 51 } 52 } | Popular Tags |