Explain about RowCallbackHandler and why it is used?

Explain about RowCallbackHandler and why it is used?

RowCallbackHandler interface is used by JdbcTemplate for processing rows of a ResultSet on a per-row basis. Implementations of this interface perform the actual work of processing each row but don't need to worry about exception handling. SQLExceptions will be caught and handled by the calling JdbcTemplate. RowCallbackHandler object is typically stateful: It keeps the result state within the object, to be available for later inspection.
RowCallbackHandler interface has one method :

   void processRow(ResultSet rs) :- Implementations must implement this method to process each row of data in the ResultSet.

Date:2002-02-09 00:00:00

Post Your Answers

User Email:

User Name:

Related Spring sub Links

Spring sub interview questions and answers for experienced and fresher