use of org.apache.commons.collections4.map.CaseInsensitiveMap in project sharding-jdbc by dangdangdotcom.
the class AbstractResultSetAdapter method generateColumnLabelIndexMap.
private Map<String, Integer> generateColumnLabelIndexMap() throws SQLException {
ResultSetMetaData resultSetMetaData = resultSets.get(0).getMetaData();
Map<String, Integer> result = new CaseInsensitiveMap<>(resultSetMetaData.getColumnCount());
for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {
result.put(resultSetMetaData.getColumnLabel(i), i);
}
return result;
}
Aggregations