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 LongArraySetter 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 query.setLong(index++, Long.parseLong(values[i])); 46 } 47 } 48 49 return index; 50 } 51 } | Popular Tags |