You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/04/19 17:54:17 UTC

cvs commit: jakarta-turbine/src/java/org/apache/turbine/torque TorqueJDBCTransformTask.java TorqueSQLTransformTask.java

jvanzyl     01/04/19 08:54:17

  Modified:    src/java/org/apache/turbine/torque
                        TorqueJDBCTransformTask.java
                        TorqueSQLTransformTask.java
  Log:
  - the sql2xml task now works from torque
  - jdbc2xml task has been antified but still needs work
  
  Revision  Changes    Path
  1.4       +7 -10     jakarta-turbine/src/java/org/apache/turbine/torque/TorqueJDBCTransformTask.java
  
  Index: TorqueJDBCTransformTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/torque/TorqueJDBCTransformTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TorqueJDBCTransformTask.java	2001/03/19 22:30:00	1.3
  +++ TorqueJDBCTransformTask.java	2001/04/19 15:54:04	1.4
  @@ -63,14 +63,17 @@
   import org.apache.xerces.dom.*;
   import org.apache.xml.serialize.*;
   
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Task;
  +
   /**
    * This class generates an XML schema of an existing database from
    * JDBC metadata.
    *
    *  @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
  - *  @version $Id: TorqueJDBCTransformTask.java,v 1.3 2001/03/19 22:30:00 dlr Exp $
  + *  @version $Id: TorqueJDBCTransformTask.java,v 1.4 2001/04/19 15:54:04 jvanzyl Exp $
    */
  -public class TorqueJDBCTransformTask
  +public class TorqueJDBCTransformTask extends Task
   {
       /** Torque properties. */
       protected Properties props;
  @@ -110,13 +113,8 @@
       /**
        * Default constructor.
        */
  -    public TorqueJDBCTransformTask()
  +    public void execute() throws BuildException
       {
  -        //props = Utils.loadProps("config/torque.props");
  -        //sqlTypes = Utils.loadProps("config/torque.types");
  -        
  -        // This is just to get this thing to compile.
  -        // This has to be turned into an Ant task proper.
           props = new Properties();
           sqlTypes = new Properties();
           
  @@ -159,8 +157,7 @@
        *
        * @exception Exception, a generic exception.
        */
  -    public void generateXML()
  -        throws Exception
  +    public void generateXML() throws Exception
       {
           // Load the Interbase Driver.
           Class.forName(dbDriver);
  
  
  
  1.3       +3 -8      jakarta-turbine/src/java/org/apache/turbine/torque/TorqueSQLTransformTask.java
  
  Index: TorqueSQLTransformTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/torque/TorqueSQLTransformTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TorqueSQLTransformTask.java	2001/03/06 06:13:07	1.2
  +++ TorqueSQLTransformTask.java	2001/04/19 15:54:07	1.3
  @@ -66,9 +66,9 @@
    * An ant task for creating an xml schema from an sql schema
    *
    * @author <a href="mailto:leon@opticode.co.za>Leon Messerschmidt</a>
  - * @version $Id: TorqueSQLTransformTask.java,v 1.2 2001/03/06 06:13:07 chrise Exp $
  + * @version $Id: TorqueSQLTransformTask.java,v 1.3 2001/04/19 15:54:07 jvanzyl Exp $
    */
  -public class TorqueSQLTransformTask
  +public class TorqueSQLTransformTask extends Task
   {
   
       private String inputFile;
  @@ -109,12 +109,7 @@
           outputFile = v;
       }
   
  -
  -
  -    /**
  -     * Execute the input script with WM
  -     */
  -    public void execute () throws Exception
  +    public void execute () throws BuildException
       {
           try
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org