TableGen Installation
Installation
- Download TableGen and Bretts packages
- Gunzip packages, and "tar xvf" in a dir of your choice.
- Ensure that you can see Bretts classes (starts from "org")
- Install you JDBC driver so it's visible from java
(add to CLASSPATH or link to dir)
- Edit the tablegen.properties file to talk to your database and set
generation directory, package name etc.
- Examples of properties files can be found in the examples directory.
- Give it a whirl with "java TableGen". The classes are generated into
the "dbtables" directory as defined in the properties.
- You can optionally give a properties filename to TableGen.
e.g. "java TableGen other.properties"
- The "db.properties" file must be updated to match the url you used in
"tablegen.properties". This file is used in the operation of the generated
code. It's separate because you may want to run it with difference
username / privileges. The path for db.properties can be found in the
dbgeneric/DatabaseAccess.java file. It defaults to the current directory.
- Check the notes above for any specific for your database!