DATAJDBC-186 - Polishing.
JavaDoc.
This commit is contained in:
committed by
Greg Turnquist
parent
f7274a2efa
commit
46f65149b8
@@ -101,6 +101,16 @@ public class EntityRowMapper<T> implements RowMapper<T> {
|
||||
return instantiator.createInstance(entity, new ResultSetParameterValueProvider(rs, entity, conversions, ""));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read a single value or a complete Entity from the {@link ResultSet} passed as an argument.
|
||||
*
|
||||
* @param resultSet the {@link ResultSet} to extract the value from. Must not be {@code null}.
|
||||
* @param property the {@link JdbcPersistentProperty} for which the value is intended. Must not be {@code null}.
|
||||
* @param prefix to be used for all column names accessed by this method. Must not be {@code null}.
|
||||
*
|
||||
* @return the value read from the {@link ResultSet}. May be {@code null}.
|
||||
*/
|
||||
private Object readFrom(ResultSet resultSet, JdbcPersistentProperty property, String prefix) {
|
||||
|
||||
try {
|
||||
@@ -110,6 +120,7 @@ public class EntityRowMapper<T> implements RowMapper<T> {
|
||||
}
|
||||
|
||||
return resultSet.getObject(prefix + property.getColumnName());
|
||||
|
||||
} catch (SQLException o_O) {
|
||||
throw new MappingException(String.format("Could not read property %s from result set!", property), o_O);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user