{
m = r.getMetaData();
}
catch (SQLException e)
{
throw new ResultSetException("Unable to obtain metadata from result set", e);
}
try
{
for (int i = 1; i <= m.getColumnCount(); i ++)
{
String key = m.getColumnName(i);
String alias = m.getColumnLabel(i);
Object value = r.getObject(i);
row.put(alias != null ? alias : key, value);
}
}
catch (SQLException e)
{
throw new ResultSetException("Unable to access specific metadata from " +
"result set metadata", e);
}
return row;
}