I am new to Spring and learning its JDBC Framework.
I came across a piece of code -
Below is snippet to retreive a list of Student object. This means the SQL query returns more than 1 row in the ResultSet rs.
I was going through the RowMapper<T> spring documentation
java.lang.https , and found that mapRow() is not supposed to
call next() on the ResultSet rs as it is supposed to map only the the current row with the Java domain object.
My question is if the ResultSet rs has multiple rows of data, who or what causes the cursor to move to the next row and perform mapping using mapRow()?
Is it the queryForObject() method of JdbcTemplate doing something implicitly or something else?
I am looking for an explanation how this work gets done.