db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r632413 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/catalog/types/ engine/org/apache/derby/iapi/reference/ engine/org/apache/derby/iapi/services/info/ engine/or...
Date Fri, 29 Feb 2008 19:18:01 GMT
Author: djd
Date: Fri Feb 29 11:17:53 2008
New Revision: 632413

URL: http://svn.apache.org/viewvc?rev=632413&view=rev
Log:
DERBY-3484 For JDBC 3.0 java.sql.Types constants use directly instead of through JDBC30Translation
as JSR169 supports all the types

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/Util.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/JDBCDisplayUtil.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java Fri Feb 29 11:17:53
2008
@@ -21,7 +21,6 @@
 package org.apache.derby.client.am;
 
 import org.apache.derby.iapi.reference.DRDAConstants;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 
 // This enumeration of types represents the typing scheme used by our jdbc driver.
@@ -36,7 +35,7 @@
     // Not currently supported as a DERBY column type.  Mapped to SMALLINT.
     //public final static int TINYINT 	= java.sql.Types.TINYINT;       // -6;
 
-    public final static int BOOLEAN = JDBC30Translation.BOOLEAN;       // 16;
+    public final static int BOOLEAN = java.sql.Types.BOOLEAN;       // 16;
 
     public final static int SMALLINT = java.sql.Types.SMALLINT;      // 5;
 

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Fri Feb 29
11:17:53 2008
@@ -4486,7 +4486,7 @@
 				if (SanityManager.DEBUG)
 					trace("short parameter value is: "+paramVal);
  				// DB2 does not have a BOOLEAN java.sql.bit type, it's sent as small
-				if (pmeta.getParameterType(i+1) == JDBC30Translation.BOOLEAN)
+				if (pmeta.getParameterType(i+1) == Types.BOOLEAN)
 					ps.setBoolean(i+1, (paramVal == 1));
 				else
 					ps.setShort(i+1, paramVal);

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java Fri Feb 29
11:17:53 2008
@@ -21,7 +21,6 @@
 package org.apache.derby.impl.drda;
 
 import java.sql.Types;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.DRDAConstants;
 import java.sql.SQLException;
 import org.apache.derby.iapi.reference.Limits;
