Middlegen is a utility to automate the generation of database reliant code.
-
Extract into a suitable directory e.g. c:\java\middlegen
If you don't have it, download and install
Ant
Build by running ant in the Middlegen directory
Copy the samples directory and rename to your project directory
Modify build.xml to point to the correct database and change appropriate property namings
Modify config/database/{yourdatabase}./xml so it has the appropriate connection settings
Run ant in the project's home directory