net.sourceforge.addam.impexp
Class ExportDataTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.JDBCTask
net.sourceforge.addam.impexp.ExportDataTask
public class ExportDataTask
- extends org.apache.tools.ant.taskdefs.JDBCTask
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 |
Methods inherited from class org.apache.tools.ant.taskdefs.JDBCTask |
createClasspath, getClasspath, getConnection, getLoader, getLoaderMap, getPassword, getRdbms, getUrl, getUserId, getVersion, isAutocommit, isCaching, isValidRdbms, setAutocommit, setCaching, setClasspath, setClasspathRef, setDriver, setPassword, setRdbms, setUrl, setUserid, setVersion |
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 |
includes
private final List<Tables> includes
excludes
private final List<Tables> excludes
dir
protected File dir
schema
private String schema
catalog
private String catalog
ExportDataTask
public ExportDataTask()
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Selects all data from the named tables and extracts to the named files.
- Overrides:
execute
in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- if anything goes wrong
exportTable
public void exportTable(String tableName,
Connection connection)
throws org.apache.tools.ant.BuildException
- Selects all data from the named table and extracts to the named file.
- Throws:
org.apache.tools.ant.BuildException
- if anything goes wrong
setIncludeFile
public void setIncludeFile(File tableFile)
- this is a shortcut for having an subelement by simply providing a filename as an attribute to this task
- Parameters:
tableFile
- a file containing an ordered list of tables
setExcludeFile
public void setExcludeFile(File tableFile)
- this is a shortcut for having a subelement by simply providing a filename as an attribute to this task
- Parameters:
tableFile
- a file containing an ordered list of tables
setIncludesPattern
public void setIncludesPattern(String pattern)
- Parameters:
pattern
- a regexp pattern to compare table names to
setExcludesPattern
public void setExcludesPattern(String pattern)
- Parameters:
pattern
- a regexp pattern to compare table names to
setIncludes
public void setIncludes(String names)
- Parameters:
names
- a comma separated list of table names
setExcludes
public void setExcludes(String names)
- Parameters:
names
- a comma separated list of table names
addIncludeTables
public void addIncludeTables(Tables tables)
- Parameters:
tables
- a set of tables to include or exclude
addExcludeTables
public void addExcludeTables(Tables tables)
- Parameters:
tables
- a set of tables to include or exclude
setDir
public void setDir(File tableDir)
- Parameters:
tableDir
- the directory to write the files into
setSchema
public void setSchema(String schema)
setCatalog
public void setCatalog(String catalog)
getTableNames
protected List<String> getTableNames()
- returns all Tables included by not excluded
- Returns:
- List of Strings each naming a table
Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.