static public Map < String , ColumnMetaData > createMapByLabelOrName ( ResultSetMetaData m ) throws SQLException { Map < String , ColumnMetaData > result = new HashMap < String , ColumnMetaData > ( ) ; for ( int i = 1 ; i <= m . getColumnCount ( ) ; i ++ ) { ColumnMetaData cm = new ColumnMetaData ( m , i ) ; result . put ( cm . getLabelOrName ( ) , cm ) ; } return result ; }
Get all the column meta data and put them into a map keyed by column label or name