@ Override public Record nextRecord ( Record record ) { try { resultSet . next ( ) ; ResultSetMetaData rsmd = resultSet . getMetaData ( ) ; int column_count = rsmd . getColumnCount ( ) ; record . setNumFields ( column_count ) ; for ( int pos = 0 ; pos < column_count ; pos ++ ) { int type = rsmd . getColumnType ( pos + 1 ) ; retrieveTypeAndFillRecord ( pos , type , record ) ; } return record ; } catch ( SQLException e ) { throw new IllegalArgumentException ( "Couldn't read data:\t" + e . getMessage ( ) ) ; } catch ( NotTransformableSQLFieldException e ) { throw new IllegalArgumentException ( "Couldn't read data because of unknown column sql-type:\t" + e . getMessage ( ) ) ; } catch ( NullPointerException e ) { throw new IllegalArgumentException ( "Couldn't access resultSet:\t" + e . getMessage ( ) ) ; } }
Stores the next resultSet row in a Record