What is RowCallbackHandler? Why it is used.
- ResultSet is generally used to navigate the records. The spring framework is provided with RowCallbackHandler interface. The method processRow() can be implemented for use of navigation and handling each row. The user can concentrate only on what to do with each row by avoiding navigation process. The processRow() method has the following signature:
void processRow(java.sql.ResultSet rs);
Explain about RowCallbackHandler and why it is used.
- In order to navigate through the records we generally go for ResultSet. But spring provides an interface that handles this entire burden and leaves the user to decide what to do with each row. The interface provided by spring is RowCallbackHandler. There is a method processRow() which needs to be implemented so that it is applicable for each and every row.
void processRow(java.sql.ResultSet rs);