@@ -139,7 +138,7 @@
 	{
 		int drdaType = 0;
 		switch (jdbcType) {
-			case JDBC30Translation.BOOLEAN:
+			case Types.BOOLEAN:
 			case java.sql.Types.BIT:
 			case java.sql.Types.TINYINT:
 			case java.sql.Types.SMALLINT:

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java Fri Feb 29 11:17:53
2008
@@ -24,7 +24,6 @@
 import java.sql.Types;
 import java.sql.SQLException;
 import org.apache.derby.iapi.reference.DRDAConstants;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 
 
 
@@ -145,7 +144,7 @@
 
 	  switch(jdbctype)
 	  {
-		  case JDBC30Translation.BOOLEAN:
+		  case Types.BOOLEAN:
 		  case java.sql.Types.BIT:
 		  case java.sql.Types.TINYINT:
 		  case java.sql.Types.SMALLINT:

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=632413&r1=632412&r2=632413&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 Fri
Feb 29 11:17:53 2008
@@ -41,7 +41,6 @@
 import org.apache.derby.iapi.services.info.JVMInfo;
 
 import java.sql.Types;
-import org.apache.derby.iapi.reference.JDBC20Translation; // needed for BLOB/CLOB types
 
 import java.io.InputStream;
 import java.io.ByteArrayInputStream;
@@ -344,7 +343,7 @@
 
           case StoredFormatIds.CLOB_TYPE_ID_IMPL:
                 SQLTypeName = TypeId.CLOB_NAME;
-                JDBCTypeId = JDBC20Translation.SQL_TYPES_CLOB;
+                JDBCTypeId = Types.CLOB;
                 wrapperTypeFormatId = StoredFormatIds.CLOB_TYPE_ID;
                 break;
 
@@ -368,7 +367,7 @@
 
           case StoredFormatIds.BLOB_TYPE_ID_IMPL:
                 SQLTypeName = TypeId.BLOB_NAME;
-                JDBCTypeId = JDBC20Translation.SQL_TYPES_BLOB;
+                JDBCTypeId = Types.BLOB;
                 wrapperTypeFormatId = StoredFormatIds.BLOB_TYPE_ID;
                 break;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
Fri Feb 29 11:17:53 2008
@@ -23,7 +23,6 @@
 
 import java.sql.ResultSet;
 import javax.transaction.xa.XAResource;
-import java.sql.Types;
 
 /**
         This class contains public statics that map directly
@@ -78,12 +77,4 @@
         public static final int XA_STARTRSCAN = XAResource.TMSTARTRSCAN;
         public static final int XA_SUCCESS = XAResource.TMSUCCESS;
         public static final int XA_SUSPEND = XAResource.TMSUSPEND;
-
-
-        /*
-        ** New types in JDBC 2.0
-        */
-        public static final int SQL_TYPES_JAVA_OBJECT = Types.JAVA_OBJECT;
-        public static final int SQL_TYPES_BLOB = Types.BLOB;
-        public static final int SQL_TYPES_CLOB = Types.CLOB;
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java Fri Feb
29 11:17:53 2008
@@ -21,6 +21,8 @@
 
 package org.apache.derby.iapi.services.info;
 
+import java.sql.Types;
+
 
 /**
 	This class is used to determine which Java specification Derby will run at.
@@ -142,7 +144,7 @@
 		JDK_ID = id;
 		J2ME = isJ2ME;
 		JAVA_SQL_TYPES_BOOLEAN = (isJ2ME || id >= J2SE_14) ?
-			org.apache.derby.iapi.reference.JDBC30Translation.SQL_TYPES_BOOLEAN :java.sql.Types.BIT;
+			Types.BOOLEAN :java.sql.Types.BIT;
 	}
 
 	/**

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=632413&r1=632412&r2=632413&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 Fri
Feb 29 11:17:53 2008
@@ -1628,7 +1628,7 @@
 
 		switch (jdbcType) {
 		case Types.BIT:
-		case org.apache.derby.iapi.reference.JDBC30Translation.SQL_TYPES_BOOLEAN:
+		case Types.BOOLEAN:
 		case Types.TINYINT:
 		case Types.SMALLINT:
 		case Types.INTEGER:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataTypeUtilities.java Fri
Feb 29 11:17:53 2008
@@ -23,7 +23,6 @@
 
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 import org.apache.derby.iapi.services.io.StoredFormatIds;
 
@@ -56,7 +55,7 @@
 				return dtd.getMaximumWidth();
 			case Types.SMALLINT:
 				return 5;
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				return 1;
 		}
     	
@@ -194,7 +193,7 @@
 				size = 20;
 				break;
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				// Types.BIT == SQL BOOLEAN, so 5 chars for 'false'
 				// In JDBC 3.0, Types.BIT or Types.BOOLEAN = SQL BOOLEAN
 				size = 5;

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=632413&r1=632412&r2=632413&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 Fri Feb 29 11:17:53
2008
@@ -42,8 +42,6 @@
 import org.apache.derby.iapi.types.*;
 import org.apache.derby.iapi.types.*;
 
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 
 import java.sql.Types;
@@ -371,7 +369,7 @@
                                                                         new BaseTypeIdImpl(StoredFormatIds.TIMESTAMP_TYPE_ID_IMPL));
                           break;
                   case Types.BIT:
-                  case JDBC30Translation.SQL_TYPES_BOOLEAN:
+                  case Types.BOOLEAN:
                           return BOOLEAN_ID;
 
                   case Types.BINARY:
@@ -402,14 +400,14 @@
                                                             new BaseTypeIdImpl(StoredFormatIds.LONGVARCHAR_TYPE_ID_IMPL));
                       break;
 
-                  case JDBC20Translation.SQL_TYPES_BLOB:
+                  case Types.BLOB:
                       ret = BLOB_ID;
                       if (ret == null)
                           ret = BLOB_ID = new TypeId(StoredFormatIds.BLOB_TYPE_ID,
                                                      new BaseTypeIdImpl(StoredFormatIds.BLOB_TYPE_ID_IMPL));
                       break;
                                                 
-                  case JDBC20Translation.SQL_TYPES_CLOB:
+                  case Types.CLOB:
                       ret = CLOB_ID;
                       if (ret == null)
                           ret = CLOB_ID = new TypeId(StoredFormatIds.CLOB_TYPE_ID,
@@ -505,11 +503,11 @@
                 }
                 else if (javaTypeName.equals("java.sql.Blob"))
                 {
-                        return getBuiltInTypeId(JDBC20Translation.SQL_TYPES_BLOB);
+                        return getBuiltInTypeId(Types.BLOB);
                 }
                 else if (javaTypeName.equals("java.sql.Clob"))
                 {
-                        return getBuiltInTypeId(JDBC20Translation.SQL_TYPES_CLOB);
+                        return getBuiltInTypeId(Types.CLOB);
                 }
                 else if (javaTypeName.equals("org.apache.derby.iapi.types.XML"))
                 {
@@ -597,10 +595,10 @@
                         return getBuiltInTypeId(Types.LONGVARBINARY);
                 }
                 if (SQLTypeName.equals(TypeId.BLOB_NAME)) {
-                        return getBuiltInTypeId(JDBC20Translation.SQL_TYPES_BLOB);
+                        return getBuiltInTypeId(Types.BLOB);
                 }
                 if (SQLTypeName.equals(TypeId.CLOB_NAME)) {
-                        return getBuiltInTypeId(JDBC20Translation.SQL_TYPES_CLOB);
+                        return getBuiltInTypeId(Types.CLOB);
                 }
                 if (SQLTypeName.equals(TypeId.XML_NAME)) {
                         return getBuiltInTypeId(StoredFormatIds.XML_TYPE_ID);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
Fri Feb 29 11:17:53 2008
@@ -1192,7 +1192,7 @@
 			throw dataTypeConversion(parameterIndex, "null");
 		}
 		
-		if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT)
{
+		if (colType == Types.JAVA_OBJECT) {
 			try {
 				/* JDBC is one-based, DBMS is zero-based */
 				getParms().setParameterAsObject(parameterIndex - 1, x);
@@ -1730,7 +1730,7 @@
 
         switch (dataType) {
         case Types.ARRAY:
-        case JDBC30Translation.DATALINK:
+        case Types.DATALINK:
         case JDBC40Translation.NCHAR:
         case JDBC40Translation.NCLOB:
         case JDBC40Translation.NVARCHAR:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Fri Feb
29 11:17:53 2008
@@ -3053,7 +3053,7 @@
 	public void updateObject(int columnIndex, Object x) throws SQLException {
 		checksBeforeUpdateXXX("updateObject", columnIndex);
 		int colType = getColumnType(columnIndex);
-		if (colType == org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT)
{
+		if (colType == Types.JAVA_OBJECT) {
 			try {
 				((UserDataValue) getDVDforColumnToBeUpdated(columnIndex, "updateObject")).setValue(x);
 				return;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/Util.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/Util.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/Util.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/Util.java Fri Feb 29 11:17:53
2008
@@ -32,7 +32,6 @@
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.MessageId;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 
 import java.sql.SQLException;
@@ -301,8 +300,8 @@
 		switch (jdbcType) {
 			case Types.ARRAY: return TypeId.ARRAY_NAME;
 			case Types.BIT 		:  return TypeId.BIT_NAME;
-			case JDBC30Translation.SQL_TYPES_BOOLEAN  : return TypeId.BOOLEAN_NAME;
-			case JDBC30Translation.DATALINK: return TypeId.DATALINK_NAME;
+			case Types.BOOLEAN  : return TypeId.BOOLEAN_NAME;
+			case Types.DATALINK: return TypeId.DATALINK_NAME;
 			case Types.TINYINT 	:  return TypeId.TINYINT_NAME;
 			case Types.SMALLINT	:  return TypeId.SMALLINT_NAME;
 			case Types.INTEGER 	:  return TypeId.INTEGER_NAME;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
Fri Feb 29 11:17:53 2008
@@ -21,10 +21,11 @@
 
 package org.apache.derby.impl.sql.catalog;
 
+import java.sql.Types;
+
 import org.apache.derby.catalog.AliasInfo;
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
@@ -371,7 +372,7 @@
         SystemColumnImpl.getIndicatorColumn("ALIASTYPE"),
         SystemColumnImpl.getIndicatorColumn("NAMESPACE"),
         SystemColumnImpl.getColumn("SYSTEMALIAS",
-                JDBC30Translation.SQL_TYPES_BOOLEAN, false),
+                Types.BOOLEAN, false),
         SystemColumnImpl.getJavaColumn("ALIASINFO",
                 "org.apache.derby.catalog.AliasInfo", true),
         SystemColumnImpl.getIdentifierColumn("SPECIFICNAME", false)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
Fri Feb 29 11:17:53 2008
@@ -22,7 +22,6 @@
 package	org.apache.derby.impl.sql.compile;
 
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 
 import org.apache.derby.iapi.util.JBitSet;
 
@@ -968,7 +967,7 @@
 			typeId = rightOperand.getTypeId();
 
 		if (typeId != null && (typeId.getJDBCTypeId() == Types.BIT ||
-		typeId.getJDBCTypeId() == JDBC30Translation.SQL_TYPES_BOOLEAN))
+		typeId.getJDBCTypeId() == Types.BOOLEAN))
 			retval = 0.5d;
 
 		return retval;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Fri Feb
29 11:17:53 2008
@@ -45,7 +45,6 @@
 import org.apache.derby.iapi.util.StringUtil;
 
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.services.classfile.VMOpcode;
 
 import org.apache.derby.iapi.sql.compile.Visitable;
@@ -285,9 +284,9 @@
 			switch (sourceJDBCTypeId)
 			{
 				case Types.BIT:
-				case JDBC30Translation.SQL_TYPES_BOOLEAN:
+				case Types.BOOLEAN:
 					// (BIT is boolean)
-					if (destJDBCTypeId == Types.BIT || destJDBCTypeId == JDBC30Translation.SQL_TYPES_BOOLEAN)
+					if (destJDBCTypeId == Types.BIT || destJDBCTypeId == Types.BOOLEAN)
 					{
 						retNode = castOperand;
 					}
@@ -450,7 +449,7 @@
 		switch (destJDBCTypeId)
 		{
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				if (cleanCharValue.equals("TRUE"))
 				{
 					return (ValueNode) getNodeFactory().getNode(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
Fri Feb 29 11:17:53 2008
@@ -151,7 +151,7 @@
         {
         case Types.BIGINT:
             return 8;
-		case org.apache.derby.iapi.reference.JDBC30Translation.SQL_TYPES_BOOLEAN:
+		case Types.BOOLEAN:
         case Types.BIT:
             return 1;
         case Types.BINARY:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
Fri Feb 29 11:17:53 2008
@@ -34,7 +34,6 @@
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.JDBC20Translation;
 
 import java.sql.Types;
 
@@ -110,8 +109,8 @@
 				case Types.VARBINARY:
 				case Types.LONGVARBINARY:
 				case Types.LONGVARCHAR:
-                case JDBC20Translation.SQL_TYPES_BLOB:
-                case JDBC20Translation.SQL_TYPES_CLOB:
+                case Types.BLOB:
+                case Types.CLOB:
 					break;
 			
 				default:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
Fri Feb 29 11:17:53 2008
@@ -3239,7 +3239,7 @@
 				int jdbcColumnType = rsmd.getColumnType(index);
 
 				switch (jdbcColumnType) {
-				case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
+				case Types.JAVA_OBJECT:
 				case Types.OTHER:
 				{
 					cti = TypeId.getUserDefinedTypeId(rsmd.getColumnTypeName(index), false);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
Fri Feb 29 11:17:53 2008
@@ -93,7 +93,7 @@
 				case Types.LONGVARCHAR:
 				case Types.CLOB:
 					break;
-				case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
+				case Types.JAVA_OBJECT:
 				case Types.OTHER:	
 				{
 					throw StandardException.newException(SQLState.LANG_UNARY_FUNCTION_BAD_TYPE, 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
Fri Feb 29 11:17:53 2008
@@ -27,8 +27,6 @@
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 
 import org.apache.derby.iapi.services.io.StoredFormatIds;
@@ -92,7 +90,7 @@
                                                                         typeId);
 
                   case Types.BIT:
-                  case JDBC30Translation.SQL_TYPES_BOOLEAN:
+                  case Types.BOOLEAN:
                         return booleanTypeCompiler =
                                         getAnInstance(PACKAGE_NAME + "BooleanTypeCompiler",
                                                                 booleanTypeCompiler,
@@ -130,7 +128,7 @@
                                                                 longintTypeCompiler,
                                                                 typeId);
 
-                  case JDBC20Translation.SQL_TYPES_BLOB:
+                  case Types.BLOB:
                         return blobTypeCompiler =
                                 getAnInstance(PACKAGE_NAME + "LOBTypeCompiler",
                                                           blobTypeCompiler,
@@ -142,7 +140,7 @@
                                                           longvarbitTypeCompiler,
                                                           typeId);
 
-                  case JDBC20Translation.SQL_TYPES_CLOB:
+                  case Types.CLOB:
                       sqlTypeName = typeId.getSQLTypeName();
                       return clobTypeCompiler =
                           getAnInstance(PACKAGE_NAME + "CLOBTypeCompiler",
@@ -202,7 +200,7 @@
                                                       varcharTypeCompiler,
                                                       typeId);
 
-                  case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
+                  case Types.JAVA_OBJECT:
                   case Types.OTHER:
                         if (typeId.isRefTypeId())
                         {

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
Fri Feb 29 11:17:53 2008
@@ -23,7 +23,6 @@
 import java.sql.ParameterMetaData;
 import java.sql.ResultSet;
 import java.sql.Statement;
-import java.sql.Types;
 /**
         This class contains public statics that map directly
         to the new public statics in the jdbc 3.0 classes.
@@ -69,15 +68,4 @@
         public static final int EXECUTE_FAILED = Statement.EXECUTE_FAILED;
         public static final int RETURN_GENERATED_KEYS = Statement.RETURN_GENERATED_KEYS;
         public static final int NO_GENERATED_KEYS = Statement.NO_GENERATED_KEYS;
-
-        /*
-        ** public statics from 3.0 version of java.sql.Types
-        */
-        public static final int DATALINK = Types.DATALINK;
-        public static final int BOOLEAN = Types.BOOLEAN;
-
-        /*
-        ** New types in JDBC 3.0
-        */
-        public static final int SQL_TYPES_BOOLEAN = Types.BOOLEAN;
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams.java
Fri Feb 29 11:17:53 2008
@@ -23,7 +23,6 @@
 import java.sql.*;
 
 import org.apache.derby.tools.ij;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import java.io.PrintStream;
 import java.math.BigInteger;
 import java.math.BigDecimal;
@@ -337,7 +336,7 @@
 	static final int types[] =
 	{
 		Types.BIT,
-		JDBC30Translation.SQL_TYPES_BOOLEAN,
+		Types.BOOLEAN,
 		Types.TINYINT,
 		Types.SMALLINT,
 		Types.INTEGER,
@@ -1015,7 +1014,7 @@
 		switch (type)	
 		{
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				strbuf.append("setObject("+arg+", true)");
 				cs.setObject(arg, new Boolean(true));
 				break;
@@ -1102,7 +1101,7 @@
 		switch (type)	
 		{
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				strbuf.append("setBoolean("+arg+", true)");
 				cs.setBoolean(arg, true);
 				break;
@@ -1190,7 +1189,7 @@
 		switch (type)	
 		{
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				strbuf.append("getBoolean("+arg+") = ");
 				strbuf.append(cs.getBoolean(arg));
 				break;
@@ -1342,7 +1341,7 @@
 				return "00680065006c006c006f";
 
 			case Types.BIT:
-			case JDBC30Translation.SQL_TYPES_BOOLEAN:
+			case Types.BOOLEAN:
 				return "true";
 
 			default:

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
Fri Feb 29 11:17:53 2008
@@ -37,7 +37,6 @@
 import java.security.PrivilegedActionException;
 import javax.sql.DataSource;
 
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.services.info.JVMInfo;
 import org.apache.derbyTesting.functionTests.harness.RunTest;
 
@@ -525,7 +524,7 @@
 	  public static String sqlNameFromJdbc(int jdbcType) {
 		switch (jdbcType) {
 			case Types.BIT 		:  return "Types.BIT";
-			case JDBC30Translation.SQL_TYPES_BOOLEAN  : return "Types.BOOLEAN";
+			case Types.BOOLEAN  : return "Types.BOOLEAN";
 			case Types.TINYINT 	:  return "Types.TINYINT";
 			case Types.SMALLINT	:  return "SMALLINT";
 			case Types.INTEGER 	:  return "INTEGER";
@@ -560,7 +559,7 @@
 	  public static String getNameFromJdbcType(int jdbcType) {
 		switch (jdbcType) {
 			case Types.BIT 		:  return "Types.BIT";
-			case JDBC30Translation.SQL_TYPES_BOOLEAN  : return "Types.BOOLEAN";
+			case Types.BOOLEAN  : return "Types.BOOLEAN";
 			case Types.TINYINT 	:  return "Types.TINYINT";
 			case Types.SMALLINT	:  return "Types.SMALLINT";
 			case Types.INTEGER 	:  return "Types.INTEGER";

Modified: db/derby/code/trunk/java/tools/org/apache/derby/tools/JDBCDisplayUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/tools/JDBCDisplayUtil.java?rev=632413&r1=632412&r2=632413&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/tools/JDBCDisplayUtil.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/tools/JDBCDisplayUtil.java Fri Feb 29
11:17:53 2008
@@ -677,7 +677,7 @@
 			default:
 				s = LocalizedResource.getInstance().getLocalizedString(rs, rsmd, colnum );
 				break;
-			case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
+			case Types.JAVA_OBJECT:
 			case Types.OTHER:
 			{
 				Object o = rs.getObject(colnum);
@@ -1187,7 +1187,7 @@
 			default:
 				s = rs.getString(colnum);
 				break;
-			case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
+			case Types.JAVA_OBJECT:
 			case Types.OTHER:
 			{
 				Object o = rs.getObject(colnum);



Mime
View raw message