org.apache.turbine.torque
Class TorqueDataModelTask

org.apache.turbine.torque.TorqueDataModelTask
Direct Known Subclasses:
TorqueCreateDatabase, TorqueDataDTDTask, TorqueDataSQLTask, TorqueObjectModelTask, TorqueSQLTask

Deprecated. use turbine-torque

public class TorqueDataModelTask

A base torque task that uses either a single XML schema representing a data model, or a <fileset> of XML schemas. We are making the assumption that an XML schema representing a data model contains tables for a single database.

Author:
Jason van Zyl, Daniel Rall

Field Summary
protected  org.apache.velocity.context.Context context
          Deprecated. Velocity context which exposes our objects in the templates.
protected  java.util.Hashtable databaseNames
          Deprecated. Hashtable containing the names of all the databases in our collection of schemas.
protected  java.util.Hashtable dataModelDbMap
          Deprecated. Map of data model name to database name.
protected  java.util.Vector dataModels
          Deprecated. Data models that we collect.
protected  java.util.Vector filesets
          Deprecated. Fileset of XML schemas which represent our data models.
protected  java.lang.String sqldbmap
          Deprecated. Name of the properties file that maps an SQL file to a particular database.
protected  java.lang.String xmlFile
          Deprecated. XML that describes the database model, this is transformed into the application model object.
 
Constructor Summary
TorqueDataModelTask()
          Deprecated.  
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Deprecated. Adds a set of files (nested fileset attribute).
 java.util.Hashtable getDataModelDbMap()
          Deprecated. Return the data model to database name map.
 java.util.Vector getDataModels()
          Deprecated. Return the data models that have been processed.
 java.lang.String getSqlDbMap()
          Deprecated. Get the sqldbmap.
 java.lang.String getXmlFile()
          Deprecated. Get the xml schema describing the application model.
private  java.lang.String grokName(java.lang.String xmlFile)
          Deprecated. Gets a name to use for the application's data model.
 org.apache.velocity.context.Context initControlContext()
          Deprecated. Set up the initialial context for generating the SQL from the XML schema.
 void setSqlDbMap(java.lang.String sqldbmap)
          Deprecated. Set the sqldbmap.
 void setXmlFile(java.lang.String xmlFile)
          Deprecated. Set the xml schema describing the application model.
 

Field Detail

xmlFile

protected java.lang.String xmlFile
Deprecated. 
XML that describes the database model, this is transformed into the application model object.

filesets

protected java.util.Vector filesets
Deprecated. 
Fileset of XML schemas which represent our data models.

dataModels

protected java.util.Vector dataModels
Deprecated. 
Data models that we collect. One from each XML schema file.

context

protected org.apache.velocity.context.Context context
Deprecated. 
Velocity context which exposes our objects in the templates.

dataModelDbMap

protected java.util.Hashtable dataModelDbMap
Deprecated. 
Map of data model name to database name. Should probably stick to the convention of them being the same but I know right now in a lot of cases they won't be.

databaseNames

protected java.util.Hashtable databaseNames
Deprecated. 
Hashtable containing the names of all the databases in our collection of schemas.

sqldbmap

protected java.lang.String sqldbmap
Deprecated. 
Name of the properties file that maps an SQL file to a particular database.
Constructor Detail

TorqueDataModelTask

public TorqueDataModelTask()
Deprecated. 
Method Detail

setSqlDbMap

public void setSqlDbMap(java.lang.String sqldbmap)
Deprecated. 
Set the sqldbmap.
Parameters:
String - sqldbmap

getSqlDbMap

public java.lang.String getSqlDbMap()
Deprecated. 
Get the sqldbmap.
Returns:
String sqldbmap.

getDataModels

public java.util.Vector getDataModels()
Deprecated. 
Return the data models that have been processed.
Returns:
Vector data models

getDataModelDbMap

public java.util.Hashtable getDataModelDbMap()
Deprecated. 
Return the data model to database name map.
Returns:
Hashtable data model name to database name map.

getXmlFile

public java.lang.String getXmlFile()
Deprecated. 
Get the xml schema describing the application model.
Returns:
String xml schema file.

setXmlFile

public void setXmlFile(java.lang.String xmlFile)
Deprecated. 
Set the xml schema describing the application model.
Parameters:
xmlFile - The new XmlFile value

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Deprecated. 
Adds a set of files (nested fileset attribute).

initControlContext

public org.apache.velocity.context.Context initControlContext()
                                                       throws java.lang.Exception
Deprecated. 
Set up the initialial context for generating the SQL from the XML schema.
Returns:
Description of the Returned Value

grokName

private java.lang.String grokName(java.lang.String xmlFile)
Deprecated. 
Gets a name to use for the application's data model.
Parameters:
xmlFile - The path to the XML file housing the data model.
Returns:
The name to use for the AppData.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.