db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r893917 - in /db/ddlutils/trunk/src/main/java/org/apache/ddlutils: ./ io/ model/ platform/maxdb/ platform/mssql/ platform/mysql/ platform/oracle/ platform/sapdb/ platform/sybase/ task/
Date Sat, 26 Dec 2009 00:57:52 GMT
Author: tomdz
Date: Sat Dec 26 00:57:51 2009
New Revision: 893917

URL: http://svn.apache.org/viewvc?rev=893917&view=rev
Log:
Javadoc/checkstyle fixes; Unit-test related fixes to the Sybase, SapDB/MaxDB, SqlServer, Oracle,
and MySql platforms

Modified:
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/PlatformInfo.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataReader.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/XMLUtils.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/model/Index.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/maxdb/MaxDbModelReader.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mysql/MySqlPlatform.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbPlatform.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/task/DumpMetadataTask.java

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/PlatformInfo.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/PlatformInfo.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/PlatformInfo.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/PlatformInfo.java Sat Dec 26 00:57:51
2009
@@ -1250,7 +1250,7 @@
     /**
      * Sets the default ON UPDATE action that is used if none is specified.
      * 
-     * @return The default action
+     * @param defaultOnUpdateAction The default action
      */
     public void setDefaultOnUpdateAction(CascadeActionEnum defaultOnUpdateAction)
     {
@@ -1270,7 +1270,7 @@
     /**
      * Sets the default ON DELETE action that is used if none is specified.
      * 
-     * @return The default action
+     * @param defaultOnDeleteAction The default action
      */
     public void setDefaultOnDeleteAction(CascadeActionEnum defaultOnDeleteAction)
     {

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataReader.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataReader.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataReader.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataReader.java Sat Dec 26 00:57:51
2009
@@ -252,6 +252,11 @@
 
     // TODO: add debug level logging (or trace ?)
 
+    /**
+     * Reads the xml document from the given xml stream reader.
+     * 
+     * @param xmlReader The reader
+     */
     private void readDocument(XMLStreamReader xmlReader) throws XMLStreamException, DdlUtilsXMLException
     {
         // we ignore the top-level tag since we don't know about its name
@@ -267,6 +272,11 @@
         }
     }
 
+    /**
+     * Reads a bean from the given xml stream reader.
+     * 
+     * @param xmlReader The reader
+     */
     private void readBean(XMLStreamReader xmlReader) throws XMLStreamException, DdlUtilsXMLException
     {
         QName elemQName = xmlReader.getName();
@@ -303,6 +313,13 @@
         }
     }
 
+    /**
+     * Reads all column sub elements that match the columns specified by the given table
object from the xml reader into the given bean.
+     *  
+     * @param xmlReader The reader
+     * @param bean      The bean to fill
+     * @param table     The table definition
+     */
     private void readColumnSubElements(XMLStreamReader xmlReader, DynaBean bean, Table table)
throws XMLStreamException, DdlUtilsXMLException
     {
         int eventType = XMLStreamReader.START_ELEMENT;
@@ -317,6 +334,13 @@
         }
     }
 
+    /**
+     * Reads the next column sub element that matches a column specified by the given table
object from the xml reader into the given bean.
+     *  
+     * @param xmlReader The reader
+     * @param bean      The bean to fill
+     * @param table     The table definition
+     */
     private void readColumnSubElement(XMLStreamReader xmlReader, DynaBean bean, Table table)
throws XMLStreamException, DdlUtilsXMLException
     {
         QName   elemQName  = xmlReader.getName();
@@ -359,6 +383,14 @@
         consumeRestOfElement(xmlReader);
     }
 
+    /**
+     * Converts the column value read from the XML stream to an object and sets it at the
given bean.
+     * 
+     * @param bean   The bean
+     * @param table  The table definition
+     * @param column The column definition
+     * @param value  The value as a string
+     */
     private void setColumnValue(DynaBean bean, Table table, Column column, String value)
