Polished the support for looking up column values by column label (SPR-7506)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3663 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
4be9b83c31
commit
cd7aece559
|
|
@ -131,13 +131,13 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet {
|
||||||
*/
|
*/
|
||||||
public int findColumn(String columnLabel) throws InvalidResultSetAccessException {
|
public int findColumn(String columnLabel) throws InvalidResultSetAccessException {
|
||||||
Integer columnIndex = columnLabelMap.get(columnLabel);
|
Integer columnIndex = columnLabelMap.get(columnLabel);
|
||||||
try {
|
if (columnIndex == null) {
|
||||||
if (columnIndex == null) {
|
try {
|
||||||
columnIndex = this.resultSet.findColumn(columnLabel);
|
columnIndex = this.resultSet.findColumn(columnLabel);
|
||||||
}
|
}
|
||||||
}
|
catch (SQLException se) {
|
||||||
catch (SQLException se) {
|
throw new InvalidResultSetAccessException(se);
|
||||||
throw new InvalidResultSetAccessException(se);
|
}
|
||||||
}
|
}
|
||||||
return columnIndex.intValue();
|
return columnIndex.intValue();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue