Examples

There are three examples available divided into two plug-ins.

Bean Generator

This example shows how the plug-in can be used without a database. As input data an XML file is used. Therefore giving an example on how to implement a parser for an XML input file. This is the main focus of the example. Besides it uses classes instead of table fields. The parser generates from these a DataBaseTable model though it has nothing to do with a database. This is done that way so the JETemplates for database models can be applied. The code for this example resides in the plug-in ch.sahits.codegen.java.examples.

GUI Form

This example is another form to show how an XML parser can be used. Since the input file does not end on *.xml but on *.xhtml the parser is directly connected to the file extension. The example can convert a XHTML form - as long it has no fancy layout, forms of one, two or three columns work - into a SWT GUI dialog. Several things must be supplied by hand ie. JavaScript code or general button events. The code for this plug-in resides in ch.sahits.codegen.java.gui

Data Manipulator

This is an example implementation of the extension point ch.sahits.codegen.sql.manipulation for manipulating data before generation the insert script. The example is specific for the country tables of the schema app of the example database of Derby. The code for this example resides in the plug-in ch.sahits.codegen.java.examples.