Package org.apache.torque.ant.task

## Class Torque4JDBCTransformTask

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.torque.ant.task.Torque4JDBCTransformTask

- All Implemented Interfaces:
    `Cloneable`

      public class Torque4JDBCTransformTask
      extends org.apache.tools.ant.Task

  This class generates an XML schema of an existing database from JDBC metadata.
  Version:
    $Id: Torque4JDBCTransformTask.java 1873257 2020-01-28 15:47:06Z gk $
  Author:
    Jason van Zyl, Fedor Karpelevitch

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected String` | `dbDriver` | JDBC driver.
    `protected String` | `dbPassword` | JDBC password.
    `protected String` | `dbUrl` | JDBC URL.
    `protected String` | `dbUser` | JDBC user name.
    `protected String` | `xmlSchema` | Name of XML database schema produced.

    - ### 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

    Constructors
    Constructor | Description
    --- | ---
    `Torque4JDBCTransformTask()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `execute()` | Default constructor.
    `void` | `generateXML()` | Generates an XML database schema from JDBC metadata.
    `void` | `setConfigDir​(File configDir)` |
    `void` | `setConfigPackage​(String configPackage)` |
    `void` | `setDbDriver​(String v)` |
    `void` | `setDbPassword​(String dbPassword)` |
    `void` | `setDbUrl​(String v)` |
    `void` | `setDbUser​(String dbUser)` |
    `void` | `setDefaultOutputDir​(File defaultOutputDir)` | Sets the default output base directory for generated files.
    `void` | `setPackaging​(String packaging)` | Sets the packaging.
    `void` | `setProjectRootDir​(File projectRootDir)` | Sets the root directory of the project.

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### xmlSchema

          protected String xmlSchema

      Name of XML database schema produced.

    - #### dbUrl

          protected String dbUrl

      JDBC URL.

    - #### dbDriver

          protected String dbDriver

      JDBC driver.

    - #### dbUser

          protected String dbUser

      JDBC user name.

    - #### dbPassword

          protected String dbPassword

      JDBC password.

  - ### Constructor Detail

    - #### Torque4JDBCTransformTask

          public Torque4JDBCTransformTask()

  - ### Method Detail

    - #### setDbUrl

          public void setDbUrl​(String v)

    - #### setDbDriver

          public void setDbDriver​(String v)

    - #### execute

          public void execute()
                       throws org.apache.tools.ant.BuildException

      Default constructor.
      Overrides:
        `execute` in class `org.apache.tools.ant.Task`
      Throws:
        `org.apache.tools.ant.BuildException`

    - #### generateXML

          public void generateXML()
                           throws Exception

      Generates an XML database schema from JDBC metadata.
      Throws:
        `Exception` - a generic exception.

    - #### setConfigDir

          public void setConfigDir​(File configDir)

    - #### setConfigPackage

          public void setConfigPackage​(String configPackage)

    - #### setDefaultOutputDir

          public void setDefaultOutputDir​(File defaultOutputDir)

      Sets the default output base directory for generated files.
      Parameters:
        `defaultOutputDir` - the default output directory, or null to use the default.

    - #### setProjectRootDir

          public void setProjectRootDir​(File projectRootDir)

      Sets the root directory of the project.
      Parameters:
        `projectRootDir` - the project root Directory.

    - #### setPackaging

          public void setPackaging​(String packaging)

      Sets the packaging.
      Parameters:
        `packaging` - the packaging or "directory"

    - #### setDbUser

          public void setDbUser​(String dbUser)

    - #### setDbPassword

          public void setDbPassword​(String dbPassword)