Package org.dbunit.ant
Class Export
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.dbunit.ant.AbstractStep
org.dbunit.ant.Export
- All Implemented Interfaces:
Cloneable,DbUnitTaskStep
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$
- Author:
- Timothy Ruppert, Ben Cox
- See Also:
-
Field Summary
Fields inherited from class org.dbunit.ant.AbstractStep
FORMAT_CSV, FORMAT_DTD, FORMAT_FLAT, FORMAT_XLS, FORMAT_XML, FORMAT_YMLFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddQuerySet(QuerySet querySet) voidvoidexecute(IDatabaseConnection connection) getDest()Encoding for XML-Outputprotected IDataSetgetExportDataSet(IDatabaseConnection connection) Creates the dataset that is finally used for the exportvoidvoidsetDoctype(String doctype) voidsetEncoding(String encoding) voidsetEncoding(Charset encoding) voidtoString()Methods inherited from class org.dbunit.ant.AbstractStep
checkDataFormat, getDatabaseDataSet, getInputSource, getSrcDataSet, isDataFormat, isOrdered, setOrderedMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
Export
public Export()
-
-
Method Details
-
getDest
-
getFormat
-
getTables
-
setDest
-
setFormat
-
getEncoding
Encoding for XML-Output- Returns:
- Returns the encoding.
-
setEncoding
-
setEncoding
-
addTable
-
addQuery
-
addQuerySet
-
getDoctype
-
setDoctype
-
execute
- 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:
DatabaseUnitExceptionSQLException
-
getLogMessage
-
toString
- Overrides:
toStringin classAbstractStep
-