org.apache.ddlutils.task
Class WriteDataToFileCommand

java.lang.Object
  extended byorg.apache.ddlutils.task.DatabaseCommand
      extended byorg.apache.ddlutils.task.ConvertingDatabaseCommand
          extended byorg.apache.ddlutils.task.WriteDataToFileCommand
All Implemented Interfaces:
Command

public class WriteDataToFileCommand
extends ConvertingDatabaseCommand

Reads the data currently in the table in the live database (as specified by the enclosing task), and writes it as XML to a file.

Version:
$Revision: 289996 $

Field Summary
 
Fields inherited from class org.apache.ddlutils.task.DatabaseCommand
_log
 
Constructor Summary
WriteDataToFileCommand()
           
 
Method Summary
 void execute(DatabaseTaskBase task, Database model)
          Executes this command.
 void setDetermineSchema(boolean determineSchema)
          Deprecated. Will be removed once proper schema support is in place
 void setEncoding(String encoding)
          Specifies the encoding of the XML file.
 void setOutputFile(File outputFile)
          Specifies the file to write the data XML to.
 
Methods inherited from class org.apache.ddlutils.task.ConvertingDatabaseCommand
addConfiguredConverter, getDataIO
 
Methods inherited from class org.apache.ddlutils.task.DatabaseCommand
getCatalogPattern, getDatabaseType, getDataSource, getPlatform, getSchemaPattern, isFailOnError, isRequiringModel, setFailOnError, setPlatformConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteDataToFileCommand

public WriteDataToFileCommand()
Method Detail

setOutputFile

public void setOutputFile(File outputFile)
Specifies the file to write the data XML to.

Parameters:
outputFile - The output file

setEncoding

public void setEncoding(String encoding)
Specifies the encoding of the XML file.

Parameters:
encoding - The encoding

setDetermineSchema

public void setDetermineSchema(boolean determineSchema)
Deprecated. Will be removed once proper schema support is in place

Specifies whether DdlUtils should try to find the schema of the tables when reading data from a live database.

Parameters:
determineSchema - Whether to try to find the table's schemas

execute

public void execute(DatabaseTaskBase task,
                    Database model)
             throws org.apache.tools.ant.BuildException
Executes this command.

Parameters:
task - The executing task
model - The database model
Throws:
org.apache.tools.ant.BuildException


Copyright © 2005-2006 Apache Software Foundation. All Rights Reserved.