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

java.lang.Object
  拡張org.apache.tools.ant.ProjectComponent
      拡張org.apache.tools.ant.Task
          拡張org.apache.velocity.texen.ant.TexenTask
              拡張org.asyrinx.joey.gen.task.BaseJoeyDataModelTask
直系の既知のサブクラス:
JoeyDataModelTask

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

作成者:
akima

フィールドの概要
protected  org.apache.velocity.context.Context context
          Velocity context which exposes our objects in the templates.
protected  java.util.Hashtable databaseNames
          Hashtable containing the names of all the databases in our collection of schemas.
protected  java.util.Hashtable dataModelDbMap
          Map of data model name to database name.
protected  java.util.List dataModels
          Data models that we collect.
protected  java.util.List filesets
          Fileset of XML schemas which represent our data models.
protected  java.lang.String sqldbmap
          Name of the properties file that maps an SQL file to a particular database.
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
 
コンストラクタの概要
BaseJoeyDataModelTask()
           
 
メソッドの概要
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of xml schema files (nested fileset attribute).
protected  void addNewAppData(java.lang.String fileName)
           
 java.lang.String getBasePathToDbProps()
          The path to properties file containing db idiosyncrasies is constructed by appending the "getTargetDatabase()/db.props to this path.
 java.util.Hashtable getDataModelDbMap()
          Return the data model to database name map.
 java.util.List getDataModels()
          Return the data models that have been processed.
 java.lang.String getSqlDbMap()
          Get the sqldbmap.
 java.lang.String getTargetDatabase()
          Get the current target database.
 java.lang.String getTargetPackage()
          Get the current target package.
 java.lang.String getXmlFile()
          Get the xml schema describing the application model.
protected  java.lang.String grokName(java.lang.String xmlFile)
          Gets a name to use for the application's data model.
 org.apache.velocity.context.Context initControlContext()
          Set up the initial context for generating the SQL from the XML schema.
 void setBasePathToDbProps(java.lang.String v)
          The path to properties file containing db idiosyncrasies is constructed by appending the "getTargetDatabase()/db.props to this path.
 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 setSqlDbMap(java.lang.String sqldbmap)
          Set the sqldbmap.
 void setTargetDatabase(java.lang.String v)
          Set the current target database.
 void setTargetPackage(java.lang.String v)
          Set the current target package.
 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 final java.util.List filesets
Fileset of XML schemas which represent our data models.


dataModels

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


context

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


dataModelDbMap

protected java.util.Hashtable dataModelDbMap
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
Hashtable containing the names of all the databases in our collection of schemas.


sqldbmap

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

コンストラクタの詳細

BaseJoeyDataModelTask

public BaseJoeyDataModelTask()
メソッドの詳細

setSqlDbMap

public void setSqlDbMap(java.lang.String sqldbmap)
Set the sqldbmap.

パラメータ:
sqldbmap - th db map

getSqlDbMap

public java.lang.String getSqlDbMap()
Get the sqldbmap.

戻り値:
String sqldbmap.

getDataModels

public java.util.List getDataModels()
Return the data models that have been processed.

戻り値:
List data models

getDataModelDbMap

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

戻り値:
Hashtable data model name to database name map.

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

getTargetDatabase

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

戻り値:
String target database(s)

setTargetDatabase

public void setTargetDatabase(java.lang.String v)
Set the current target database. (e.g. mysql, oracle, ..)

パラメータ:
v - target database(s)

getTargetPackage

public java.lang.String getTargetPackage()
Get the current target package.

戻り値:
return target java package.

setTargetPackage

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

パラメータ:
v - target java package.

getBasePathToDbProps

public java.lang.String getBasePathToDbProps()
The path to properties file containing db idiosyncrasies is constructed by appending the "getTargetDatabase()/db.props to this path.

戻り値:
basepath to db.props

setBasePathToDbProps

public void setBasePathToDbProps(java.lang.String v)
The path to properties file containing db idiosyncrasies is constructed by appending the "getTargetDatabase()/db.props to this path.

パラメータ:
v - basepath to db.props

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

addNewAppData

protected void addNewAppData(java.lang.String fileName)
                      throws org.apache.torque.engine.EngineException
例外:
org.apache.torque.engine.EngineException

grokName

protected final java.lang.String grokName(java.lang.String xmlFile)
Gets a name to use for the application's data model.

パラメータ:
xmlFile - The path to the XML file housing the data model.
戻り値:
The name to use for the AppData.

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


Copyright © 2004 asyrinx organization. All Rights Reserved.