Im building a DefaultDynaBeanAdapter valuelist, that has a parameter, customerId which is an integer. I was getting a class cast exception when generating the preparedStatement, my integer parameter value was being casted to a String by the Stringsetter which im assuming is the default setter. My question is how is the setter determined? and if the parameter value is of type Integer. I hacked the StringSetter to handle integers
if (value.getClass().equals(Integer.class)){
query.setString(index++, value.toString());
} else{
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Im building a DefaultDynaBeanAdapter valuelist, that has a parameter, customerId which is an integer. I was getting a class cast exception when generating the preparedStatement, my integer parameter value was being casted to a String by the Stringsetter which im assuming is the default setter. My question is how is the setter determined? and if the parameter value is of type Integer. I hacked the StringSetter to handle integers
if (value.getClass().equals(Integer.class)){
query.setString(index++, value.toString());
} else{
}