@@ -0,0 +1,1097 @@
+package com.itrustcambodia.pluggable.database;%0A%0Aimport java.sql.ResultSet;%0Aimport java.sql.ResultSetMetaData;%0Aimport java.sql.SQLException;%0Aimport java.util.Map;%0A%0Aimport org.springframework.jdbc.core.RowMapper;%0Aimport org.springframework.jdbc.support.JdbcUtils;%0Aimport org.springframework.util.LinkedCaseInsensitiveMap;%0A%0Apublic class ColumnMapRowMapper implements RowMapper%3CMap%3CString, Object%3E%3E %7B%0A%0A    public Map%3CString, Object%3E mapRow(ResultSet rs, int rowNum) throws SQLException %7B%0A        ResultSetMetaData rsmd = rs.getMetaData();%0A        int columnCount = rsmd.getColumnCount();%0A        Map%3CString, Object%3E mapOfColValues = createColumnMap(columnCount * 2);%0A        for (int i = 1; i %3C= columnCount; i++) %7B%0A            String key = rsmd.getTableName(i) + %22.%22 + JdbcUtils.lookupColumnName(rsmd, i);%0A            Object obj = JdbcUtils.getResultSetValue(rs, i);%0A            mapOfColValues.put(key, obj);%0A        %7D%0A        return mapOfColValues;%0A    %7D%0A%0A    protected Map%3CString, Object%3E createColumnMap(int columnCount) %7B%0A        return new LinkedCaseInsensitiveMap%3CObject%3E(columnCount);%0A    %7D%0A%0A%7D

add row mapper support table name as a prefix, use for join