throws DdlUtilsXMLException
     {
         SqlTypeConverter converter = _converterConf.getRegisteredConverter(table, column);

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/XMLUtils.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/XMLUtils.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/XMLUtils.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/XMLUtils.java Sat Dec 26 00:57:51
2009
@@ -1,38 +1,41 @@
 package org.apache.ddlutils.io;
 
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 /**
-  * Contains basic utility methods for XML.</p>
-  * This class is borrowed from <a href='http://commons.apache.org/betwixt/'>Apache
Commons Betwixt</a>
-  * whose class in turn is based on code in <a href='http://xerces.apache.org/xerces2-j/index.html'>Apache
Xerces</a>.
-  * <p>The code for {@link #isWellFormedXMLName} is based on code in 
-  * <code>org.apache.xerces.util.XMLChar</code> 
-  * in <a href='http://xerces.apache.org/xerces2-j/index.html'>Apache Xerces</a>.
-  * The authors of the Xerces and Betwixt classes are credited below.</p>
-  *
-  * @author Glenn Marcy, IBM
-  * @author Andy Clark, IBM
-  * @author Eric Ye, IBM
-  * @author Arnaud  Le Hors, IBM
-  * @author Rahul Srivastava, Sun Microsystems Inc.  
-  * @author Robert Burrell Donkin
-  */
+ * <p>Contains basic utility methods for XML.</p>
+ * This class is borrowed from <a href='http://commons.apache.org/betwixt/'>Apache
Commons Betwixt</a>
+ * whose class in turn is based on code in <a href='http://xerces.apache.org/xerces2-j/index.html'>Apache
Xerces</a>.
+ * <p>The code for {@link #isWellFormedXMLName} is based on code in 
+ * <code>org.apache.xerces.util.XMLChar</code> 
+ * in <a href='http://xerces.apache.org/xerces2-j/index.html'>Apache Xerces</a>.
+ * The authors of the Xerces and Betwixt classes are credited below.</p>
+ *
+ * @author Glenn Marcy, IBM
+ * @author Andy Clark, IBM
+ * @author Eric Ye, IBM
+ * @author Arnaud  Le Hors, IBM
+ * @author Rahul Srivastava, Sun Microsystems Inc.  
+ * @author Robert Burrell Donkin
+ * @version $Revision: $
+ */
 public class XMLUtils
 {
     /** Name start character mask. */

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/model/Index.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/model/Index.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/model/Index.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/model/Index.java Sat Dec 26 00:57:51
2009
@@ -110,8 +110,7 @@
     public void removeColumn(int idx);
 
     /**
-     * Returns a clone of this index object. This is essentially the same method as
-     * {@link #clone()}, except that it does not throw a checked exception.
+     * Returns a clone of this index object.
      * 
      * @return The clone
      */

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/maxdb/MaxDbModelReader.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/maxdb/MaxDbModelReader.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/maxdb/MaxDbModelReader.java
(original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/maxdb/MaxDbModelReader.java
Sat Dec 26 00:57:51 2009
@@ -68,12 +68,9 @@
         }
         if (column.getTypeCode() == Types.DECIMAL)
         {
-            // For some reason, the size will be reported with 2 byte more, e.g. 17 instead
of 15
-            // So we have to adjust the size here
-            if (column.getSizeAsInt() > 2)
-            {
-                column.setSizeAndScale(column.getSizeAsInt() - 2, column.getScale());
-            }
+            // need to use COLUMN_SIZE for precision instead of NUM_PREC_RADIX
+            column.setPrecisionRadix(column.getSizeAsInt());
+
             // We also perform back-mapping to BIGINT
             if ((column.getSizeAsInt() == 38) && (column.getScale() == 0))
             {

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java Sat
Dec 26 00:57:51 2009
@@ -381,7 +381,7 @@
     /**
      * {@inheritDoc}
      */
-    public void addColumn(Table table, Column newColumn) throws IOException
+    public void addColumn(Database model, Table table, Column newColumn) throws IOException
     {
         print("ALTER TABLE ");
         printlnIdentifier(getTableName(table));

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mysql/MySqlPlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mysql/MySqlPlatform.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mysql/MySqlPlatform.java
(original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/mysql/MySqlPlatform.java
Sat Dec 26 00:57:51 2009
@@ -78,8 +78,10 @@
         info.setDelimiterToken("`");
         info.setSupportedOnUpdateActions(new CascadeActionEnum[] { CascadeActionEnum.NONE,
CascadeActionEnum.RESTRICT,
                                                                    CascadeActionEnum.CASCADE,
CascadeActionEnum.SET_NULL });
+        info.setDefaultOnUpdateAction(CascadeActionEnum.RESTRICT);
         info.setSupportedOnDeleteActions(new CascadeActionEnum[] { CascadeActionEnum.NONE,
CascadeActionEnum.RESTRICT,
                                                                    CascadeActionEnum.CASCADE,
CascadeActionEnum.SET_NULL });
+        info.setDefaultOnDeleteAction(CascadeActionEnum.RESTRICT);
 
         info.addNativeTypeMapping(Types.ARRAY,         "LONGBLOB",   Types.LONGVARBINARY);
         info.addNativeTypeMapping(Types.BIT,           "TINYINT(1)");

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/oracle/Oracle8Builder.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
(original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
Sat Dec 26 00:57:51 2009
@@ -352,7 +352,7 @@
     /**
      * {@inheritDoc}
      */
-    public void addColumn(Table table, Column newColumn) throws IOException
+    public void addColumn(Database model, Table table, Column newColumn) throws IOException
     {
         print("ALTER TABLE ");
         printlnIdentifier(getTableName(table));

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java Sat
Dec 26 00:57:51 2009
@@ -135,7 +135,7 @@
     /**
      * {@inheritDoc}
      */
-    public void addColumn(Table table, Column newColumn) throws IOException
+    public void addColumn(Database model, Table table, Column newColumn) throws IOException
     {
         print("ALTER TABLE ");
         printlnIdentifier(getTableName(table));

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbPlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbPlatform.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbPlatform.java
(original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sapdb/SapDbPlatform.java
Sat Dec 26 00:57:51 2009
@@ -32,6 +32,7 @@
 import org.apache.ddlutils.alteration.RemovePrimaryKeyChange;
 import org.apache.ddlutils.alteration.TableChange;
 import org.apache.ddlutils.alteration.TableDefinitionChangesPredicate;
+import org.apache.ddlutils.model.CascadeActionEnum;
 import org.apache.ddlutils.model.Column;
 import org.apache.ddlutils.model.Database;
 import org.apache.ddlutils.model.Table;
@@ -66,6 +67,9 @@
         info.setMultipleIdentityColumnsSupported(false);
         info.setCommentPrefix("/*");
         info.setCommentSuffix("*/");
+        info.setSupportedOnUpdateActions(new CascadeActionEnum[] { CascadeActionEnum.NONE
});
+        info.setDefaultOnDeleteAction(CascadeActionEnum.RESTRICT);
+        info.setSupportedOnDeleteActions(new CascadeActionEnum[] { CascadeActionEnum.CASCADE,
CascadeActionEnum.RESTRICT, CascadeActionEnum.SET_DEFAULT, CascadeActionEnum.SET_NULL, CascadeActionEnum.NONE
});
 
         // BIGINT is also handled by the model reader
         // Unfortunately there is no way to distinguish between REAL, and FLOAT/DOUBLE when
@@ -162,7 +166,7 @@
 
                     // we can however handle the change if only the default value or the
required status was changed
                     return ((curColumn.getTypeCode() == newColumn.getTypeCode()) &&
-                           (!getPlatformInfo().hasSize(curColumn.getTypeCode()) || StringUtilsExt.equals(curColumn.getSize(),
newColumn.getSize())) &&
+                           !ColumnDefinitionChange.isSizeChanged(getPlatformInfo(), curColumn,
newColumn) &&
                            (curColumn.isAutoIncrement() == newColumn.isAutoIncrement()));
                 }
                 else

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java
(original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java
Sat Dec 26 00:57:51 2009
@@ -397,7 +397,7 @@
     /**
      * {@inheritDoc}
      */
-    public void addColumn(Table table, Column newColumn) throws IOException
+    public void addColumn(Database model, Table table, Column newColumn) throws IOException
     {
         print("ALTER TABLE ");
         printlnIdentifier(getTableName(table));

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/task/DumpMetadataTask.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/task/DumpMetadataTask.java?rev=893917&r1=893916&r2=893917&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/task/DumpMetadataTask.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/task/DumpMetadataTask.java Sat Dec
26 00:57:51 2009
@@ -278,10 +278,10 @@
     }
 
     /**
-     * Dumps the database meta data into XML elements under the given element.
+     * Dumps the database meta data into XML elements under the current element in the given
writer.
      * 
-     * @param element  The XML element
-     * @param metaData The meta data
+     * @param xmlWriter The XML writer to write to
+     * @param metaData  The meta data to write
      */
     private void dumpMetaData(PrettyPrintingXmlWriter xmlWriter, DatabaseMetaData metaData)
throws NoSuchMethodException,
                                                                                         
          IllegalAccessException,
@@ -317,9 +317,9 @@
     }
 
     /**
-     * Dumps the property represented by the given method.
+     * Dumps the property represented by the given method in the current element in the given
writer.
      * 
-     * @param parent     The parent XML element
+     * @param xmlWriter  The XML writer to write to
      * @param obj        The instance we're working on
      * @param propGetter The method for accessing the property
      */
@@ -336,12 +336,12 @@
     }
 
     /**
-     * Adds a property to the given element, either as an attribute (primitive value or
+     * Adds a property to the current element in the given xml writer, either as an attribute
(primitive value or
      * string) or as a sub element.
      * 
-     * @param element The XML element
-     * @param name    The name of the property
-     * @param value   The value of the property
+     * @param xmlWriter The XML writer to write to
+     * @param name      The name of the property
+     * @param value     The value of the property
      */
     private void addProperty(PrettyPrintingXmlWriter xmlWriter, String name, Object value)
     {
@@ -363,11 +363,11 @@
     }
 
     /**
-     * Adds a property to the given XML element that is represented as an array.
+     * Adds a property that is represented as an array to the current element in the given
xml writer.
      * 
-     * @param element The XML element
-     * @param name    The name of the property
-     * @param values  The values of the property
+     * @param xmlWriter The XML writer to write to
+     * @param name      The name of the property
+     * @param values    The values of the property
      */
     private void addArrayProperty(PrettyPrintingXmlWriter xmlWriter, String name, Object[]
values)
     {
@@ -387,11 +387,11 @@
     }
     
     /**
-     * Adds a property to the given XML element that is represented as a result set.
+     * Adds a property that is represented as a result set to the current element in the
given xml writer.
      * 
-     * @param element The XML element
-     * @param name    The name of the property
-     * @param result  The values of the property as a result set
+     * @param xmlWriter The XML writer to write to
+     * @param name      The name of the property
+     * @param result    The values of the property as a result set
      */
     private void addResultSetProperty(PrettyPrintingXmlWriter xmlWriter, String name, ResultSet
result)
     {
@@ -475,13 +475,42 @@
         }
     }
 
+    /**
+     * Defines an interface for a callback that retrieves a specific result set from the
metadata, and
+     * also writes rows to a given xml writer as well as handles errors.
+     */
     private static interface ResultSetXmlOperation
     {
+        /**
+         * Returns the result set to work on.
+         * 
+         * @return The result set
+         */
         public ResultSet getResultSet() throws SQLException;
+
+        /**
+         * Writes the row currently maintained by the given result set to the given xml writer.
+         * 
+         * @param xmlWriter The xml writer to write to
+         * @param result    The row to write
+         */
         public void handleRow(PrettyPrintingXmlWriter xmlWriter, ResultSet result) throws
SQLException;
+
+        /**
+         * Handles the given exception.
+         * 
+         * @param ex The sql exception
+         */
         public void handleError(SQLException ex);
     }
 
+    /**
+     * Helper method that performs the given operation.
+     * 
+     * @param xmlWriter The xml writer that the operation shall write to
+     * @param name      The name of the xml element surrounding the operation's output
+     * @param op        The operation
+     */
     private void performResultSetXmlOperation(PrettyPrintingXmlWriter xmlWriter, String name,
ResultSetXmlOperation op)
     {
         ResultSet result = null;
@@ -532,8 +561,8 @@
     /**
      * Dumps the catalogs and schemas of the database.
      * 
-     * @param parent   The parent element
-     * @param metaData The database meta data
+     * @param xmlWriter The xml writer to write to
+     * @param metaData  The database meta data
      */
     private void dumpCatalogsAndSchemas(PrettyPrintingXmlWriter xmlWriter, final DatabaseMetaData
metaData)
     {
@@ -590,8 +619,8 @@
     /**
      * Dumps all tables.
      * 
-     * @param parent   The parent element
-     * @param metaData The database metadata
+     * @param xmlWriter The xml writer to write to
+     * @param metaData  The database metadata
      */
     private void dumpTables(PrettyPrintingXmlWriter xmlWriter, final DatabaseMetaData metaData)
     {
@@ -689,7 +718,7 @@
     /**
      * Dumps the columns of the indicated table.
      * 
-     * @param tableElem   The XML element for the table
+     * @param xmlWriter   The xml writer to write to
      * @param metaData    The database metadata
      * @param catalogName The catalog name
      * @param schemaName  The schema name
@@ -792,7 +821,7 @@
     /**
      * Dumps the primary key columns of the indicated table.
      * 
-     * @param tableElem   The XML element for the table
+     * @param xmlWriter   The xml writer to write to
      * @param metaData    The database metadata
      * @param catalogName The catalog name
      * @param schemaName  The schema name
@@ -838,7 +867,7 @@
     /**
      * Dumps the versioned (auto-updating) columns of the indicated table.
      * 
-     * @param tableElem   The XML element for the table
+     * @param xmlWriter   The xml writer to write to
      * @param metaData    The database metadata
      * @param catalogName The catalog name
      * @param schemaName  The schema name
@@ -908,7 +937,7 @@
     /**
      * Dumps the foreign key columns of the indicated table to other tables.
      * 
-     * @param tableElem   The XML element for the table
+     * @param xmlWriter   The xml writer to write to
      * @param metaData    The database metadata
      * @param catalogName The catalog name
      * @param schemaName  The schema name
@@ -1036,7 +1065,7 @@
     /**
      * Dumps the indexes of the indicated table.
      * 
-     * @param tableElem   The XML element for the table
+     * @param xmlWriter   The xml writer to write to
      * @param metaData    The database metadata
      * @param catalogName The catalog name
      * @param schemaName  The schema name
@@ -1133,8 +1162,8 @@
     /**
      * Dumps all procedures.
      * 
-     * @param parent   The parent element
-     * @param metaData The database metadata
+     * @param xmlWriter The xml writer to write to
+     * @param metaData  The database metadata
      */
     private void dumpProcedures(PrettyPrintingXmlWriter xmlWriter, final DatabaseMetaData
metaData) throws SQLException
     {
@@ -1209,7 +1238,7 @@
     /**
      * Dumps the contents of the indicated procedure.
      * 
-     * @param procedureElem The XML element for the procedure
+     * @param xmlWriter     The xml writer to write to
      * @param metaData      The database metadata
      * @param catalogName   The catalog name
      * @param schemaName    The schema name
@@ -1311,11 +1340,11 @@
     /**
      * If the result set contains the indicated column, extracts its value and sets an attribute
at the given element.
      * 
+     * @param xmlWriter  The xml writer to write to
+     * @param attrName   The name of the attribute to write
      * @param result     The result set
      * @param columns    The columns in the result set
      * @param columnName The name of the column in the result set
-     * @param element    The element to add the attribute
-     * @param attrName   The name of the attribute to set
      */
     private void addStringAttribute(PrettyPrintingXmlWriter xmlWriter, String attrName, ResultSet
result, Set columns, String columnName) throws SQLException
     {
@@ -1335,11 +1364,11 @@
     /**
      * If the result set contains the indicated column, extracts its int value and sets an
attribute at the given element.
      * 
+     * @param xmlWriter  The xml writer to write to
+     * @param attrName   The name of the attribute to write
      * @param result     The result set
      * @param columns    The columns in the result set
      * @param columnName The name of the column in the result set
-     * @param element    The element to add the attribute
-     * @param attrName   The name of the attribute to set
      */
     private void addIntAttribute(PrettyPrintingXmlWriter xmlWriter, String attrName, ResultSet
result, Set columns, String columnName) throws SQLException
     {
@@ -1373,11 +1402,11 @@
     /**
      * If the result set contains the indicated column, extracts its short value and sets
an attribute at the given element.
      * 
+     * @param xmlWriter  The xml writer to write to
+     * @param attrName   The name of the attribute to write
      * @param result     The result set
      * @param columns    The columns in the result set
      * @param columnName The name of the column in the result set
-     * @param element    The element to add the attribute
-     * @param attrName   The name of the attribute to set
      */
     private void addShortAttribute(PrettyPrintingXmlWriter xmlWriter, String attrName, ResultSet
result, Set columns, String columnName) throws SQLException
     {
@@ -1411,11 +1440,11 @@
     /**
      * If the result set contains the indicated column, extracts its boolean value and sets
an attribute at the given element.
      * 
+     * @param xmlWriter  The xml writer to write to
+     * @param attrName   The name of the attribute to write
      * @param result     The result set
      * @param columns    The columns in the result set
      * @param columnName The name of the column in the result set
-     * @param element    The element to add the attribute
-     * @param attrName   The name of the attribute to set
      */
     private void addBooleanAttribute(PrettyPrintingXmlWriter xmlWriter, String attrName,
ResultSet result, Set columns, String columnName) throws SQLException
     {



Mime
View raw message