Simple Example

   This is an example of a simple case. A single table "PERSON" stores the first, and last names of a person. The table is keyed by an artifical primary key created by an Oracle sequence. We will generate the code for a Java class Person.java for reading and writing to this table.

The ddl for creating the PERSON table is in table-definition.sql.
The file "person.xml" contains the details of the PERSON table, and the Java object we will generate.
The shell command generate.sh invokes the Xalan parser.
It applys the template oracleObjectPersisterTemplate.xsl against the data in the person.xml file.
The output will be written to Person.java.
Use "compile.sh" to compile the Person and Test objects.
The "Test.java" class demonstrates how to use the Person object.
Use "run.sh" to run the Test class.


Here are some examples of using the Person object.

Back to: XSL template for JDBC Code generation