Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
PHP Support Desk 2.0
SentiVeillance SDK Trial 6.0.173737
GetOrgChart 2.4.3
Devart SSIS Integration Database Bundle 1.6
SSIS Integration Universal Bundle 1.6
Best Featured Online Classified Ads Solution 2.0
Magento 2 Frontend Builder 2.0
Devart SSIS DataFlow Components 1.6
Bytescout PDF Viewer SDK 8.7.0.2980
Readymade Job Site Script 2.0.1
SentiMask SDK Trial 1.0
Bytescout Spreadsheet SDK 2.9.0.1677
Taxi Booking Solution 1.0
Realtor Script - Vacation Rental Script 3.1
Chartered Accountant Listing Script 2.3
Top Code
Restaurant Table Booking System 2.0
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Space Impact 0.4.15
Defect Tracking System (PHP, MySQL) 1.0
MLM Software ONE 1.5.46
Billing System 1.0.1
S-Bug Tracking System 0.1.5
MLM Binary Plan Script – i-Netsolution 1.0.2
Cuckoo Search (CS) Algorithm 1.0
DevGuy Programmers' Canvas Toolkit 1.9.1.0.4
Ticket Booking System 1.0
Bytescout PDF To HTML SDK 8.7.0.2980
Binary(doc,xls,ppt) to OpenXMLTranslator 649
MLM Software 1.0.2
Logo Store Script and Complete Website
Top Rated
Indiegogo Clone 3.0
PHP Image Resize Script 1.0
Jango Clone Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
Readymade MLM Products 2.01
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
XSL template for JDBC Code generation 1.0
File ID: 77151






XSL template for JDBC Code generation 1.0
Download XSL template for JDBC Code generation 1.0http://www.jdonohue.com/Report Error Link
License: Freeware
File Size: 215.0 KB
Downloads: 203
Submit Rating:
XSL template for JDBC Code generation 1.0 Description
Description: 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.

License: Freeware

Related: Table, Template, Tables, linked, Column, person, Store, Oracle, Object, Calling, Pattern, Database, primary, Constructor, Relationship, Information, Xsl, Scripts, Jdbc, Generation

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 215.0 KB

Downloads: 203



More Similar Code

API for Java code generation - no input files required - you use API and generate code



ClipsGen is a Lightweight Eclipse plugin for easy code generation.ClipsGen uses simple XML files as model and the velocity template engine for code generation. The model can be accessed by the dot-notation which is a feature of velocity.



Cheetah is a template engine and code generation tool, written in Python. Web development is its principle use, but Cheetah is very flexible and is also being used to generate C++ game code, Java, sql, form emails and even Python code.



XMLCV is a multilingual XSL template for creation of a simple structured Curriculum Vitae. The output can be either TXT, PDF or XHTML. The user does not need to know anything about the design because everything is done automatically by XSL template.



This is an academic project for automatic code generation, based in an UML entity class diagram and in templates created by the user. This project is developed under Java Platform and will generate code in Java Platform.



This project is about template based code generation (useful particularly for MDA approach), and proves that Ruby is best suitable for that ;-)



Extensible IDE and framework for managing small and large-scale code generation projects. Through an abstracted code generation layer, CH3ETAH can support almost any template language, workflows, and even tasks not directly related to code...



XSCodegen is a codegen - code generation utility for developers and architects. This tool reads database schemas, then use xslt based templates to generate code or documents to implement rapid development.



MCG is a tool for doing in-place code generation. MCG is intended to
provide the maximum traceability of generated code back to the Matlab
code generator.

MCG processes a source file looking for sections of specially...



Ejen is a general purpose code generation system based on Java/XML/XSLT technologies. It is implemented as an Ant task and features a full EJB (BMP Entity Beans) code generation demonstration for JBoss with HSQLDB, PostgreSQL and MySQL database...

User Review for XSL template for JDBC Code generation
- required fields
     

Please enter text on the image