Please send your Questions & Answers or Feedback to ""

JDBC : How to get ResultSet object from spring ?

Compare with how to get Request object from the Servlet Container....

Servlets :
Write Servlet class and extends GenericServlet.
Override the service() giving the request and response objects.
Give the Servlet entry in web.xml, then the Container creates an object for Servlet and request and response objects. While calling the service it will pass the request and response objects.

Spring :
Write a class and implement the RowMapper interface.
Override the mapRow(), while passing the ResultSet reference.
Create an object, pass the object to JT then JT create an object for ResultSet and while calling mapRow() it will pass ResultSet.

Note : In the mapRow() we can process the ResultSet and set the ResultSet data to Student object and return Student object then JT will add the Student objects to a list and finally it will return the list of student objects.
Related Posts Plugin for WordPress, Blogger...
Flag Counter