org.asyrinx.joey.gen.task
クラス DataModelTask

java.lang.Object
  拡張org.apache.tools.ant.ProjectComponent
      拡張org.apache.tools.ant.Task
          拡張org.apache.velocity.texen.ant.TexenTask
              拡張org.asyrinx.joey.gen.task.DataModelTask

public class DataModelTask
extends org.apache.velocity.texen.ant.TexenTask

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.

作成者:
Jason van Zyl , Daniel Rall

フィールドの概要
protected  org.apache.velocity.context.Context context
          Velocity context which exposes our objects in the templates.
protected  java.util.List filesets
          Fileset of XML schemas which represent our data models.
protected  java.lang.String xmlFile
          XML that describes the database model, this is transformed into the application model object.
 
クラス org.apache.velocity.texen.ant.TexenTask から継承したフィールド
contextProperties, controlTemplate, inputEncoding, outputDirectory, outputEncoding, outputFile, templatePath, useClasspath
 
クラス org.apache.tools.ant.Task から継承したフィールド
description, location, target, taskName, taskType, wrapper
 
クラス org.apache.tools.ant.ProjectComponent から継承したフィールド
project
 
コンストラクタの概要
DataModelTask()
           
 
メソッドの概要
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of xml schema files (nested fileset attribute).
 java.lang.String getBuilderClassName()
           
 java.lang.String getXmlFile()
          Get the xml schema describing the application model.
 org.apache.velocity.context.Context initControlContext()
          Set up the initial context for generating the SQL from the XML schema.
protected  Databases loadModelXmlFile(java.lang.String filename)
           
protected  Rdb2JavaBuilder newBuilder()
           
 void setBuilderClassName(java.lang.String builderClassName)
           
 void setContextProperties(java.lang.String file)
          Override Texen's context properties to map the torque.xxx properties (including defaults set by the org/apache/torque/defaults.properties) to just xxx.
 void setXmlFile(java.lang.String xmlFile)
          Set the xml schema describing the application model.
 
クラス org.apache.velocity.texen.ant.TexenTask から継承したメソッド
cleanup, execute, getContextProperties, getControlTemplate, getOutputDirectory, getOutputFile, getTemplatePath, populateInitialContext, setControlTemplate, setInputEncoding, setOutputDirectory, setOutputEncoding, setOutputFile, setTemplatePath, setUseClasspath
 
クラス org.apache.tools.ant.Task から継承したメソッド
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
クラス org.apache.tools.ant.ProjectComponent から継承したメソッド
getProject, setProject
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

xmlFile

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


filesets

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


context

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

コンストラクタの詳細

DataModelTask

public DataModelTask()
メソッドの詳細

getXmlFile

public java.lang.String getXmlFile()
Get the xml schema describing the application model.

戻り値:
String xml schema file.

setXmlFile

public void setXmlFile(java.lang.String xmlFile)
Set the xml schema describing the application model.

パラメータ:
xmlFile - The new XmlFile value

addFileset

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

パラメータ:
set - a Set of xml schema files

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.

戻り値:
the context
例外:
java.lang.Exception

loadModelXmlFile

protected Databases loadModelXmlFile(java.lang.String filename)
                              throws java.io.IOException,
                                     org.xml.sax.SAXException
例外:
java.io.IOException
org.xml.sax.SAXException

setContextProperties

public void setContextProperties(java.lang.String file)
Override Texen's context properties to map the torque.xxx properties (including defaults set by the org/apache/torque/defaults.properties) to just xxx.

Also, move xxx.yyy properties to xxxYyy as Velocity doesn't like the xxx.yyy syntax.

パラメータ:
file - the file to read the properties from

getBuilderClassName

public java.lang.String getBuilderClassName()
戻り値:
Returns the builderClassName.

setBuilderClassName

public void setBuilderClassName(java.lang.String builderClassName)
パラメータ:
builderClassName - The builderClassName to set.

newBuilder

protected Rdb2JavaBuilder newBuilder()
                              throws java.lang.InstantiationException
例外:
java.lang.InstantiationException


Copyright © 2004 asyrinx organization. All Rights Reserved.