Class DumpMetadataTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.task.DumpMetadataTask
- All Implemented Interfaces:
Cloneable
public class DumpMetadataTask
extends org.apache.tools.ant.Task
A simple helper task that dumps information about a database using JDBC.
- Version:
- $Revision: 289996 $
-
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfiguredDatabase
(org.apache.commons.dbcp.BasicDataSource dataSource) Adds the data source to use for accessing the database.void
execute()
void
setCatalogPattern
(String catalogPattern) Sets the catalog pattern used when accessing the database.void
setColumnPattern
(String columnPattern) Specifies the columns to be processed.void
setDumpProcedures
(boolean readProcedures) Specifies whether procedures shall be read from the database.void
setDumpTables
(boolean readTables) Specifies whether tables shall be read from the database.void
setOutputEncoding
(String encoding) Specifies the encoding of the output file.void
setOutputFile
(File outputFile) Specifies the output file to which the database metadata is written to.void
setProcedurePattern
(String procedurePattern) Specifies the procedures to be processed.void
setSchemaPattern
(String schemaPattern) Sets the schema pattern used when accessing the database.void
setTablePattern
(String tablePattern) Specifies the table to be processed.void
setTableTypes
(String tableTypes) Specifies the table types to be processed.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
DumpMetadataTask
public DumpMetadataTask()
-
-
Method Details
-
addConfiguredDatabase
public void addConfiguredDatabase(org.apache.commons.dbcp.BasicDataSource dataSource) Adds the data source to use for accessing the database.- Parameters:
dataSource
- The data source
-
setOutputFile
Specifies the output file to which the database metadata is written to.- Parameters:
outputFile
- The output file
-
setOutputEncoding
Specifies the encoding of the output file.- Parameters:
encoding
- The encoding
-
setCatalogPattern
Sets the catalog pattern used when accessing the database.- Parameters:
catalogPattern
- The catalog pattern
-
setSchemaPattern
Sets the schema pattern used when accessing the database.- Parameters:
schemaPattern
- The schema pattern
-
setTablePattern
Specifies the table to be processed. For details see java.sql.DatabaseMetaData#getTables.- Parameters:
tablePattern
- The table pattern
-
setProcedurePattern
Specifies the procedures to be processed. For details and typical table types see java.sql.DatabaseMetaData#getProcedures.- Parameters:
procedurePattern
- The procedure pattern
-
setColumnPattern
Specifies the columns to be processed. For details and typical table types see java.sql.DatabaseMetaData#getColumns.- Parameters:
columnPattern
- The column pattern
-
setTableTypes
Specifies the table types to be processed. For details and typical table types see java.sql.DatabaseMetaData#getTables.- Parameters:
tableTypes
- The table types to read
-
setDumpProcedures
public void setDumpProcedures(boolean readProcedures) Specifies whether procedures shall be read from the database.- Parameters:
readProcedures
-true
if procedures shall be read
-
setDumpTables
public void setDumpTables(boolean readTables) Specifies whether tables shall be read from the database.- Parameters:
readTables
-true
if tables shall be read
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
-