Found a great tool over at mysql.com called DBFoil. Here's a decription:
"The basic operation is as follows. Given an XML file with SQL statements in it, DbFoil executes the statements against the database and determines the results set which it then uses to generate java classes. Using this approach does not limit DbFoils use to SELECT statements, it also caters for INSERT, UPDATE and DELETE statements as well as STORED PROCEDURES.
Programmers can include the resulting class into their applications and work in a completely object orientated environment instead of having cumbersome inline SQL code.
The generated classes also handle connection pooling as well as transactions and results can be formatted into either Java objects or XML. DbFoil also supports "result set" overloading whereby multiple statements can share the same result class.
In general, the aim of DbFoil is to free the programmer from having to handle connections and result sets inside their code so that they can concentrate on writing SQL statements, calling methods and receiving objects in return. Another benefit is that a significant number of database errors are also caught at compile time instead of at run time.
DbFoil can be used on any SQL database, as long as there is a JDBC driver for the database."
Can be found at http://www.mysql.com/portal/software/item-235.html