Supply an Xml file with the details of the table, and the Java Class to generate for dealing with that table. An XSL processor, is used to read the template and xml files, and output a Java source file.
There are many ways to arrange tables to store a set of data. This template does not attempt to cover all cases, but it requires that the database layout follow a pattern.
The Java classes generated follow a pattern where there is one Java object for each table and the object represents one row on that table. If the object is instantiated by passing the db key in the constructor it will query the db and populate its properties.
New rows are created by calling the no-args constructor, calling the misc set() methods, and then calling store(). Calling the store() method also calls the store() method on any linked objects. Deleting the row is done by callling delete(). Any linked tables are also deleted.
· XSL processor.