org.dbunit.ant
Class Export

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.dbunit.ant.AbstractStep
          extended by org.dbunit.ant.Export
All Implemented Interfaces:
Cloneable, DbUnitTaskStep

public class Export
extends AbstractStep

The Export class is the step that facilitates exporting the contents of the database and/or it's corresponding DTD to a file. The export can be performed on a full dataset or a partial one if specific table names are identified.

Since:
Jun 10, 2002
Version:
$Revision: 859 $
Author:
Timothy Ruppert, Ben Cox
See Also:
DbUnitTaskStep

Field Summary
 
Fields inherited from class org.dbunit.ant.AbstractStep
FORMAT_CSV, FORMAT_DTD, FORMAT_FLAT, FORMAT_XLS, FORMAT_XML
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
Export()
           
 
Method Summary
 void addQuery(Query query)
           
 void addQuerySet(QuerySet querySet)
           
 void addTable(Table table)
           
 void execute(IDatabaseConnection connection)
           
 File getDest()
           
 String getDoctype()
           
 String getEncoding()
          Encoding for XML-Output
protected  IDataSet getExportDataSet(IDatabaseConnection connection)
          Creates the dataset that is finally used for the export
 String getFormat()
           
 String getLogMessage()
           
 List getTables()
           
 boolean isOrdered()
           
 void setDest(File dest)
           
 void setDoctype(String doctype)
           
 void setEncoding(String encoding)
           
 void setFormat(String format)
           
 void setOrdered(boolean ordered)
           
 String toString()
           
 
Methods inherited from class org.dbunit.ant.AbstractStep
checkDataFormat, getDatabaseDataSet, getInputSource, getSrcDataSet, isDataFormat
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Export

public Export()
Method Detail

getDest

public File getDest()

getFormat

public String getFormat()

getTables

public List getTables()

setDest

public void setDest(File dest)

setFormat

public void setFormat(String format)

isOrdered

public boolean isOrdered()

setOrdered

public void setOrdered(boolean ordered)

getEncoding

public String getEncoding()
Encoding for XML-Output

Returns:
Returns the encoding.

setEncoding

public void setEncoding(String encoding)

addTable

public void addTable(Table table)

addQuery

public void addQuery(Query query)

addQuerySet

public void addQuerySet(QuerySet querySet)

getDoctype

public String getDoctype()

setDoctype

public void setDoctype(String doctype)

execute

public void execute(IDatabaseConnection connection)
             throws DatabaseUnitException
Throws:
DatabaseUnitException

getExportDataSet

protected IDataSet getExportDataSet(IDatabaseConnection connection)
                             throws DatabaseUnitException,
                                    SQLException
Creates the dataset that is finally used for the export

Parameters:
connection -
Returns:
The final dataset used for the export
Throws:
DatabaseUnitException
SQLException

getLogMessage

public String getLogMessage()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012. All Rights Reserved.