Hi,
I have your application readily available like you said in the post, a JDBC program connecting with database and executing 4 queries. Please come for chat, right away I will give demo and will release the code immediately.
NOTE: Just I need to tweak little as per your table structure and the test and release the code.
Thanks
Paul