Here you can find the source of fillRowNames(Map
private static void fillRowNames(Map<String, Integer> metaData, ResultSet rs) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; import java.util.Map; import org.springframework.util.Assert; public class Main { private static void fillRowNames(Map<String, Integer> metaData, ResultSet rs) throws SQLException { Assert.notNull(metaData, "The column names can't be null."); if (metaData.isEmpty()) { for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) { metaData.put(rs.getMetaData().getColumnName(i), rs.getMetaData().getColumnType(i)); }/*from w w w .ja v a 2 s . c o m*/ } } }