/** * ResultSet를 List 로 생성 * 2008.11.11 ddakker 추가 * @param rs ResultSet instance * @return */ public static List getRsToList(ResultSet rs){ List list = new ArrayList(); try { if( rs.next() ){ do{ Map map = new HashMap(); ResultSetMetaData rsMD= rs.getMetaData(); int rsMDCnt = rsMD.getColumnCount(); for( int i = 1; i <= rsMDCnt; i++ ) { String column = rsMD.getColumnName(i).toLowerCase(); String value = rs.getString(column); map.put(column, value); } list.add(map); }while( rs.next() ); }else{ list = java.util.Collections.EMPTY_LIST; } } catch (Exception e) { list = null; } return list; }