Jdbc RowSetListener using an example

By | August 5, 2018

In previous couple of posts Insert and Select Rows with JdbcRowSet Objects  and Update and Delete Rows with JdbcRowSet Objects we learnt how we can perform CRUD operation using JdbcRowSet

In this post we will learn about Jdbc RowSetListener using an example

Project structure in eclipse:

SQL Query to create employee_table and insert few rows in MySQL (jdbcdb schema)
(Note:Make sure you have created employee_table and inserted few records in jdbcdb database schema)
DB.sql 

After running above db script in your MySQL jdbcdb schema employee_table will have following content. 

EmployeeServiceRowSetListener.java listener class

SelectRowsWithRowSetListenerClientTest.java this class basically register EmployeeServiceRowSetListener to show how life cycle method called for selecting rows

 

AddRowWithRowSetListenerClientTest.java this class basically register EmployeeServiceRowSetListener to show how life cycle method called for event for adding a row.

 

DeleteRowWithRowSetListenerClientTest.java this class basically register EmployeeServiceRowSetListener to show how life cycle  method called for event for deleting a row. 

 

UpdateRowWithRowSetListenerClientTest.java this class basically register EmployeeServiceRowSetListener to show how life cycle  method called for event for update a row.

That’s all about this topic Jdbc RowSetListener example
If you have any feedback or suggestion please feel free to drop in blow comment box.

Leave a Reply

Your email address will not be published. Required fields are marked *