Here you can find the source of getEntityMap(ResultSet rs, ResultSetMetaData rsmd)
public static Map<String, Object> getEntityMap(ResultSet rs, ResultSetMetaData rsmd) throws SQLException
//package com.java2s; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, Object> getEntityMap(ResultSet rs, ResultSetMetaData rsmd) throws SQLException { Map<String, Object> entity = new HashMap<>(); int colCount = rsmd.getColumnCount(); for (int i = 0; i < colCount; i++) { String colName = rsmd.getColumnLabel(i + 1).toUpperCase(); Object colValue = rs.getObject(colName); entity.put(colName, colValue); }/*from ww w . j a v a2s .c om*/ return entity; } }