db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r885118 - in /db/derby/code/trunk/java/engine/org/apache/derby: catalog/types/BaseTypeIdImpl.java catalog/types/UserDefinedTypeIdImpl.java iapi/types/TypeId.java impl/sql/compile/QueryTreeNode.java
Date Sat, 28 Nov 2009 17:45:17 GMT
Author: rhillegas
Date: Sat Nov 28 17:45:16 2009
New Revision: 885118

URL: http://svn.apache.org/viewvc?rev=885118&view=rev
Log:
DERBY-651: Expand the UDT javadoc a bit.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java?rev=885118&r1=885117&r2=885118&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java Sat
Nov 28 17:45:16 2009
@@ -117,7 +117,7 @@
      * Constructor for an BaseTypeIdImpl which describes a UDT
      *
      * @param schemaName The schema that the UDT lives in
-     * @param qualifiedName The qualified name of the UDT in that schema
+     * @param unqualifiedName The qualified name of the UDT in that schema
      */
 
     BaseTypeIdImpl(String schemaName, String unqualifiedName )

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java?rev=885118&r1=885117&r2=885118&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/UserDefinedTypeIdImpl.java
Sat Nov 28 17:45:16 2009
@@ -28,6 +28,25 @@
 import java.io.ObjectInput;
 import java.io.IOException;
 
+/**
+ * <p>
+ * This type id describes a user defined type. There are 2 kinds of user defined
+ * types in Derby:
+ * </p>
+ *
+ * <ul>
+ * <li><b>Old-fashioned</b> - In the original Cloudscape code, it was possible
+ * to declare a column's type to be the name of a Java class. Unlike ANSI
+ * UDTs, these user defined types were not schema objects themselves and they
+ * didn't have schema-qualified names. Some of the system tables have columns
+ * whose datatypes are old-fashioned user defined types. E.g., SYS.SYSALIASES.ALIASINFO.</li>
+ * <li><b>ANSI</b> - As part of the work on
+ * <a href="https://issues.apache.org/jira/browse/DERBY-651">DERBY-651</a>,
+ * we added ANSI UDTs. These are user defined types which are declared via the
+ * CREATE TYPE statement. These have schema-qualified names. The CREATE TYPE
+ * statement basically binds a schema-qualified name to the name of a Java class.</li>
+ * </ul>
+ */
 public class UserDefinedTypeIdImpl extends BaseTypeIdImpl
 {
 	/********************************************************

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java?rev=885118&r1=885117&r2=885118&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java Sat Nov 28 17:45:16
2009
@@ -380,8 +380,14 @@
         }
 
     /**
-     * This factory  method is used for UDTs. If the className argument is null,
+     * This factory  method is used for ANSI UDTs. If the className argument is null,
      * then this TypeId will have to be bound.
+     *
+     * @param schemaName Schema that the type definition lives in.
+     * @param unqualifiedName The second part of the ANSI dot-separated name for the type.
+     * @param className The Java class which is bound to the schema-qualified name by the
CREATE TYPE statement.
+     *
+     * @return A bound type TypeId describing this ANSI UDT.
      */
     public static TypeId getUserDefinedTypeId(String schemaName, String unqualifiedName,
String className )
     {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=885118&r1=885117&r2=885118&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Sat
Nov 28 17:45:16 2009
@@ -1601,6 +1601,10 @@
     /**
      * Bind a UDT. This involves looking it up in the DataDictionary and filling
      * in its class name.
+     *
+     * @param originalDTD A datatype: might be an unbound UDT and might not be
+     *
+     * @return The bound UDT if originalDTD was an unbound UDT; otherwise returns originalDTD.
      */
     public DataTypeDescriptor bindUserType( DataTypeDescriptor originalDTD ) throws StandardException
     {



Mime
View raw message