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 $
  • Constructor Details

    • WriteDataToFileCommand

      public WriteDataToFileCommand()
  • Method Details

    • 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.
      Specified by:
      execute in class Command
      Parameters:
      task - The executing task
      model - The database model
      Throws:
      org.apache.tools.ant.BuildException