org.apache.ojb.broker.ant
Class RepositoryDataTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.ddlutils.task.DatabaseTaskBase
              extended by org.apache.ojb.broker.ant.RepositoryDataTask

public class RepositoryDataTask
extends org.apache.ddlutils.task.DatabaseTaskBase

Task for inserting data XML that is defined in terms of the repository elements.

Author:
Thomas Dudziak

Field Summary
 
Fields inherited from class org.apache.ddlutils.task.DatabaseTaskBase
_log
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
RepositoryDataTask()
           
 
Method Summary
 void addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
          Adds a fileset specifying the schema files.
 void addWriteDataSqlToFile(WriteDataSqlToFileCommand command)
          Adds the "write data sql to file"-command.
 void addWriteDataToDatabase(WriteDataToDatabaseCommand command)
          Adds the "write data to database"-command.
 void addWriteDtdToFile(WriteDtdToFileCommand command)
          Adds the "write dtd to file"-command.
 void execute()
          
 String getJcdAlias()
          Returns the alias of the jdbc connection.
 File getOjbPropertiesFile()
          Returns the ojb properties file, per default 'OJB.properties' in the current directory.
 File getRepositoryFile()
          Returns the repository file.
protected  org.apache.ddlutils.model.Database readModel()
          
 void setJcdAlias(String alias)
          Sets the alias of the jdbc connection to use.
 void setOjbPropertiesFile(File ojbPropertiesFile)
          Sets the ojb properties file.
 void setRepositoryFile(File file)
          Sets the repository file (per default the one configured in the ojb properties file is used).
 void setSchemaFile(File schemaFile)
          Set the xml schema describing the application model.
 void setUseInternalDtd(boolean useInternalDtd)
          Specifies whether XML schema files are validated against the internal or an external DTD.
 
Methods inherited from class org.apache.ddlutils.task.DatabaseTaskBase
addCommand, addConfiguredDatabase, executeCommands, getCommands, getDatabaseType, getDataSource, getPlatform, getPlatformConfiguration, hasCommands, isShutdownDatabase, isSortForeignKeys, isUseDelimitedSqlIdentifiers, setCatalogPattern, setDatabaseType, setSchemaPattern, setShutdownDatabase, setSimpleLogging, setSortForeignKeys, setUseDelimitedSqlIdentifiers, setVerbosity
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryDataTask

public RepositoryDataTask()
Method Detail

setJcdAlias

public void setJcdAlias(String alias)
Sets the alias of the jdbc connection to use.

Parameters:
alias - The alias of the connection

getJcdAlias

public String getJcdAlias()
Returns the alias of the jdbc connection.

Returns:
The alias

getOjbPropertiesFile

public File getOjbPropertiesFile()
Returns the ojb properties file, per default 'OJB.properties' in the current directory.

Returns:
The ojb properties file

setOjbPropertiesFile

public void setOjbPropertiesFile(File ojbPropertiesFile)
Sets the ojb properties file.

Parameters:
ojbPropertiesFile - The ojb properties file

getRepositoryFile

public File getRepositoryFile()
Returns the repository file.

Returns:
The repository file

setRepositoryFile

public void setRepositoryFile(File file)
Sets the repository file (per default the one configured in the ojb properties file is used).

Parameters:
file - The repository file

setUseInternalDtd

public void setUseInternalDtd(boolean useInternalDtd)
Specifies whether XML schema files are validated against the internal or an external DTD.

Parameters:
useInternalDtd - true if input files are to be validated against the internal DTD

addConfiguredFileset

public void addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
Adds a fileset specifying the schema files.

Parameters:
fileset - The additional input files

setSchemaFile

public void setSchemaFile(File schemaFile)
Set the xml schema describing the application model.

Parameters:
schemaFile - The schema

addWriteDtdToFile

public void addWriteDtdToFile(WriteDtdToFileCommand command)
Adds the "write dtd to file"-command.

Parameters:
command - The command

addWriteDataToDatabase

public void addWriteDataToDatabase(WriteDataToDatabaseCommand command)
Adds the "write data to database"-command.

Parameters:
command - The command

addWriteDataSqlToFile

public void addWriteDataSqlToFile(WriteDataSqlToFileCommand command)
Adds the "write data sql to file"-command.

Parameters:
command - The command

readModel

protected org.apache.ddlutils.model.Database readModel()

Specified by:
readModel in class org.apache.ddlutils.task.DatabaseTaskBase

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.ddlutils.task.DatabaseTaskBase
Throws:
org.apache.tools.ant.BuildException


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.