db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r423827 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
Date Thu, 20 Jul 2006 08:42:08 GMT
Author: kahatlen
Date: Thu Jul 20 01:42:06 2006
New Revision: 423827

URL: http://svn.apache.org/viewvc?rev=423827&view=rev
Log:
DERBY-1443: DataTypeDescriptor.isBinaryType() return false for Types.BLOB

Adding javadoc for isBinaryType() and isCharacterType() clarifying why
they return false for BLOB and CLOB.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java?rev=423827&r1=423826&r2=423827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Thu
Jul 20 01:42:06 2006
@@ -1017,6 +1017,23 @@
 		}
 	}
 
+	/**
+	 * Check whether a JDBC type is one of the character types that are
+	 * compatible with the Java type <code>String</code>.
+	 *
+	 * <p><strong>Note:</strong> <code>CLOB</code> is not compatible
with
+	 * <code>String</code>. See tables B-4, B-5 and B-6 in the JDBC 3.0
+	 * Specification.
+	 *
+	 * <p> There are some non-character types that are compatible with
+	 * <code>String</code> (examples: numeric types, binary types and
+	 * time-related types), but they are not covered by this method.
+	 *
+	 * @param jdbcType a JDBC type
+	 * @return <code>true</code> iff <code>jdbcType</code> is a character
type
+	 * and compatible with <code>String</code>
+	 * @see java.sql.Types
+	 */
 	private static boolean isCharacterType(int jdbcType) {
 
 		switch (jdbcType) {
@@ -1029,6 +1046,19 @@
 		}
 	}
 
+	/**
+	 * Check whether a JDBC type is compatible with the Java type
+	 * <code>byte[]</code>.
+	 *
+	 * <p><strong>Note:</strong> <code>BLOB</code> is not compatible
with
+	 * <code>byte[]</code>. See tables B-4, B-5 and B-6 in the JDBC 3.0
+	 * Specification.
+	 *
+	 * @param jdbcType a JDBC type
+	 * @return <code>true</code> iff <code>jdbcType</code> is compatible
with
+	 * <code>byte[]</code>
+	 * @see java.sql.Types
+	 */
 	private static boolean isBinaryType(int jdbcType) {
 		switch (jdbcType) {
 		case Types.BINARY:



Mime
View raw message