About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 6 years ago
  • Total downloads: 155
  • Price: Free |
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: John Donohue (1 other programs)
See full specifications

scripts default iconXSL template for JDBC Code generation (Scripts) Publisher's description

This Xsl template generates Java code for mapping objects to an Oracle database.

This Xsl template generates Java code for mapping objects to an Oracle database. You supply an Xml file with the details of the table, and Java Class to generate for dealing with that table. An XSL processor, like Xalan, is used to read the template and xml files, and output a Java source file. There are many ways to arranges table to store a set of data. This template does not attempt to cover all cases- but requires that the database layout follow a pattern.

The tables should be indexed by artifical primay keys of type NUMBER. A table should contain the foreign key column to any sub type tables that add data to it in a one to one relationship. For example when a PERSON table is linked to a ADDRESS table; the PERSON table should have column that contains the primary key of the ADRESS row that contains the address information for this person. Also. when a table row can belong to another table row in a many to one relationship then it should contain a foreign key column to it's parent. For example; a PERSON table that is linked to a CREDIT_CARD table. The person can have many credit cards; the CREDIT_CARD table would have a column that points to the primary key that owns it on the PERSON table. Each tables primary key is generated by an Oracle sequence.

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. See the Simple example for more information.

The template will only generate working code for Oracle, and the narrow db, and object pattern outlined above. However even if it doesn't fit your case- some of the code fragments may be usefull.
Here are some examples of using the template:

A Simple example with one table and no joins.
A join example where 3 tables are joined.
A more realistic example of a Department of Motor Vehicles database.

The above example code is available in this tar for download.
This template has been tested with Oracle databases, and the Xalan XSL processor.

System Requirements:

No special requirements.
Program Release Status: Major Update
Program Install Support: Install and Uninstall

Is XSL template for JDBC Code generation (Scripts) your software?

Manage your software

Most Popular

scripts default icon Lightview Script 2.5
Lightview was built to change the way you overlay content on a website.
scripts default icon Draggable IFRAME Windows Script 1.1
Draggable IFRAME Windows library has the purpose to allow IFRAME objects to be dragged around the screen.
scripts default icon Uploadify Script 2.1.4
Uploadify is a jQuery plugin that integrates a fully-customizable multiple file upload utility on your website... Read more
scripts default icon Easy Slider Script 1.5
This is a jQuery-driven, horizontal navigational slider
scripts default icon Anything Slider (Scripts) 1.2
jQuery-based slider with lots of features: hashtag linking to direct slides, “infinite” sliding,... Read more