protected void readBeanField(ResultSet resultSet, Object bean, String field)
throws SQLException {
String resultSetColumnName = (String) this.beanToResultSetMapping
.get(field);
Converter deconverter = (Converter) this.beanDeconverters.get(field);
log.debug("Reading VO field '" + field + "' from ResultSet column '"
+ resultSetColumnName + "'.");
Class valueType;
if (deconverter != null) {
valueType = deconverter.getDestinationType();
} else {
valueType = this.beanMapper.getBeanFieldType(field);
}
Object value = this.resultSetReader.readFromResultSet(
resultSetColumnName, resultSet, valueType);
if (deconverter != null) {
value = deconverter.reverseConvert(value);
}
this.beanMapper.setBeanFieldValue(bean, field, value);
log.debug("Read VO field '" + field + "' from ResultSet column '"
+ resultSetColumnName + "' with value '" + value + "'.");