db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r292045 [3/5] - in /db/ddlutils/trunk: ./ lib/ lib/build-only/ src/check/ src/doc/src/documentation/ src/doc/src/documentation/content/xdocs/ src/java/org/apache/ddlutils/ src/java/org/apache/ddlutils/builder/ src/java/org/apache/ddlutils/d...
Date Tue, 27 Sep 2005 21:03:01 GMT
Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyFromSubElementRule.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyFromSubElementRule.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyFromSubElementRule.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyFromSubElementRule.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,14 +25,14 @@
  * A digester rule for setting a bean property that corresponds to a column
  * with the value derived from a sub element. 
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
- * @version $Revision:$
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class SetColumnPropertyFromSubElementRule extends Rule
 {
-    /** The column that this rule shall set */
+    /** The column that this rule shall set. */
     private Column _column;
-    /** The converter for generating the property value from a string */
+    /** The converter for generating the property value from a string. */
     private SqlTypeConverter _converter;
 
     /**
@@ -47,9 +47,8 @@
         _converter = converter;
     }
 
-    
-    /* (non-Javadoc)
-     * @see org.apache.commons.digester.Rule#body(java.lang.String)
+    /**
+     * {@inheritDoc}
      */
     public void body(String text) throws Exception
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyRule.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyRule.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyRule.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/SetColumnPropertyRule.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,23 +25,24 @@
 /**
  * A digester rule for setting a bean property that corresponds to a column. 
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
- * @version $Revision:$
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class SetColumnPropertyRule extends Rule
 {
-    /** The column that this rule shall set */
+    /** The column that this rule shall set. */
     private Column _column;
-    /** The converter for generating the property value from a string */
+    /** The converter for generating the property value from a string. */
     private SqlTypeConverter _converter;
-    /** Whether to be case sensitive or not when comparing the attribute name */
+    /** Whether to be case sensitive or not when comparing the attribute name. */
     private boolean _caseSensitive;
 
     /**
      * Creates a new creation rule that sets the property corresponding to the given column.
      * 
-     * @param column    The column that this rule shall set
-     * @param converter The converter to be used for this column
+     * @param column          The column that this rule shall set
+     * @param converter       The converter to be used for this column
+     * @param beCaseSensitive Whether the rule shall compare the attribute names case sensitively
      */
     public SetColumnPropertyRule(Column column, SqlTypeConverter converter, boolean beCaseSensitive)
     {
@@ -50,8 +51,8 @@
         _caseSensitive = beCaseSensitive;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.digester.Rule#begin(org.xml.sax.Attributes)
+    /**
+     * {@inheritDoc}
      */
     public void begin(Attributes attributes) throws Exception
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/WaitingObject.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/WaitingObject.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/WaitingObject.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/WaitingObject.java Tue Sep 27 13:55:42 2005
@@ -1,5 +1,21 @@
 package org.apache.ddlutils.io;
 
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ */
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -10,12 +26,15 @@
  * Represents an object waiting for insertion into the database. Is used by the
  * {@link org.apache.ddlutils.io.DataToDatabaseSink} to insert the objects in the correct
  * order according to their foreign keys.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class WaitingObject
 {
-    /** The object that is waiting for insertion */
+    /** The object that is waiting for insertion. */
     private DynaBean _obj;
-    /** The identities of the waited-for objects */
+    /** The identities of the waited-for objects. */
     private List _waitedForIdentites = new ArrayList();
 
     /**

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/DateConverter.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/DateConverter.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/DateConverter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/DateConverter.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io.converters;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,11 +22,14 @@
 /**
  * Converts between {@link java.sql.Date} and {@link java.lang.String} using the standard
  * representation "yyyy", or "yyyy-mm", or "yyyy-mm-dd".
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class DateConverter implements SqlTypeConverter 
 {
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertFromString(java.lang.String, int)
+    /**
+     * {@inheritDoc}
      */
     public Object convertFromString(String textRep, int sqlTypeCode) throws Exception
     {
@@ -73,8 +76,8 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertToString(java.lang.Object, int)
+    /**
+     * {@inheritDoc}
      */
     public String convertToString(Object obj, int sqlTypeCode)
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/NumberConverter.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/NumberConverter.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/NumberConverter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/NumberConverter.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io.converters;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,11 +24,14 @@
 
 /**
  * Converts between the various number types (including boolean types) and {@link java.lang.String}.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class NumberConverter implements SqlTypeConverter
 {
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertFromString(java.lang.String, int)
+    /**
+     * {@inheritDoc}
      */
     public Object convertFromString(String textRep, int sqlTypeCode) throws Exception
     {
@@ -38,7 +41,6 @@
         }
         else
         {
-            Object result      = textRep;
             Class  targetClass = null;
 
             switch (sqlTypeCode)
@@ -79,8 +81,8 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertToString(java.lang.Object, int)
+    /**
+     * {@inheritDoc}
      */
     public String convertToString(Object obj, int sqlTypeCode) throws Exception
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/SqlTypeConverter.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/SqlTypeConverter.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/SqlTypeConverter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/SqlTypeConverter.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io.converters;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,9 @@
 
 /**
  * Interface for classes that convert between strings and sql data types.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public interface SqlTypeConverter
 {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimeConverter.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimeConverter.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimeConverter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimeConverter.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io.converters;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,11 +22,14 @@
 /**
  * Converts between {@link java.sql.Time} and {@link java.lang.String} using the standard
  * representation "hh:mm:ss".
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class TimeConverter implements SqlTypeConverter 
 {
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertFromString(java.lang.String, int)
+    /**
+     * {@inheritDoc}
      */
     public Object convertFromString(String textRep, int sqlTypeCode) throws Exception
     {
@@ -73,8 +76,8 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertToString(java.lang.Object, int)
+    /**
+     * {@inheritDoc}
      */
     public String convertToString(Object obj, int sqlTypeCode)
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimestampConverter.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimestampConverter.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimestampConverter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/TimestampConverter.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.io.converters;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,20 +22,22 @@
 /**
  * Converts between {@link java.sql.Timestamp} and {@link java.lang.String} using the standard
  * representation "yyyy-mm-dd hh:mm:ss.fffffffff".
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class TimestampConverter implements SqlTypeConverter 
 {
-    
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertFromString(java.lang.String, int)
+    /**
+     * {@inheritDoc}
      */
     public Object convertFromString(String textRep, int sqlTypeCode) throws Exception
     {
         return sqlTypeCode == Types.TIMESTAMP ? Timestamp.valueOf(textRep) : (Object)textRep;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.io.converters.SqlTypeConverter#convertToString(java.lang.Object, int)
+    /**
+     * {@inheritDoc}
      */
     public String convertToString(Object obj, int sqlTypeCode)
     {

Added: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/package.html
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/package.html?rev=292045&view=auto
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/package.html (added)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/converters/package.html Tue Sep 27 13:55:42 2005
@@ -0,0 +1,30 @@
+<html>
+<head>
+<!-- 
+ Copyright 1999-2005 The Apache Software Foundation.
+ 
+ Licensed 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.
+ -->
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="Thomas Dudziak">
+</head>
+<body bgcolor="white">
+  <p>
+  	This package contains helper classes that convert between textual representations
+  	and values of the types that correspond to the JDBC type codes given by
+  	{@link java.sql.Types}. These converters are used by the 
+  	{@link org.apache.ddlutils.io.DataReader} when inserting data into the database.
+<!-- TODO: Add a reference to DataWriter once it uses converters -->
+  </p>
+</body>
+</html>

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Column.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Column.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Column.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Column.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,200 +16,227 @@
  * limitations under the License.
  */
 
-public class Column implements Cloneable
-{
-    // TODO: Implement equals and hashcode
-    private String name;
-    private String javaName;
-    private String description;
-    private boolean primaryKey = false;
-    private boolean required = false;
-    private boolean autoIncrement = false;
-    private int typeCode;
-    private String type;
-    private String size = null;
-    private String defaultValue = null;
-    private int scale = 0;
-    private int precisionRadix = 10;
-    private int ordinalPosition = 0;
-
-    public Column()
-    {
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
-     */
-    public Object clone() throws CloneNotSupportedException
-    {
-        Column result = new Column();
+import java.io.Serializable;
 
-        result.name            = name;
-        result.javaName        = javaName;
-        result.primaryKey      = primaryKey;
-        result.required        = required;
-        result.autoIncrement   = autoIncrement;
-        result.typeCode        = typeCode;
-        result.type            = type;
-        result.size            = size;
-        result.defaultValue    = defaultValue;
-        result.scale           = scale;
-        result.precisionRadix  = precisionRadix;
-        result.ordinalPosition = ordinalPosition;
-        return result;
-    }
+/**
+ * Represents a column in the database model.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision$
+ */
+public class Column implements Cloneable, Serializable
+{
+    /** Unique ID for serialization purposes. */
+    private static final long serialVersionUID = -6226348998874210093L;
 
-    public Column(String name, String javaName, int typeCode, String size, boolean required, boolean
-                  primaryKey, boolean autoIncrement, String defaultValue)
-    {
-        this.name = name;
-        this.javaName = javaName;
-        this.typeCode = typeCode;
-        this.type = TypeMap.getJdbcTypeName(typeCode);
-        this.size = size;
-        this.required = required;
-        this.primaryKey = primaryKey;
-        this.autoIncrement = autoIncrement;
-        this.defaultValue = defaultValue;
-    }
-
-    public Column(String name, String javaName, String type, String size, boolean required, boolean
-                  primaryKey, boolean autoIncrement, String defaultValue  )
-    {
-        this(name, javaName, TypeMap.getJdbcTypeCode(type), size, required, primaryKey, autoIncrement, defaultValue);
-    }
-
-    public Column(String name, String javaName, int typeCode, String size, boolean required, boolean
-                  primaryKey, boolean autoIncrement, String defaultValue,
-                  int scale)
-    {
-        this.name = name;
-        this.javaName = javaName;
-        this.typeCode = typeCode;
-        this.type = TypeMap.getJdbcTypeName(typeCode);
-        this.size = size;
-        this.required = required;
-        this.primaryKey = primaryKey;
-        this.autoIncrement = autoIncrement;
-        this.defaultValue = defaultValue;
-        this.scale = scale;
-    }
+    /** The name of the column. */
+    private String _name;
+    /** The java name of the column (optional and unused by DdlUtils, for Torque compatibility). */
+    private String _javaName;
+    /** The column's description. */
+    private String _description;
+    /** Whether the column is a primary key column. */
+    private boolean _primaryKey;
+    /** Whether the column is required, ie. it must not contain <code>NULL</code>. */
+    private boolean _required;
+    /** Whether the column's value is incremented automatically. */
+    private boolean _autoIncrement;
+    /** The JDBC type code, one of the constants in {@link java.sql.Types}. */
+    private int _typeCode;
+    /** The name of the JDBC type. */
+    private String _type;
+    /** The size of the column for JDBC types that require/support this. */
+    private String _size;
+    /** The scale of the column for JDBC types that require/support this. */
+    private int _scale = 0;
+    /** The precision radix of the column for JDBC types that require/support this. */
+    private int _precisionRadix = 10;
+    /** The ordinal position of the column for JDBC types that require/support this. */
+    private int _ordinalPosition = 0;
+    /** The default value. */
+    private String _defaultValue;
 
-    public String toString()
-    {
-        return super.toString() + "[name=" + name + ";type=" + type + "]";
-    }
-
-    public String toStringAll()
-    {
-        return "Column[name=" + name +
-            ";javaName=" + javaName +
-            ";type=" + type +
-            ";typeCode=" + typeCode +
-            ";size=" + size +
-            ";required=" + required +
-            ";pk=" + primaryKey +
-            ";auto=" + autoIncrement +
-            ";default=" + defaultValue +
-            ";scale=" + scale +
-            ";prec=" + precisionRadix +
-            ";ord=" + ordinalPosition +
-            "]";
-    }
+    // TODO: Implement equals and hashcode
 
+    /**
+     * Returns the name of the column.
+     * 
+     * @return The name
+     */
     public String getName()
     {
-        return name;
+        return _name;
     }
 
+    /**
+     * Sets the name of the column.
+     * 
+     * @param name The name
+     */
     public void setName(String name)
     {
-        this.name = name;
+        _name = name;
     }
 
+    /**
+     * Returns the java name of the column. This property is unused by DdlUtils and only
+     * for Torque compatibility.
+     * 
+     * @return The java name
+     */
     public String getJavaName()
     {
-        return javaName;
+        return _javaName;
     }
 
+    /**
+     * Sets the java name of the column. This property is unused by DdlUtils and only
+     * for Torque compatibility.
+     * 
+     * @param javaName The java name
+     */
     public void setJavaName(String javaName)
     {
-        this.javaName = javaName;
+        _javaName = javaName;
     }
 
     /**
-     * Returns the description.
+     * Returns the description of the column.
      *
      * @return The description
      */
     public String getDescription()
     {
-        return description;
+        return _description;
     }
 
     /**
-     * Sets the description.
+     * Sets the description of the column.
      *
      * @param description The description
      */
     public void setDescription(String description)
     {
-        this.description = description;
+        _description = description;
     }
 
+    /**
+     * Determines whether this column is a primary key column.
+     * 
+     * @return <code>true</code> if this column is a primary key column
+     */
     public boolean isPrimaryKey()
     {
-        return primaryKey;
+        return _primaryKey;
     }
 
+    /**
+     * Specifies whether this column is a primary key column.
+     * 
+     * @param primaryKey <code>true</code> if this column is a primary key column
+     */
     public void setPrimaryKey(boolean primaryKey)
     {
-        this.primaryKey = primaryKey;
+        _primaryKey = primaryKey;
     }
 
+    /**
+     * Determines whether this column is a required column, ie. that it is not allowed
+     * to contain <code>NULL</code> values.
+     * 
+     * @return <code>true</code> if this column is a required column
+     */
     public boolean isRequired()
     {
-        return required;
+        return _required;
     }
 
+    /**
+     * Specifies whether this column is a required column, ie. that it is not allowed
+     * to contain <code>NULL</code> values.
+     * 
+     * @param required <code>true</code> if this column is a required column
+     */
     public void setRequired(boolean required)
     {
-        this.required = required;
+        _required = required;
     }
 
+    /**
+     * Determines whether this column is an auto-increment column.
+     * 
+     * @return <code>true</code> if this column is an auto-increment column
+     */
     public boolean isAutoIncrement()
     {
-        return autoIncrement;
+        return _autoIncrement;
     }
 
+    /**
+     * Specifies whether this column is an auto-increment column.
+     * 
+     * @param autoIncrement <code>true</code> if this column is an auto-increment column
+     */
     public void setAutoIncrement(boolean autoIncrement)
     {
-        this.autoIncrement = autoIncrement;
+        _autoIncrement = autoIncrement;
     }
 
+    /**
+     * Returns the code (one of the constants in {@link java.sql.Types}) of the
+     * JDBC type of the column.
+     * 
+     * @return The type code
+     */
     public int getTypeCode()
     {
-        return typeCode;
+        return _typeCode;
     }
 
+    /**
+     * Sets the code (one of the constants in {@link java.sql.Types}) of the
+     * JDBC type of the column. 
+     * 
+     * @param typeCode The type code
+     */
     public void setTypeCode(int typeCode)
     {
-        this.typeCode = typeCode;
-        this.type = TypeMap.getJdbcTypeName(typeCode);
+        _type = TypeMap.getJdbcTypeName(typeCode);
+        if (_type == null)
+        {
+            throw new ModelException("Unknown JDBC type code "+typeCode);
+        }
+        _typeCode = typeCode;
     }
 
+    /**
+     * Returns the JDBC type of the column.
+     * 
+     * @return The type
+     */
     public String getType()
     {
-        return type;
+        return _type;
     }
 
     /**
-     * Set this columns type by name
+     * Sets the JDBC type of the column.
+     *
+     * @param type The type
      */
     public void setType(String type)
     {
-        this.type = type;
-        this.typeCode = TypeMap.getJdbcTypeCode(type);
+        Integer typeCode = TypeMap.getJdbcTypeCode(type);
+
+        if (typeCode == null)
+        {
+            throw new ModelException("Unknown JDBC type "+type);
+        }
+        else
+        {
+            _typeCode = typeCode.intValue();
+        }
+        _type = type;
     }
 
     /**
@@ -252,16 +279,32 @@
         return TypeMap.isSpecialType(getTypeCode());
     }
     
+    /**
+     * Returns the size of the column.
+     * 
+     * @return The size
+     */
     public String getSize()
     {
-        return size;
+        return _size;
     }
 
+    /**
+     * Returns the size of the column as an integer.
+     * 
+     * @return The size as an integer
+     */
     public int getSizeAsInt()
     {
-        return size == null ? 0 : Integer.parseInt(size);
+        return _size == null ? 0 : Integer.parseInt(_size);
     }
 
+    /**
+     * Sets the size of the column. This is either a simple integer value or
+     * a comma-separated pair of integer values specifying the size and scale.
+     * 
+     * @param size The size
+     */
     public void setSize(String size)
     {
         if (size != null)
@@ -270,56 +313,171 @@
     
             if (pos < 0)
             {
-                this.size = size;
+                _size = size;
             }
             else
             {
-                this.size = size.substring(0, pos);
-                scale     = Integer.parseInt(size.substring(pos + 1));
+                _size  = size.substring(0, pos);
+                _scale = Integer.parseInt(size.substring(pos + 1));
             }
         }
     }
     
+    /**
+     * Returns the scale of the column.
+     * 
+     * @return The scale
+     */
     public int getScale()
     {
-        return this.scale;
+        return this._scale;
     }
 
+    /**
+     * Sets the scale of the column.
+     *
+     * @param scale The scale
+     */
     public void setScale(int scale)
     {
-        this.scale = scale;
+        _scale = scale;
     }
 
-    public String getDefaultValue()
+    /**
+     * Returns the precision radix of the column.
+     * 
+     * @return The precision radix
+     */
+    public int getPrecisionRadix()
     {
-        return defaultValue;
+        return this._precisionRadix;
     }
 
-    public void setDefaultValue(String defaultValue)
+    /**
+     * Sets the precision radix of the column.
+     * 
+     * @param precisionRadix The precision radix
+     */
+    public void setPrecisionRadix(int precisionRadix)
     {
-        this.defaultValue = defaultValue;
+        _precisionRadix = precisionRadix;
     }
 
-    public int getPrecisionRadix()
+    /**
+     * Returns the ordinal position of the column.
+     * 
+     * @return The ordinal position
+     */
+    public int getOrdinalPosition()
     {
-        return this.precisionRadix;
+        return this._ordinalPosition;
     }
 
-    public void setPrecisionRadix(int precisionRadix)
+    /**
+     * Sets the ordinal position of the column.
+     * 
+     * @param ordinalPosition The ordinal position
+     */
+    public void setOrdinalPosition(int ordinalPosition)
     {
-        this.precisionRadix = precisionRadix;
+        _ordinalPosition = ordinalPosition;
     }
 
-    public int getOrdinalPosition()
+    /**
+     * Returns the default value of the column.
+     * 
+     * @return The default value
+     */
+    public String getDefaultValue()
     {
-        return this.ordinalPosition;
+        return _defaultValue;
     }
 
-    public void setOrdinalPosition(int ordinalPosition)
+    /**
+     * Sets the default value of the column. Note that this expression will be used
+     * within quotation marks when generating the column, and thus is subject to
+     * the conversion rules of the target database.
+     * 
+     * @param defaultValue The default value
+     */
+    public void setDefaultValue(String defaultValue)
+    {
+        _defaultValue = defaultValue;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object clone() throws CloneNotSupportedException
     {
-        this.ordinalPosition = ordinalPosition;
+        Column result = new Column();
+
+        result._name            = _name;
+        result._javaName        = _javaName;
+        result._primaryKey      = _primaryKey;
+        result._required        = _required;
+        result._autoIncrement   = _autoIncrement;
+        result._typeCode        = _typeCode;
+        result._type            = _type;
+        result._size            = _size;
+        result._defaultValue    = _defaultValue;
+        result._scale           = _scale;
+        result._precisionRadix  = _precisionRadix;
+        result._ordinalPosition = _ordinalPosition;
+        return result;
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        StringBuffer result = new StringBuffer();
 
+        result.append("Column [name=");
+        result.append(getName());
+        result.append("; type=");
+        result.append(getType());
+        result.append("]");
 
+        return result.toString();
+    }
+
+    /**
+     * Returns a verbose string representation of this column.
+     * 
+     * @return The string representation
+     */
+    public String toVerboseString()
+    {
+        StringBuffer result = new StringBuffer();
+
+        result.append("Column [name=");
+        result.append(getName());
+        result.append("; javaName=");
+        result.append(getJavaName());
+        result.append("; type=");
+        result.append(getType());
+        result.append("; typeCode=");
+        result.append(getTypeCode());
+        result.append("; size=");
+        result.append(getSize());
+        result.append("; required=");
+        result.append(isRequired());
+        result.append("; primaryKey=");
+        result.append(isPrimaryKey());
+        result.append("; autoIncrement=");
+        result.append(isAutoIncrement());
+        result.append("; defaultValue=");
+        result.append(getDefaultValue());
+        result.append("; scale=");
+        result.append(getScale());
+        result.append("; precisionRadix=");
+        result.append(getPrecisionRadix());
+        result.append("; ordinalPosition=");
+        result.append(getOrdinalPosition());
+        result.append("]");
+
+        return result.toString();
+    }
 }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,24 +35,23 @@
  *
  * @author John Marshall/Connectria
  * @author Matthew Hawthorne
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision$
  */
 public class Database implements Serializable, Cloneable
 {
-    /** Unique ID for serialization purposes */
+    /** Unique ID for serialization purposes. */
     private static final long serialVersionUID = -3160443396757573868L;
 
-    /** The name of the database model */
+    /** The name of the database model. */
     private String _name;
-    /** The method for generating primary keys (currently ignored) */
+    /** The method for generating primary keys (currently ignored). */
     private String _idMethod;
-    /** The version of the model */
+    /** The version of the model. */
     private String _version;
-    /** The tables */
+    /** The tables. */
     private ArrayList _tables = new ArrayList();
-
-    /** The dyna class cache for this model */
+    /** The dyna class cache for this model. */
     private DynaClassCache _dynaClassCache = new DynaClassCache();
 
     /**
@@ -432,6 +431,7 @@
      * Returns the {@link org.apache.ddlutils.dynabean.SqlDynaClass} for the given table name. If the it does not
      * exist yet, a new one will be created based on the Table definition.
      * 
+     * @param tableName The name of the table to create the bean for
      * @return The <code>SqlDynaClass</code> for the indicated table or <code>null</code>
      *         if the model contains no such table
      */
@@ -445,6 +445,7 @@
     /**
      * Returns the {@link org.apache.ddlutils.dynabean.SqlDynaClass} for the given dyna bean.
      * 
+     * @param bean The dyna bean
      * @return The <code>SqlDynaClass</code> for the given bean
      */
     public SqlDynaClass getDynaClassFor(DynaBean bean)
@@ -455,6 +456,7 @@
     /**
      * Creates a new dyna bean for the given table.
      * 
+     * @param table The table to create the bean for
      * @return The new dyna bean
      */
     public DynaBean createDynaBeanFor(Table table) throws DynaSqlException
@@ -462,8 +464,21 @@
         return _dynaClassCache.createNewInstance(table);
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * Convenience method that combines {@link #createDynaBeanFor(Table)} and
+     * {@link #findTable(String, boolean)}.
+     * 
+     * @param tableName     The name of the table to create the bean for
+     * @param caseSensitive Whether case matters for the names
+     * @return The new dyna bean
+     */
+    public DynaBean createDynaBeanFor(String tableName, boolean caseSensitive) throws DynaSqlException
+    {
+        return _dynaClassCache.createNewInstance(findTable(tableName, caseSensitive));
+    }
+
+    /**
+     * {@inheritDoc}
      */
     protected Object clone() throws CloneNotSupportedException
     {
@@ -476,8 +491,8 @@
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
+    /**
+     * {@inheritDoc}
      */
     public boolean equals(Object obj)
     {
@@ -494,8 +509,8 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
+    /**
+     * {@inheritDoc}
      */
     public int hashCode()
     {
@@ -505,9 +520,8 @@
                .toHashCode();
     }
 
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
+    /**
+     * {@inheritDoc}
      */
     public String toString()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ForeignKey.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ForeignKey.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ForeignKey.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ForeignKey.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,18 +22,21 @@
 
 /**
  * Represents a database foreign key.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision$
  */
 public class ForeignKey implements Cloneable
 {
     //  TODO: Make the create/alter/drop functionality respect the name property
 
-    /** The name of the foreign key, may be <code>null</code> */
+    /** The name of the foreign key, may be <code>null</code>. */
     private String    _name;
-    /** The target table */
+    /** The target table. */
     private Table     _foreignTable;
-    /** The name of the foreign table */
+    /** The name of the foreign table. */
     private String    _foreignTableName;
-    /** The references between local and remote columns */
+    /** The references between local and remote columns. */
     private ArrayList _references = new ArrayList();
 
     /**
@@ -214,8 +217,8 @@
         _references.remove(idx);
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
+    /**
+     * {@inheritDoc}
      */
     public boolean equals(Object other)
     {
@@ -242,8 +245,8 @@
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
+    /**
+     * {@inheritDoc}
      */
     public String toString()
     {
@@ -251,8 +254,8 @@
         return "ForeignKey[" + _foreignTableName + "]";
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * {@inheritDoc}
      */
     public Object clone() throws CloneNotSupportedException
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Index.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Index.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Index.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Index.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,9 @@
 
 /**
  * Represents an index definition for a table which may be either unique or non-unique.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision$
  */
 public interface Index extends Cloneable, Serializable
 {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/IndexColumn.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/IndexColumn.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/IndexColumn.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/IndexColumn.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,42 +16,77 @@
  * limitations under the License.
  */
 
-public class IndexColumn implements Cloneable
+import java.io.Serializable;
+
+/**
+ * Represents a column of an index in the database model.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision$
+ */
+public class IndexColumn implements Cloneable, Serializable
 {
-    protected String name;
-    protected String size;
-    
-    public IndexColumn() {}
+    /** Unique ID for serialization purposes. */
+    private static final long serialVersionUID = -5009366896427504739L;
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /** The name of the column. */
+    protected String _name;
+    /** The size of the column in the index. */
+    protected String _size;
+
+    // TODO: Implement equals, hashCode and toString
+    // TODO: It might be useful if the referenced column is directly acessible here ?
+
+    /**
+     * Returns the name of the column.
+     * 
+     * @return The name
      */
-    public Object clone() throws CloneNotSupportedException
-    {
-        IndexColumn result = new IndexColumn();
-
-        result.name = name;
-        result.size = size;
-        return result;
-    }
-
     public String getName()
     {
-        return name;
+        return _name;
     }
     
+    /**
+     * Sets the name of the column.
+     * 
+     * @param name The name
+     */
     public void setName(String name)
     {
-        this.name = name;
+        _name = name;
     }
 
+    /**
+     * Returns the size of the column in the index.
+     * 
+     * @return The size
+     */
     public String getSize()
     {
-        return size;
+        return _size;
     }
 
+    /**
+     * Sets the size of the column in the index.
+     * 
+     * @param size The size
+     */
     public void setSize(String size)
     {
-        this.size = size;
+        _size = size;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object clone() throws CloneNotSupportedException
+    {
+        IndexColumn result = new IndexColumn();
+
+        result._name = _name;
+        result._size = _size;
+        return result;
     }
 }
+

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ModelException.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ModelException.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ModelException.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/ModelException.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,10 +20,13 @@
 
 /**
  * Indicates a model error.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class ModelException extends DdlUtilsException 
 {
-    /** Constant for serializing instances of this class */
+    /** Constant for serializing instances of this class. */
     private static final long serialVersionUID = -694578915559780711L;
     
     /**

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/NonUniqueIndex.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/NonUniqueIndex.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/NonUniqueIndex.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/NonUniqueIndex.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,68 +20,70 @@
 
 /**
  * Represents an index definition for a table.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision: 289996 $
  */
 public class NonUniqueIndex implements Index
 {
-    /** Unique ID for serialization purposes */
+    /** Unique ID for serialization purposes. */
     private static final long serialVersionUID = -3591499395114850301L;
 
-    /** The name of the index */
+    /** The name of the index. */
     protected String    _name;
-    /** The columns making up the index */
+    /** The columns making up the index. */
     protected ArrayList _columns = new ArrayList();
 
-    
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#isUnique()
+    /**
+     * {@inheritDoc}
      */
     public boolean isUnique()
     {
         return false;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {
         return _name;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#setName(java.lang.String)
+    /**
+     * {@inheritDoc}
      */
     public void setName(String name)
     {
         _name = name;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#getColumnCount()
+    /**
+     * {@inheritDoc}
      */
     public int getColumnCount()
     {
         return _columns.size();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#getColumn(int)
+    /**
+     * {@inheritDoc}
      */
     public IndexColumn getColumn(int idx)
     {
         return (IndexColumn)_columns.get(idx);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#getColumns()
+    /**
+     * {@inheritDoc}
      */
     public IndexColumn[] getColumns()
     {
         return (IndexColumn[])_columns.toArray(new IndexColumn[_columns.size()]);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#addColumn(org.apache.ddlutils.model.IndexColumn)
+    /**
+     * {@inheritDoc}
      */
     public void addColumn(IndexColumn column)
     {
@@ -91,8 +93,8 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#addColumn(int, org.apache.ddlutils.model.IndexColumn)
+    /**
+     * {@inheritDoc}
      */
     public void addColumn(int idx, IndexColumn column)
     {
@@ -102,30 +104,30 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#removeColumn(org.apache.ddlutils.model.IndexColumn)
+    /**
+     * {@inheritDoc}
      */
     public void removeColumn(IndexColumn column)
     {
         _columns.remove(column);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#removeColumn(int)
+    /**
+     * {@inheritDoc}
      */
     public void removeColumn(int idx)
     {
         _columns.remove(idx);
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * {@inheritDoc}
      */
     public Object clone() throws CloneNotSupportedException
     {
         NonUniqueIndex result = new NonUniqueIndex();
 
-        result._name     = _name;
+        result._name    = _name;
         result._columns = (ArrayList)_columns.clone();
         return result;
     }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Reference.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Reference.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Reference.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Reference.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,17 +17,20 @@
  */
 
 /**
- * Represents a reference between a column in the local table and a column in another table. 
+ * Represents a reference between a column in the local table and a column in another table.
+ * 
+ * @author Thomas Dudziak
+ * @version $Revision$
  */
 public class Reference implements Cloneable, Comparable
 {
-    /** The local column */
+    /** The local column. */
     private Column _localColumn;
-    /** The foreign column */
+    /** The foreign column. */
     private Column _foreignColumn;
-    /** The name of the local column */
+    /** The name of the local column. */
     private String _localColumnName;
-    /** The name of the foreign column */
+    /** The name of the foreign column. */
     private String _foreignColumnName;
 
     /**
@@ -140,16 +143,16 @@
         _foreignColumnName = foreignColumnName;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * {@inheritDoc}
      */
     public Object clone() throws CloneNotSupportedException
     {
         return new Reference(getLocalColumn(), getForeignColumn());
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
+    /**
+     * {@inheritDoc}
      */
     public int compareTo(Object other)
     {
@@ -164,8 +167,8 @@
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
+    /**
+     * {@inheritDoc}
      */
     public boolean equals(Object other)
     {
@@ -182,8 +185,8 @@
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
+    /**
+     * {@inheritDoc}
      */
     public String toString()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,28 +27,29 @@
 /**
  * Represents a table in the database model.
  * 
+ * @author Thomas Dudziak
  * @version $Revision$
  */
 public class Table implements Serializable, Cloneable
 {
-    /** Unique ID for serialization purposes */
+    /** Unique ID for serialization purposes. */
     private static final long serialVersionUID = -5541154961302342608L;
 
-    /** The catalog of this table as read from the database */
+    /** The catalog of this table as read from the database. */
     private String _catalog = null;
-    /** The table's schema */
+    /** The table's schema. */
     private String _schema = null;
-    /** The name */
+    /** The name. */
     private String _name = null;
-    /** A desription of the table */
+    /** A desription of the table. */
     private String _description = null;
-    /** The table's type as read from the database */
+    /** The table's type as read from the database. */
     private String _type = null;
-    /** The columns in this table */
+    /** The columns in this table. */
     private ArrayList _columns = new ArrayList();
-    /** The foreign keys associated to this table */
+    /** The foreign keys associated to this table. */
     private ArrayList _foreignKeys = new ArrayList();
-    /** The indices applied to this table */
+    /** The indices applied to this table. */
     private ArrayList _indices = new ArrayList();
 
     /**
@@ -430,8 +431,9 @@
     //-------------------------------------------------------------------------
 
     /**
-     * @return true if there is at least one primary key column
-     *  on this table
+     * Determines whether there is at least one primary key column on this table.
+     * 
+     * @return <code>true</code> if there are one or more primary key columns
      */
     public boolean hasPrimaryKey()
     {
@@ -591,8 +593,8 @@
         return (Column[])autoIncrColumns.toArray(new Column[autoIncrColumns.size()]);
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * {@inheritDoc}
      */
     public Object clone() throws CloneNotSupportedException
     {
@@ -608,8 +610,8 @@
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
+    /**
+     * {@inheritDoc}
      */
     public String toString()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/TypeMap.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/TypeMap.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/TypeMap.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/TypeMap.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,122 +26,167 @@
  * A class that maps SQL type names to their JDBC type ID found in
  * {@link java.sql.Types} and vice versa.
  *
- * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Jason van Zyl
+ * @author James Strachan
+ * @author Thomas Dudziak
  * @version $Revision$
  */
-public class TypeMap
+public abstract class TypeMap
 {
+    /** The string representation of the {@link java.sql.Types#ARRAY} constant. */
     public static final String ARRAY         = "ARRAY";
+    /** The string representation of the {@link java.sql.Types#BIGINT} constant. */
     public static final String BIGINT        = "BIGINT";
+    /** The string representation of the {@link java.sql.Types#BINARY} constant. */
     public static final String BINARY        = "BINARY";
+    /** The string representation of the {@link java.sql.Types#BIT} constant. */
     public static final String BIT           = "BIT";
+    /** The string representation of the {@link java.sql.Types#BLOB} constant. */
     public static final String BLOB          = "BLOB";
+    /** The string representation of the {@link java.sql.Types#BOOLEAN} constant. */
     public static final String BOOLEAN       = "BOOLEAN";
+    /** The string representation of the {@link java.sql.Types#CHAR} constant. */
     public static final String CHAR          = "CHAR";
+    /** The string representation of the {@link java.sql.Types#CLOB} constant. */
     public static final String CLOB          = "CLOB";
+    /** The string representation of the {@link java.sql.Types#DATALINK} constant. */
     public static final String DATALINK      = "DATALINK";
+    /** The string representation of the {@link java.sql.Types#DATE} constant. */
     public static final String DATE          = "DATE";
+    /** The string representation of the {@link java.sql.Types#DECIMAL} constant. */
     public static final String DECIMAL       = "DECIMAL";
+    /** The string representation of the {@link java.sql.Types#DISTINCT} constant. */
     public static final String DISTINCT      = "DISTINCT";
+    /** The string representation of the {@link java.sql.Types#DOUBLE} constant. */
     public static final String DOUBLE        = "DOUBLE";
+    /** The string representation of the {@link java.sql.Types#FLOAT} constant. */
     public static final String FLOAT         = "FLOAT";
+    /** The string representation of the {@link java.sql.Types#INTEGER} constant. */
     public static final String INTEGER       = "INTEGER";
+    /** The string representation of the {@link java.sql.Types#JAVA_OBJECT} constant. */
     public static final String JAVA_OBJECT   = "JAVA_OBJECT";
+    /** The string representation of the {@link java.sql.Types#LONGVARBINARY} constant. */
     public static final String LONGVARBINARY = "LONGVARBINARY";
+    /** The string representation of the {@link java.sql.Types#LONGVARCHAR} constant. */
     public static final String LONGVARCHAR   = "LONGVARCHAR";
+    /** The string representation of the {@link java.sql.Types#NULL} constant. */
     public static final String NULL          = "NULL";
+    /** The string representation of the {@link java.sql.Types#NUMERIC} constant. */
     public static final String NUMERIC       = "NUMERIC";
+    /** The string representation of the {@link java.sql.Types#OTHER} constant. */
     public static final String OTHER         = "OTHER";
+    /** The string representation of the {@link java.sql.Types#REAL} constant. */
     public static final String REAL          = "REAL";
+    /** The string representation of the {@link java.sql.Types#REF} constant. */
     public static final String REF           = "REF";
+    /** The string representation of the {@link java.sql.Types#SMALLINT} constant. */
     public static final String SMALLINT      = "SMALLINT";
+    /** The string representation of the {@link java.sql.Types#STRUCT} constant. */
     public static final String STRUCT        = "STRUCT";
+    /** The string representation of the {@link java.sql.Types#TIME} constant. */
     public static final String TIME          = "TIME";
+    /** The string representation of the {@link java.sql.Types#TIMESTAMP} constant. */
     public static final String TIMESTAMP     = "TIMESTAMP";
+    /** The string representation of the {@link java.sql.Types#TINYINT} constant. */
     public static final String TINYINT       = "TINYINT";
+    /** The string representation of the {@link java.sql.Types#VARBINARY} constant. */
     public static final String VARBINARY     = "VARBINARY";
+    /** The string representation of the {@link java.sql.Types#VARCHAR} constant. */
     public static final String VARCHAR       = "VARCHAR";
 
-    private static HashMap _sqlTypeNameToTypeID = new HashMap();
-    private static HashMap _typeIdToSqlTypeName = new HashMap();
+    /** Maps type names to the corresponding {@link java.sql.Types} constants. */
+    private static HashMap _typeNameToTypeCode = new HashMap();
+    /** Maps {@link java.sql.Types} type code constants to the corresponding type names. */
+    private static HashMap _typeCodeToTypeName = new HashMap();
+    /** Contains the type codes of the numeric types. */
     private static HashSet _numericTypes        = new HashSet();
+    /** Contains the type codes of the text types. */
     private static HashSet _textTypes           = new HashSet();
+    /** Contains the type codes of the binary types. */
     private static HashSet _binaryTypes         = new HashSet();
+    /** Contains the type codes of the special types (eg. OTHER, REF etc.). */
     private static HashSet _specialTypes        = new HashSet();
 
     static
     {
-        registerSqlTypeID(Types.ARRAY,         ARRAY,         false, false, false, true);
-        registerSqlTypeID(Types.BIGINT,        BIGINT,        true,  false, false, false);
-        registerSqlTypeID(Types.BINARY,        BINARY,        false, false, true,  false);
-        registerSqlTypeID(Types.BIT,           BIT,           true,  false, false, false);
-        registerSqlTypeID(Types.BLOB,          BLOB,          false, false, true,  false);
-        registerSqlTypeID(Types.CHAR,          CHAR,          false, true,  false, false);
-        registerSqlTypeID(Types.CLOB,          CLOB,          false, true,  false, false);
-        registerSqlTypeID(Types.DATE,          DATE,          false, false, false, false);
-        registerSqlTypeID(Types.DECIMAL,       DECIMAL,       true,  false, false, false);
-        registerSqlTypeID(Types.DISTINCT,      DISTINCT,      false, false, false, true);
-        registerSqlTypeID(Types.DOUBLE,        DOUBLE,        true,  false, false, false);
-        registerSqlTypeID(Types.FLOAT,         FLOAT,         true,  false, false, false);
-        registerSqlTypeID(Types.INTEGER,       INTEGER,       true,  false, false, false);
-        registerSqlTypeID(Types.JAVA_OBJECT,   JAVA_OBJECT,   false, false, false, true);
-        registerSqlTypeID(Types.LONGVARBINARY, LONGVARBINARY, false, false, true,  false);
-        registerSqlTypeID(Types.LONGVARCHAR,   LONGVARCHAR,   false, true,  false, false);
-        registerSqlTypeID(Types.NULL,          NULL,          false, false, false, true);
-        registerSqlTypeID(Types.NUMERIC,       NUMERIC,       true,  false, false, false);
-        registerSqlTypeID(Types.OTHER,         OTHER,         false, false, false, true);
-        registerSqlTypeID(Types.REAL,          REAL,          true,  false, false, false);
-        registerSqlTypeID(Types.REF,           REF,           false, false, false, true);
-        registerSqlTypeID(Types.SMALLINT,      SMALLINT,      true,  false, false, false);
-        registerSqlTypeID(Types.STRUCT,        STRUCT,        false, false, false, true);
-        registerSqlTypeID(Types.TIME,          TIME,          false, false, false, false);
-        registerSqlTypeID(Types.TIMESTAMP,     TIMESTAMP,     false, false, false, false);
-        registerSqlTypeID(Types.TINYINT,       TINYINT,       true,  false, false, false);
-        registerSqlTypeID(Types.VARBINARY,     VARBINARY,     false, false, true,  false);
-        registerSqlTypeID(Types.VARCHAR,       VARCHAR,       false, true,  false, false);
+        registerJdbcType(Types.ARRAY,         ARRAY,         false, false, false, true);
+        registerJdbcType(Types.BIGINT,        BIGINT,        true,  false, false, false);
+        registerJdbcType(Types.BINARY,        BINARY,        false, false, true,  false);
+        registerJdbcType(Types.BIT,           BIT,           true,  false, false, false);
+        registerJdbcType(Types.BLOB,          BLOB,          false, false, true,  false);
+        registerJdbcType(Types.CHAR,          CHAR,          false, true,  false, false);
+        registerJdbcType(Types.CLOB,          CLOB,          false, true,  false, false);
+        registerJdbcType(Types.DATE,          DATE,          false, false, false, false);
+        registerJdbcType(Types.DECIMAL,       DECIMAL,       true,  false, false, false);
+        registerJdbcType(Types.DISTINCT,      DISTINCT,      false, false, false, true);
+        registerJdbcType(Types.DOUBLE,        DOUBLE,        true,  false, false, false);
+        registerJdbcType(Types.FLOAT,         FLOAT,         true,  false, false, false);
+        registerJdbcType(Types.INTEGER,       INTEGER,       true,  false, false, false);
+        registerJdbcType(Types.JAVA_OBJECT,   JAVA_OBJECT,   false, false, false, true);
+        registerJdbcType(Types.LONGVARBINARY, LONGVARBINARY, false, false, true,  false);
+        registerJdbcType(Types.LONGVARCHAR,   LONGVARCHAR,   false, true,  false, false);
+        registerJdbcType(Types.NULL,          NULL,          false, false, false, true);
+        registerJdbcType(Types.NUMERIC,       NUMERIC,       true,  false, false, false);
+        registerJdbcType(Types.OTHER,         OTHER,         false, false, false, true);
+        registerJdbcType(Types.REAL,          REAL,          true,  false, false, false);
+        registerJdbcType(Types.REF,           REF,           false, false, false, true);
+        registerJdbcType(Types.SMALLINT,      SMALLINT,      true,  false, false, false);
+        registerJdbcType(Types.STRUCT,        STRUCT,        false, false, false, true);
+        registerJdbcType(Types.TIME,          TIME,          false, false, false, false);
+        registerJdbcType(Types.TIMESTAMP,     TIMESTAMP,     false, false, false, false);
+        registerJdbcType(Types.TINYINT,       TINYINT,       true,  false, false, false);
+        registerJdbcType(Types.VARBINARY,     VARBINARY,     false, false, true,  false);
+        registerJdbcType(Types.VARCHAR,       VARCHAR,       false, true,  false, false);
 
         // only available in JDK 1.4 and above:
         if (Jdbc3Utils.supportsJava14JdbcTypes())
         {
-            registerSqlTypeID(Jdbc3Utils.determineBooleanTypeCode(),  BOOLEAN,  true,  false, false, false);
-            registerSqlTypeID(Jdbc3Utils.determineDatalinkTypeCode(), DATALINK, false, false, false, true);
+            registerJdbcType(Jdbc3Utils.determineBooleanTypeCode(),  BOOLEAN,  true,  false, false, false);
+            registerJdbcType(Jdbc3Utils.determineDatalinkTypeCode(), DATALINK, false, false, false, true);
         }
     }
 
-    
     /**
-     * Returns the JDBC type name which maps to {@link java.sql.Types}
-     * for the given SQL name of type
+     * Returns the JDBC type code (one of the {@link java.sql.Types} constants) that
+     * corresponds to the given JDBC type name.
+     * 
+     * @param typeName The JDBC type name (case is ignored)
+     * @return The type code or <code>null</code> if the type is unknown
      */
-    public static int getJdbcTypeCode(String typeName)
+    public static Integer getJdbcTypeCode(String typeName)
     {
-        Integer answer = (Integer)_sqlTypeNameToTypeID.get(typeName.toUpperCase());
-
-        return answer != null ? answer.intValue() : Types.OTHER;
+        return (Integer)_typeNameToTypeCode.get(typeName.toUpperCase());
     }
 
     /**
-     * Returns the name which maps to the given {@link java.sql.Types} 
-     * type code 
+     * Returns the JDBC type name that corresponds to the given type code
+     * (one of the {@link java.sql.Types} constants).
+     * 
+     * @param typeCode The type code
+     * @return The JDBC type name (one of the constants in this class) or
+     *         <code>null</code> if the type is unknown
      */
     public static String getJdbcTypeName(int typeCode)
     {
-        String answer = (String)_typeIdToSqlTypeName.get(new Integer(typeCode));
-
-        return answer == null ? OTHER : answer;
+        return (String)_typeCodeToTypeName.get(new Integer(typeCode));
     }
 
     /**
-     * Registers the fact that the given Integer SQL ID maps to the given SQL name
+     * Registers a JDBC type.
+     * 
+     * @param typeCode      The type code (one of the {@link java.sql.Types} constants)
+     * @param typeName      The type name (case is ignored)
+     * @param isNumericType Whether the type is a numeric type
+     * @param isTextType    Whether the type is a text type
+     * @param isBinaryType  Whether the type is a binary type
+     * @param isSpecialType Whether the type is a special type
      */
-    protected static void registerSqlTypeID(int sqlTypeID, String name, boolean isNumericType, boolean isTextType, boolean isBinaryType, boolean isSpecialType) 
+    protected static void registerJdbcType(int typeCode, String typeName, boolean isNumericType, boolean isTextType, boolean isBinaryType, boolean isSpecialType) 
     {
-        Integer typeId = new Integer(sqlTypeID);
+        Integer typeId = new Integer(typeCode);
 
-        _sqlTypeNameToTypeID.put(name, typeId);
-        _typeIdToSqlTypeName.put(typeId, name);
+        _typeNameToTypeCode.put(typeName.toUpperCase(), typeId);
+        _typeCodeToTypeName.put(typeId, typeName.toUpperCase());
         if (isNumericType)
         {
             _numericTypes.add(typeId);
@@ -208,4 +253,3 @@
         return _specialTypes.contains(new Integer(sqlTypeID));
     }
 }
-

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/UniqueIndex.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/UniqueIndex.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/UniqueIndex.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/UniqueIndex.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.model;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,19 +28,19 @@
  */
 public class UniqueIndex extends NonUniqueIndex
 {
-    /** Unique ID for serialization purposes */
+    /** Unique ID for serialization purposes. */
     private static final long serialVersionUID = -4097003126550294993L;
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.model.Index#isUnique()
+    /**
+     * {@inheritDoc}
      */
     public boolean isUnique()
     {
         return true;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
+    /**
+     * {@inheritDoc}
      */
     public Object clone() throws CloneNotSupportedException
     {

Added: db/ddlutils/trunk/src/java/org/apache/ddlutils/package.html
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/package.html?rev=292045&view=auto
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/package.html (added)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/package.html Tue Sep 27 13:55:42 2005
@@ -0,0 +1,28 @@
+<html>
+<head>
+<!-- 
+ Copyright 1999-2005 The Apache Software Foundation.
+ 
+ Licensed 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.
+ -->
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="Thomas Dudziak">
+</head>
+<body bgcolor="white">
+  <p>
+  	This package mainly contains the database platform abstraction, {@link org.apache.ddlutils.Platform}
+  	and the factory to create instances for individual platforms,
+  	{@link org.apache.ddlutils.PlatformFactory}.
+  </p>
+</body>
+</html>

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/AxionPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/AxionPlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/AxionPlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/AxionPlatform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,16 +24,16 @@
 /**
  * The platform for the Axion database.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class AxionPlatform extends PlatformImplBase
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME     = "Axion";
-    /** The axion jdbc driver */
+    /** The axion jdbc driver. */
     public static final String JDBC_DRIVER      = "org.axiondb.jdbc.AxionDriver";
-    /** The subprotocol used by the axion driver */
+    /** The subprotocol used by the axion driver. */
     public static final String JDBC_SUBPROTOCOL = "axiondb";
 
     /**
@@ -68,8 +68,8 @@
         setSqlBuilder(new AxionBuilder(info));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/CloudscapePlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/CloudscapePlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/CloudscapePlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/CloudscapePlatform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,16 +24,16 @@
 /**
  * The Cloudscape platform implementation.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class CloudscapePlatform extends PlatformImplBase
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME = "Cloudscape";
-    /** A subprotocol used by the DB2 network driver */
+    /** A subprotocol used by the DB2 network driver. */
     public static final String JDBC_SUBPROTOCOL_1 = "db2j:net";
-    /** A subprotocol used by the DB2 network driver */
+    /** A subprotocol used by the DB2 network driver. */
     public static final String JDBC_SUBPROTOCOL_2 = "cloudscape:net";
 
     /**
@@ -70,8 +70,8 @@
         setSqlBuilder(new CloudscapeBuilder(info));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/Db2Platform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/Db2Platform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/Db2Platform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/Db2Platform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,24 +24,24 @@
 /**
  * The DB2 platform implementation.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class Db2Platform extends PlatformImplBase
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME     = "DB2";
-    /** The standard DB2 jdbc driver */
+    /** The standard DB2 jdbc driver. */
     public static final String JDBC_DRIVER      = "com.ibm.db2.jcc.DB2Driver";
-    /** Older name for the jdbc driver */
+    /** Older name for the jdbc driver. */
     public static final String JDBC_DRIVER_OLD1 = "COM.ibm.db2.jdbc.app.DB2Driver";
-    /** Older name for the jdbc driver */
+    /** Older name for the jdbc driver. */
     public static final String JDBC_DRIVER_OLD2 = "COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver";
-    /** The subprotocol used by the standard DB2 driver */
+    /** The subprotocol used by the standard DB2 driver. */
     public static final String JDBC_SUBPROTOCOL = "db2";
-    /** An alternative subprotocol used by the standard DB2 driver on OS/390 */
+    /** An alternative subprotocol used by the standard DB2 driver on OS/390. */
     public static final String JDBC_SUBPROTOCOL_OS390_1 = "db2os390";
-    /** An alternative subprotocol used by the standard DB2 driver on OS/390 */
+    /** An alternative subprotocol used by the standard DB2 driver on OS/390. */
     public static final String JDBC_SUBPROTOCOL_OS390_2 = "db2os390sqlj";
 
     /**
@@ -73,8 +73,8 @@
         setSqlBuilder(new Db2Builder(info));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/DerbyPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/DerbyPlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/DerbyPlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/DerbyPlatform.java Tue Sep 27 13:55:42 2005
@@ -1,16 +1,7 @@
 package org.apache.ddlutils.platform;
 
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.ddlutils.DynaSqlException;
-import org.apache.ddlutils.builder.DerbyBuilder;
-
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,23 +16,35 @@
  * limitations under the License.
  */
 
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.ddlutils.DynaSqlException;
+import org.apache.ddlutils.builder.DerbyBuilder;
+
 /**
  * The platform implementation for Derby.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class DerbyPlatform extends CloudscapePlatform
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME         = "Derby";
-    /** The derby jdbc driver for use as a client for a normal server */
+    /** The derby jdbc driver for use as a client for a normal server. */
     public static final String JDBC_DRIVER          = "org.apache.derby.jdbc.ClientDriver";
-    /** The derby jdbc driver for use as an embedded database */
+    /** The derby jdbc driver for use as an embedded database. */
     public static final String JDBC_DRIVER_EMBEDDED = "org.apache.derby.jdbc.EmbeddedDriver";
-    /** The subprotocol used by the derby drivers */
+    /** The subprotocol used by the derby drivers. */
     public static final String JDBC_SUBPROTOCOL     = "derby";
 
+    /**
+     * Creates a new Derby platform instance.
+     */
     public DerbyPlatform()
     {
         super();
@@ -49,16 +52,16 @@
         setSqlBuilder(new DerbyBuilder(getSqlBuilder().getPlatformInfo()));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {
         return DATABASENAME;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.Platform#createDatabase(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
+    /**
+     * {@inheritDoc}
      */
     public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DynaSqlException, UnsupportedOperationException
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/FirebirdPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/FirebirdPlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/FirebirdPlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/FirebirdPlatform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,20 +19,20 @@
 /**
  * The platform implementation for the Firebird database.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class FirebirdPlatform extends InterbasePlatform
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME     = "Firebird";
-    /** The standard Firebird jdbc driver */
+    /** The standard Firebird jdbc driver. */
     public static final String JDBC_DRIVER      = "org.firebirdsql.jdbc.FBDriver";
-    /** The subprotocol used by the standard Firebird driver */
+    /** The subprotocol used by the standard Firebird driver. */
     public static final String JDBC_SUBPROTOCOL = "firebirdsql";
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/HsqlDbPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/HsqlDbPlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/HsqlDbPlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/HsqlDbPlatform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,16 +24,16 @@
 /**
  * The platform implementation for the HsqlDb database.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class HsqlDbPlatform extends PlatformImplBase
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME     = "HsqlDb";
-    /** The standard Hsqldb jdbc driver */
+    /** The standard Hsqldb jdbc driver. */
     public static final String JDBC_DRIVER      = "org.hsqldb.jdbcDriver";
-    /** The subprotocol used by the standard Hsqldb driver */
+    /** The subprotocol used by the standard Hsqldb driver. */
     public static final String JDBC_SUBPROTOCOL = "hsqldb";
 
     /**
@@ -63,8 +63,8 @@
         setSqlBuilder(new HsqlDbBuilder(info));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/InterbasePlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/InterbasePlatform.java?rev=292045&r1=292044&r2=292045&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/InterbasePlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/InterbasePlatform.java Tue Sep 27 13:55:42 2005
@@ -1,7 +1,7 @@
 package org.apache.ddlutils.platform;
 
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,16 +24,16 @@
 /**
  * The platform implementation for the Interbase database.
  * 
- * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @author Thomas Dudziak
  * @version $Revision: 231306 $
  */
 public class InterbasePlatform extends PlatformImplBase
 {
-    /** Database name of this platform */
+    /** Database name of this platform. */
     public static final String DATABASENAME     = "Interbase";
-    /** The interbase jdbc driver */
+    /** The interbase jdbc driver. */
     public static final String JDBC_DRIVER      = "interbase.interclient.Driver";
-    /** The subprotocol used by the interbase driver */
+    /** The subprotocol used by the interbase driver. */
     public static final String JDBC_SUBPROTOCOL = "interbase";
 
     /**
@@ -76,8 +76,8 @@
         setSqlBuilder(new InterbaseBuilder(info));
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.Platform#getName()
+    /**
+     * {@inheritDoc}
      */
     public String getName()
     {



Mime
View raw message