Netbeans Java SQL Generator plugin automatically generates SQL code (currently MySQL and PostgreSQL, more will follow) and java database methods (insertIntoTable, update, delete, createTable methods etc.) from variables in a java class. It comes with many Options and possibilities to customize the generated sql and code for your needs.
It works with Netbeans version 6.9 or later on any Netbeans supported System.