org.apache.torque.task
Class TorqueDataSQLTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.texen.ant.TexenTask
              extended by org.apache.torque.task.TorqueDataModelTask
                  extended by org.apache.torque.task.TorqueDataSQLTask
All Implemented Interfaces:
java.lang.Cloneable

public class TorqueDataSQLTask
extends TorqueDataModelTask

An extended Texen task used for generating SQL source from an XML data file

Version:
$Id: TorqueDataSQLTask.java 473814 2006-11-11 22:30:30Z tv $
Author:
Jason van Zyl , John McNally , Fedor Karpelevitch , Henning P. Schmiedehausen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.torque.task.TorqueDataModelTask
TorqueDataModelTask.TorqueClasspathResourceLoader, TorqueDataModelTask.TorqueFileResourceLoader
 
Field Summary
 
Fields inherited from class org.apache.torque.task.TorqueDataModelTask
context, databaseNames, dataModelDbMap, dataModels, filesets, sqldbmap, xmlFile
 
Fields inherited from class org.apache.texen.ant.TexenTask
contextProperties, controlTemplate, inputEncoding, logFile, outputDirectory, outputEncoding, outputFile, resourceLoaderModificationCheckInterval, templatePath, useClasspath, useResourceLoaderCache
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
TorqueDataSQLTask()
           
 
Method Summary
 java.lang.String getDataDTD()
          Gets the DataDTD attribute of the TorqueDataSQLTask object
 java.lang.String getDataXmlFile()
          Gets the DataXmlFile attribute of the TorqueDataSQLTask object
 java.lang.String getTargetDatabase()
          Get the current target database.
 org.apache.velocity.context.Context initControlContext()
          Set up the initial context for generating the SQL from the XML schema.
 void setDataDTD(java.lang.String dataDTD)
          Sets the DataDTD attribute of the TorqueDataSQLTask object
 void setDataXmlFile(java.lang.String dataXmlFile)
          Sets the DataXmlFile attribute of the TorqueDataSQLTask object
 void setTargetDatabase(java.lang.String v)
          Set the current target database.
 
Methods inherited from class org.apache.torque.task.TorqueDataModelTask
addFileset, execute, filter, getDataModelDbMap, getDataModels, getSqlDbMap, getTargetPackage, getXmlFile, populateInitialContext, setContextProperties, setSqlDbMap, setTargetPackage, setXmlFile
 
Methods inherited from class org.apache.texen.ant.TexenTask
cleanup, getContextProperties, getControlTemplate, getLogFile, getOutputDirectory, getOutputFile, getTemplatePath, setControlTemplate, setInputEncoding, setLogFile, setOutputDirectory, setOutputEncoding, setOutputFile, setResourceLoaderModificationCheckInterval, setTemplatePath, setUseClasspath, setUseResourceLoaderCache
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorqueDataSQLTask

public TorqueDataSQLTask()
Method Detail

setDataXmlFile

public void setDataXmlFile(java.lang.String dataXmlFile)
Sets the DataXmlFile attribute of the TorqueDataSQLTask object

Parameters:
dataXmlFile - The new DataXmlFile value

getDataXmlFile

public java.lang.String getDataXmlFile()
Gets the DataXmlFile attribute of the TorqueDataSQLTask object

Returns:
The DataXmlFile value

getTargetDatabase

public java.lang.String getTargetDatabase()
Get the current target database.

Overrides:
getTargetDatabase in class TorqueDataModelTask
Returns:
String target database(s)

setTargetDatabase

public void setTargetDatabase(java.lang.String v)
Set the current target database. This is where generated java classes will live.

Overrides:
setTargetDatabase in class TorqueDataModelTask
Parameters:
v - The new TargetDatabase value

getDataDTD

public java.lang.String getDataDTD()
Gets the DataDTD attribute of the TorqueDataSQLTask object

Returns:
The DataDTD value

setDataDTD

public void setDataDTD(java.lang.String dataDTD)
Sets the DataDTD attribute of the TorqueDataSQLTask object

Parameters:
dataDTD - The new DataDTD value

initControlContext

public org.apache.velocity.context.Context initControlContext()
                                                       throws java.lang.Exception
Set up the initial context for generating the SQL from the XML schema.

Overrides:
initControlContext in class TorqueDataModelTask
Returns:
the context
Throws:
java.lang.Exception - If there is an error parsing the data xml.


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