org.devaki.nextobjects.util
Class TorqueWrapper

java.lang.Object
  extended byorg.devaki.nextobjects.util.TorqueWrapper

public class TorqueWrapper
extends java.lang.Object

This class is responsible for starting torque-generator It also write '${project}-schema.xml' it also write torque's project.properties additional build.properties might be passed to torque-gen throught APP_HOME/defaultbuild.properties

Author:
Emmanuel Florent

Constructor Summary
TorqueWrapper()
          Constructor do nothing except avoid instanciation
 
Method Summary
 void clean()
          Make clean.
 void createDB(PhysicalModel db)
          Run create-db task
 void genDoc(PhysicalModel pDatabase)
          Generate Documentation
 void genDTD(PhysicalModel db)
          Generate DTD
 void genObjectModel(PhysicalModel db)
          Generate Object-Model
 void genOjb(PhysicalModel pDatabase)
          Generate OJB
 void genSQL(PhysicalModel pDatabase)
          Generate SQL for the current model
 void inheritColumns(PhysicalModel model)
          Inherits all columns move all the columns of a table to it's immediate parent
 void insertSQL(PhysicalModel db)
          Run insert-sql task
 void jdbc2xml(PhysicalModel db)
          Generate XML from JDBC
 void makeBuildProperties(PhysicalModel pDatabase)
          create the file build.properties that is neccessary to run Torque
 void runBuild(java.lang.ClassLoader coreLoader, java.lang.String pTarget)
          Call to ant for the torque project
 void runTask(PhysicalModel pDatabase, java.lang.String pTarget)
          Call to ant for the torque project
 void writeIdTableSchema(PhysicalModel pDatabase)
          Write the torque's id-table-schema
 void writeXML(PhysicalModel pDatabase)
          Transform the model to XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorqueWrapper

public TorqueWrapper()
Constructor do nothing except avoid instanciation

Method Detail

genObjectModel

public void genObjectModel(PhysicalModel db)
Generate Object-Model

Parameters:
db - the database

genDTD

public void genDTD(PhysicalModel db)
Generate DTD

Parameters:
db - the database

jdbc2xml

public void jdbc2xml(PhysicalModel db)
Generate XML from JDBC

Parameters:
db - the database

createDB

public void createDB(PhysicalModel db)
Run create-db task

Parameters:
db - the database

insertSQL

public void insertSQL(PhysicalModel db)
Run insert-sql task

Parameters:
db - the database

inheritColumns

public void inheritColumns(PhysicalModel model)
Inherits all columns move all the columns of a table to it's immediate parent

Parameters:
model - Description of the Parameter
See Also:
http://db.apache.org/torque/inheritance-guide.html

genDoc

public void genDoc(PhysicalModel pDatabase)
Generate Documentation

Parameters:
pDatabase - the database

genOjb

public void genOjb(PhysicalModel pDatabase)
Generate OJB

Parameters:
pDatabase - the database

genSQL

public void genSQL(PhysicalModel pDatabase)
Generate SQL for the current model

Parameters:
pDatabase - the database

writeIdTableSchema

public void writeIdTableSchema(PhysicalModel pDatabase)
Write the torque's id-table-schema

Parameters:
pDatabase - Description of the Parameter

runTask

public void runTask(PhysicalModel pDatabase,
                    java.lang.String pTarget)
Call to ant for the torque project

Parameters:
pDatabase - the database
pTarget - the torque target

runBuild

public void runBuild(java.lang.ClassLoader coreLoader,
                     java.lang.String pTarget)
Call to ant for the torque project

Parameters:
coreLoader - the class loader
pTarget - the torque target

clean

public void clean()
Make clean.


makeBuildProperties

public void makeBuildProperties(PhysicalModel pDatabase)
create the file build.properties that is neccessary to run Torque

Parameters:
pDatabase - Description of the Parameter

writeXML

public void writeXML(PhysicalModel pDatabase)
              throws javax.xml.transform.TransformerException,
                     org.xml.sax.SAXException,
                     java.io.IOException
Transform the model to XML

Parameters:
pDatabase - the database
Throws:
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException
javax.xml.transform.TransformerException - TransformerException


Copyright © 2002-2004 devaki.org. All Rights Reserved.