You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2013/04/24 06:37:31 UTC

svn commit: r1471245 [1/14] - in /db/derby/code/trunk/java: client/org/apache/derby/client/ client/org/apache/derby/client/am/ client/org/apache/derby/client/am/stmtcache/ client/org/apache/derby/client/net/ client/org/apache/derby/jdbc/ testing/org/ap...

Author: dag
Date: Wed Apr 24 04:37:28 2013
New Revision: 1471245

URL: http://svn.apache.org/r1471245
Log:
DERBY-6125 Code clean up in client driver.

derby-6125-rename-c which renames the name overloaded JDBC classes in
the client driver thus:

    am/<JDBCClassName>.java -> am/Client<JDBCClassName>.java

This allows import statements to be used for all JDBC and Derby
classes. The rest of the patch implements such usage instead of full
pathnames in usages. After this patch, the only overload that needs
explicit package path is "java.util.Date" which would otherwise
collide with java.sql.Date. In one instance, I let a full path remain
in order to avoid a compiler warning: the deprecated use of
StringBufferInputStream in ClientClob.java.


Added:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement40.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement42.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/ParameterMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement40.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement42.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java
      - copied, changed from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
Removed:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ParameterMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalCallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalCallableStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalCallableStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalPreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalPreparedStatement40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalPreparedStatement42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/MaterialStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Section.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/StatementCacheInteractor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/StatementCallbackInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UnitOfWorkListener.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveBlobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveLOBLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKey.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKeyFactory.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ConnectionRequestInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/EbcdicCcsidManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetLogWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSetReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSetRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetSqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXACallInfo.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/OpenSocketAction.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetRequestInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSourceInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSourceInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSourceInterface.java
    db/derby/code/trunk/java/testing/org/apache/derby/client/am/LogicalStatementEntityTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/VerifySignatures.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CacheSessionDataTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper41DBMD.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper41Statement.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper42DBMD.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java Wed Apr 24 04:37:28 2013
@@ -23,9 +23,14 @@ package org.apache.derby.client;
 
 import java.lang.reflect.Method;
 import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Locale;
+import javax.naming.Context;
+import javax.naming.Name;
 
 import javax.naming.RefAddr;
 import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
 
 /**
  * The data source factory for Derby client driver data sources.
@@ -51,7 +56,7 @@ import javax.naming.Reference;
  * @see org.apache.derby.jdbc.ClientConnectionPoolDataSource
  * @see org.apache.derby.jdbc.ClientXADataSource
  */
-public class ClientDataSourceFactory implements javax.naming.spi.ObjectFactory {
+public class ClientDataSourceFactory implements ObjectFactory {
 
     public ClientDataSourceFactory() {}
 
@@ -84,12 +89,12 @@ public class ClientDataSourceFactory imp
      * @throws Exception if recreating the object fails
      */
     public Object getObjectInstance(Object refObj,
-                                    javax.naming.Name name,
-                                    javax.naming.Context nameContext,
-                                    java.util.Hashtable environment) throws java.lang.Exception {
+                                    Name name,
+                                    Context nameContext,
+                                    Hashtable environment) throws Exception {
         Object ds = null;
-        if (refObj instanceof javax.naming.Reference) {
-            javax.naming.Reference ref = (javax.naming.Reference) refObj;
+        if (refObj instanceof Reference) {
+            Reference ref = (Reference) refObj;
 
             // See if this object belongs to Derby.
             String className = ref.getClassName();
@@ -136,7 +141,7 @@ public class ClientDataSourceFactory imp
 
             String methodName = "set"
                     + propertyName.substring(0, 1).toUpperCase(
-                            java.util.Locale.ENGLISH)
+                            Locale.ENGLISH)
                     + propertyName.substring(1);
 
             Method m;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection.java Wed Apr 24 04:37:28 2013
@@ -20,13 +20,16 @@
 */
 package org.apache.derby.client;
 
+import java.sql.Connection;
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import javax.sql.ConnectionEvent;
 import javax.sql.ConnectionEventListener;
+import javax.sql.PooledConnection;
 import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.Connection;
+import org.apache.derby.client.am.ClientConnection;
 import org.apache.derby.client.am.LogWriter;
 import org.apache.derby.client.am.LogicalConnection;
 import org.apache.derby.client.am.SqlException;
@@ -43,7 +46,7 @@ import org.apache.derby.shared.common.re
  * A physical connection to a data source, to be used for creating logical
  * connections to the same data source.
  */
-public class ClientPooledConnection implements javax.sql.PooledConnection {
+public class ClientPooledConnection implements PooledConnection {
 
     /** Tells if this pooled connection is newly created. */
     private boolean newPC_ = true;
@@ -62,8 +65,8 @@ public class ClientPooledConnection impl
      */
     private int eventIterators;
 
-    Connection physicalConnection_ = null;
-    private NetConnection netPhysicalConnection_ = null;
+    ClientConnection physicalConnection_ = null;
+    NetConnection netPhysicalConnection_ = null;
     NetXAConnection netXAPhysicalConnection_ = null;
 
     /**
@@ -242,7 +245,7 @@ public class ClientPooledConnection impl
      * 
      * @throws SQLException if creating a new logical connection fails
      */
-    public synchronized java.sql.Connection getConnection() throws SQLException {
+    public synchronized Connection getConnection() throws SQLException {
         try
         {
             if (logWriter_ != null) {
@@ -449,7 +452,7 @@ public class ClientPooledConnection impl
      * @param statement The PreparedStatement that was closed
      *
      */
-    public void onStatementClose(java.sql.PreparedStatement statement) {
+    public void onStatementClose(PreparedStatement statement) {
         
     }
     
@@ -463,7 +466,7 @@ public class ClientPooledConnection impl
      * @param sqle      The SQLException associated with the error that caused
      *                  the invalidation of this PreparedStatement
      */
-    public void onStatementErrorOccurred(java.sql.PreparedStatement statement,
+    public void onStatementErrorOccurred(PreparedStatement statement,
                     SQLException sqle) {
         
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,7 @@
 
 package org.apache.derby.client;
 
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.concurrent.CopyOnWriteArrayList;
 import javax.sql.StatementEventListener;
@@ -110,7 +111,7 @@ public class ClientPooledConnection40 ex
      * @param statement The PreparedStatement that was closed
      *
      */
-    public void onStatementClose(java.sql.PreparedStatement statement) {
+    public void onStatementClose(PreparedStatement statement) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement);
             for (StatementEventListener l : statementEventListeners) {
@@ -129,7 +130,7 @@ public class ClientPooledConnection40 ex
      *                  caused the invalidation of the PreparedStatements
      *
      */
-    public void onStatementErrorOccurred(java.sql.PreparedStatement statement,
+    public void onStatementErrorOccurred(PreparedStatement statement,
                                          SQLException sqle) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement,sqle);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java Wed Apr 24 04:37:28 2013
@@ -20,12 +20,13 @@
 */
 package org.apache.derby.client;
 
+import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.XAConnection;
 import javax.transaction.xa.XAResource;
 
 import org.apache.derby.client.am.ClientMessageId;
-import org.apache.derby.client.am.Connection;
+import org.apache.derby.client.am.ClientConnection;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.net.NetLogWriter;
 import org.apache.derby.client.net.NetXAConnection;
@@ -41,7 +42,7 @@ public class ClientXAConnection extends 
     private boolean fFirstGetConnection_ = true;
 
      // logicalConnection_ is inherited from ClientPooledConnection
-    private java.sql.Connection logicalCon_;
+    private Connection logicalCon_;
 
     // This connection is used to access the indoubt table
     private NetXAConnection controlCon_ = null;
@@ -63,7 +64,7 @@ public class ClientXAConnection extends 
         xares_ = netXares_;
     }
 
-    public java.sql.Connection getConnection() throws SQLException {
+    public Connection getConnection() throws SQLException {
         if (fFirstGetConnection_) {
             // Since super.getConnection() has already been called once
             // in the constructor, we don't need to call it again for the

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,7 @@
 
 package org.apache.derby.client;
 
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.concurrent.CopyOnWriteArrayList;
 import javax.sql.StatementEvent;
@@ -101,7 +102,7 @@ public class ClientXAConnection40 extend
      * corresponding events occurs
      * @param statement The PreparedStatement that was closed
      */
-    public void onStatementClose(java.sql.PreparedStatement statement) {
+    public void onStatementClose(PreparedStatement statement) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement);
             for (StatementEventListener l : statementEventListeners) {
@@ -120,7 +121,7 @@ public class ClientXAConnection40 extend
      *                  caused the invalidation of the PreparedStatements
      *
      */
-    public void onStatementErrorOccurred(java.sql.PreparedStatement statement,
+    public void onStatementErrorOccurred(PreparedStatement statement,
                     SQLException sqle) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement,sqle);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,9 @@
 
 package org.apache.derby.client.am;
 
+import java.io.PrintWriter;
+import java.sql.BatchUpdateException;
+import java.sql.Types;
 import org.apache.derby.jdbc.ClientDriver;
 import org.apache.derby.shared.common.reference.JDBC40Translation;
 import org.apache.derby.shared.common.reference.SQLState;
@@ -32,7 +35,7 @@ public abstract class Agent {
     private int batchedExceptionLabelIndex_;
     private boolean[] batchedExceptionGenerated_;
 
-    Connection connection_; // made friendly for lobs only, refactor !!
+    ClientConnection connection_; // made friendly for lobs only, refactor !!
     public SectionManager sectionManager_ = null; // temporarily public, make friendly at least !!
 
     public LogWriter logWriter_ = null;
@@ -75,24 +78,24 @@ public abstract class Agent {
         // (sort of) JAVA_OBJECT.
 
         switch (dataType) {
-        case java.sql.Types.ARRAY:
-        case java.sql.Types.DATALINK:
-        case java.sql.Types.DISTINCT:
+        case Types.ARRAY:
+        case Types.DATALINK:
+        case Types.DISTINCT:
         case JDBC40Translation.NCHAR:
         case JDBC40Translation.NCLOB:
         case JDBC40Translation.NVARCHAR:
         case JDBC40Translation.LONGNVARCHAR:
-        case java.sql.Types.NULL:
-        case java.sql.Types.OTHER:
-        case java.sql.Types.REF:
+        case Types.NULL:
+        case Types.OTHER:
+        case Types.REF:
         case JDBC40Translation.REF_CURSOR:
         case JDBC40Translation.ROWID:
         case JDBC40Translation.SQLXML:
-        case java.sql.Types.STRUCT:
+        case Types.STRUCT:
             throw new SqlException
                 (logWriter_,
                  new ClientMessageId(SQLState.DATA_TYPE_NOT_SUPPORTED),
-                 Types.getTypeString(dataType));
+                 ClientTypes.getTypeString(dataType));
         }
     }
 
@@ -104,7 +107,7 @@ public abstract class Agent {
         }
     }
 
-    protected Agent(Connection connection, LogWriter logWriter) {
+    protected Agent(ClientConnection connection, LogWriter logWriter) {
         connection_ = connection;
         logWriter_ = logWriter;
         crossConverters_ = new CrossConverters(this);
@@ -120,7 +123,13 @@ public abstract class Agent {
         deferredException_ = null;
     }
 
-    public void resetAgent(Connection connection, LogWriter logWriter, int loginTimeout, String server, int port) throws SqlException {
+    public void resetAgent(
+        ClientConnection connection,
+        LogWriter logWriter,
+        int loginTimeout,
+        String server,
+        int port) throws SqlException {
+
         resetAgent(logWriter);
         resetAgent_(logWriter, loginTimeout, server, port);
     }
@@ -142,11 +151,12 @@ public abstract class Agent {
         }
     }
 
-    public final java.io.PrintWriter getLogWriter() {
+    public final PrintWriter getLogWriter() {
         return (logWriter_ == null) ? null : logWriter_.printWriter_;
     }
 
-    abstract public LogWriter newLogWriter_(java.io.PrintWriter printWriter, int traceLevel);
+    abstract public LogWriter newLogWriter_(
+        PrintWriter printWriter, int traceLevel);
 
     //----------------------------------------------------------------------------
 
@@ -224,13 +234,14 @@ public abstract class Agent {
         return batchedExceptionGenerated_[batchedExceptionLabelIndex_];
     }
 
-    public final void flow(Statement statement) throws SqlException {
+    public final void flow(ClientStatement statement) throws SqlException {
         endWriteChain();
         flush_();
         beginReadChain(statement);
     }
 
-    public final void flowBatch(Statement statement, int batchSize) throws SqlException {
+    public final void flowBatch(ClientStatement statement, int batchSize)
+            throws SqlException {
         endBatchedWriteChain();
         flush_();
         beginBatchedReadChain(statement, batchSize);
@@ -267,11 +278,12 @@ public abstract class Agent {
     public void beginWriteChainOutsideUOW() throws SqlException {
     }
 
-    public void beginWriteChain(Statement statement) throws SqlException {
+    public void beginWriteChain(ClientStatement statement) throws SqlException {
         connection_.writeTransactionStart(statement);
     }
 
-    public final void beginBatchedWriteChain(Statement statement) throws SqlException {
+    public final void beginBatchedWriteChain(ClientStatement statement)
+            throws SqlException {
         beginWriteChain(statement);
     }
 
@@ -281,11 +293,16 @@ public abstract class Agent {
     protected final void endBatchedWriteChain() {
     }
 
-    protected void beginReadChain(Statement statement) throws SqlException {
+    protected void beginReadChain(ClientStatement statement)
+            throws SqlException {
         connection_.readTransactionStart();
     }
 
-    protected final void beginBatchedReadChain(Statement statement, int batchSize) throws SqlException {
+    protected final void beginBatchedReadChain(
+        ClientStatement statement,
+        int batchSize)
+            throws SqlException {
+
         enableBatchedExceptionTracking(batchSize);
         beginReadChain(statement);
     }
@@ -298,7 +315,7 @@ public abstract class Agent {
     }
 
     public final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions)
-        throws java.sql.BatchUpdateException {
+        throws BatchUpdateException {
         disableBatchedExceptionTracking();
         for (int i = 0; i < batchedExceptionGenerated_.length; i++) {
             if (batchedExceptionGenerated_[i]) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java Wed Apr 24 04:37:28 2013
@@ -20,10 +20,13 @@
 */
 package org.apache.derby.client.am;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
 import java.io.StringReader;
 
-public class AsciiStream extends java.io.InputStream {
-    private java.io.Reader reader_;
+public class AsciiStream extends InputStream {
+    private Reader reader_;
     private String materializedString_;
     private int charsRead_ = 0;
     
@@ -31,12 +34,12 @@ public class AsciiStream extends java.io
         this(materializedString,new StringReader(materializedString));
     }
     
-    public AsciiStream(String materializedString, java.io.Reader reader) {
+    public AsciiStream(String materializedString, Reader reader) {
         reader_ = reader;
         materializedString_ = materializedString;
     }
 
-    public int read() throws java.io.IOException {
+    public int read() throws IOException {
         int oneChar = reader_.read();
         ++charsRead_;
         if (oneChar != -1) // if not eos

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java Wed Apr 24 04:37:28 2013
@@ -22,6 +22,7 @@
 package org.apache.derby.client.am;
 
 import java.io.IOException;
+import java.io.InputStream;
 
 import org.apache.derby.shared.common.sanity.SanityManager;
 
@@ -34,13 +35,13 @@ import org.apache.derby.shared.common.sa
  * generating an <code>IOException</code>.
  * <p>
  * This <code>InputStream</code> implementation is pretty basic.  No
- * buffering of data is done.  Hence, for efficieny #read(byte[])
+ * buffering of data is done.  Hence, for efficiency #read(byte[])
  * should be used instead of #read().  Marks are not supported, but it
  * should be pretty simple to extend the implementation to support
  * this.  A more efficient skip implementation should also be
  * straight-forward.
  */
-public class BlobLocatorInputStream extends java.io.InputStream 
+public class BlobLocatorInputStream extends InputStream
 {
 
     /**
@@ -54,7 +55,7 @@ public class BlobLocatorInputStream exte
      * @throws SqlException if an error occurs when obtaining the
      *         length of the <code>Blob</code>.
      */
-    public BlobLocatorInputStream(Connection connection, Blob blob) 
+    public BlobLocatorInputStream(ClientConnection connection, ClientBlob blob)
         throws SqlException
     {        
         if (SanityManager.DEBUG) {
@@ -87,7 +88,7 @@ public class BlobLocatorInputStream exte
      * @throws SqlException if an error occurs when obtaining the
      *         length of the <code>Blob</code>.
      */
-    public BlobLocatorInputStream(Connection connection, Blob blob,
+    public BlobLocatorInputStream(ClientConnection connection, ClientBlob blob,
                                   long position, long length) 
         throws SqlException
     {    
@@ -187,12 +188,12 @@ public class BlobLocatorInputStream exte
     /**
      * Connection used to read Blob from server.
      */
-    private final Connection connection;
+    private final ClientConnection connection;
     
     /**
      * The Blob to be accessed.
      */
-    private final Blob blob;
+    private final ClientBlob blob;
 
     /**
      * Current position in the underlying Blob.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,7 @@
 
 package org.apache.derby.client.am;
 import java.io.IOException;
+import java.io.OutputStream;
 
 import org.apache.derby.shared.common.sanity.SanityManager;
 
@@ -33,10 +34,10 @@ import org.apache.derby.shared.common.sa
  * closed without generating an <code>IOException</code>.
  * <p>
  * This <code>OutputStream</code> implementation is pretty basic.  No
- * buffering of data is done.  Hence, for efficieny #write(byte[])
+ * buffering of data is done.  Hence, for efficiency #write(byte[])
  * should be used instead of #write(int).  
  */
-public class BlobLocatorOutputStream extends java.io.OutputStream {
+public class BlobLocatorOutputStream extends OutputStream {
     
     /**
      * Create an <code>OutputStream</code> for writing to the
@@ -49,9 +50,11 @@ public class BlobLocatorOutputStream ext
      * @param pos the position in the <code>BLOB</code> value at which
      *        to start writing; the first position is 1
      */
-    public BlobLocatorOutputStream(Connection connection, Blob blob, long pos)
-        throws SqlException
-    {
+    public BlobLocatorOutputStream(
+        ClientConnection connection,
+        ClientBlob blob,
+        long pos) throws SqlException {
+
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(blob.isLocator());
         }
@@ -129,12 +132,12 @@ public class BlobLocatorOutputStream ext
     /**
      * Connection used to read Blob from server.
      */
-    private final Connection connection;
+    private final ClientConnection connection;
 
     /**
      * The Blob to be accessed.
      */
-    private final Blob blob;
+    private final ClientBlob blob;
 
     /**
      * Current position in the underlying Blob.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java Wed Apr 24 04:37:28 2013
@@ -21,12 +21,16 @@
 
 package org.apache.derby.client.am;
 
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
 
-public class BlobOutputStream extends java.io.OutputStream {
-    private Blob blob_;
+
+public class BlobOutputStream extends OutputStream {
+    private ClientBlob blob_;
     private long offset_;
 
-    public BlobOutputStream(Blob blob, long offset) {
+    public BlobOutputStream(ClientBlob blob, long offset) {
         blob_ = blob;
         offset_ = offset;
         
@@ -39,13 +43,13 @@ public class BlobOutputStream extends ja
         }
     }
 
-    public void write(int b) throws java.io.IOException 
+    public void write(int b) throws IOException
     {
         byte ba[] = {(byte )b};
         writeX(ba, 0, 1);
     }
 
-    public void write(byte b[], int off, int len) throws java.io.IOException {
+    public void write(byte b[], int off, int len) throws IOException {
         if (b == null) {
             throw new NullPointerException();
         } else if ((off < 0) || (off > b.length) || (len < 0) ||
@@ -68,7 +72,7 @@ public class BlobOutputStream extends ja
                 = b[off + i];
         }
         blob_.binaryStream_ 
-            = new java.io.ByteArrayInputStream(blob_.binaryString_);
+            = new ByteArrayInputStream(blob_.binaryString_);
         blob_.setSqlLength(blob_.binaryString_.length - blob_.dataOffset_);
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection.java Wed Apr 24 04:37:28 2013
@@ -20,6 +20,8 @@
  */
 package org.apache.derby.client.am;
 
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
 import org.apache.derby.client.ClientPooledConnection;
@@ -53,7 +55,7 @@ public class CachingLogicalConnection
      *
      * @throws SqlException if creating the logical connection fails
      */
-    public CachingLogicalConnection(Connection physicalConnection,
+    public CachingLogicalConnection(ClientConnection physicalConnection,
                                     ClientPooledConnection pooledConnection,
                                     JDBCStatementCache stmtCache)
             throws SqlException {
@@ -73,13 +75,13 @@ public class CachingLogicalConnection
         }
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(String sql)
+    public synchronized PreparedStatement prepareStatement(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareStatement(sql);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency)
@@ -89,7 +91,7 @@ public class CachingLogicalConnection
                     sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency,
@@ -100,7 +102,7 @@ public class CachingLogicalConnection
                 sql, resultSetType,resultSetConcurrency, resultSetHoldability);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int autoGeneratedKeys)
             throws SQLException {
@@ -108,12 +110,12 @@ public class CachingLogicalConnection
         return cacheInteractor.prepareStatement(sql, autoGeneratedKeys);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int[] columnIndexes)
             throws SQLException {
         checkForNullPhysicalConnection();
-        java.sql.PreparedStatement ps = null;
+        PreparedStatement ps = null;
         if (columnIndexes != null && columnIndexes.length > 1) {
             // This should probably be extended to use a separate type of
             // statement key (instead of just saying its a statement which
@@ -131,22 +133,22 @@ public class CachingLogicalConnection
             }
             // No caching being done, but we are able to continue.
         } else {
-            int generatedKeys = Statement.RETURN_GENERATED_KEYS;
+            int generatedKeys = ClientStatement.RETURN_GENERATED_KEYS;
             // If indexes is null or empty, don't return autogenerated keys.
             if (columnIndexes == null || columnIndexes.length == 0) {
-                generatedKeys = Statement.NO_GENERATED_KEYS;
+                generatedKeys = ClientStatement.NO_GENERATED_KEYS;
             }
             ps = cacheInteractor.prepareStatement(sql, generatedKeys);
         }
         return ps;
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 String[] columnNames)
             throws SQLException {
         checkForNullPhysicalConnection();
-        java.sql.PreparedStatement ps = null;
+        PreparedStatement ps = null;
         if (columnNames != null && columnNames.length > 1) {
             // This should probably be extended to use a separate type of
             // statement key (instead of just saying its a statement which
@@ -164,23 +166,23 @@ public class CachingLogicalConnection
             }
             // No caching being done, but we are able to continue.
         } else {
-            int generatedKeys = Statement.RETURN_GENERATED_KEYS;
+            int generatedKeys = ClientStatement.RETURN_GENERATED_KEYS;
             // If names is null or empty, don't return autogenerated keys.
             if (columnNames == null || columnNames.length == 0) {
-                generatedKeys = Statement.NO_GENERATED_KEYS;
+                generatedKeys = ClientStatement.NO_GENERATED_KEYS;
             }
             ps = cacheInteractor.prepareStatement(sql, generatedKeys);
         }
         return ps;
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql)
+    public synchronized CallableStatement prepareCall(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareCall(sql);
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql,
+    public synchronized CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency)
             throws SQLException {
@@ -189,7 +191,7 @@ public class CachingLogicalConnection
                 sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql,
+    public synchronized CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency,
                                                       int resultSetHoldability)

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection40.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CachingLogicalConnection40.java Wed Apr 24 04:37:28 2013
@@ -20,6 +20,8 @@
  */
 package org.apache.derby.client.am;
 
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
 import org.apache.derby.client.ClientPooledConnection;
@@ -48,7 +50,7 @@ public class CachingLogicalConnection40
      *
      * @throws SqlException if creating the logical connection fails
      */
-    public CachingLogicalConnection40(Connection physicalConnection,
+    public CachingLogicalConnection40(ClientConnection physicalConnection,
                                       ClientPooledConnection pooledConnection,
                                       JDBCStatementCache stmtCache)
             throws SqlException {
@@ -68,13 +70,13 @@ public class CachingLogicalConnection40
         }
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(String sql)
+    public synchronized PreparedStatement prepareStatement(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareStatement(sql);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency)
@@ -84,7 +86,7 @@ public class CachingLogicalConnection40
                     sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency,
@@ -95,7 +97,7 @@ public class CachingLogicalConnection40
                 sql, resultSetType,resultSetConcurrency, resultSetHoldability);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int autoGeneratedKeys)
             throws SQLException {
@@ -103,12 +105,12 @@ public class CachingLogicalConnection40
         return cacheInteractor.prepareStatement(sql, autoGeneratedKeys);
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 int[] columnIndexes)
             throws SQLException {
         checkForNullPhysicalConnection();
-        java.sql.PreparedStatement ps = null;
+        PreparedStatement ps = null;
         if (columnIndexes != null && columnIndexes.length > 1) {
             // This should probably be extended to use a separate type of
             // statement key (instead of just saying its a statement which
@@ -126,22 +128,22 @@ public class CachingLogicalConnection40
             }
             // No caching being done, but we are able to continue.
         } else {
-            int generatedKeys = Statement.RETURN_GENERATED_KEYS;
+            int generatedKeys = ClientStatement.RETURN_GENERATED_KEYS;
             // If indexes is null or empty, don't return autogenerated keys.
             if (columnIndexes == null || columnIndexes.length == 0) {
-                generatedKeys = Statement.NO_GENERATED_KEYS;
+                generatedKeys = ClientStatement.NO_GENERATED_KEYS;
             }
             ps = cacheInteractor.prepareStatement(sql, generatedKeys);
         }
         return ps;
     }
 
-    public synchronized java.sql.PreparedStatement prepareStatement(
+    public synchronized PreparedStatement prepareStatement(
                                                 String sql,
                                                 String[] columnNames)
             throws SQLException {
         checkForNullPhysicalConnection();
-        java.sql.PreparedStatement ps = null;
+        PreparedStatement ps = null;
         if (columnNames != null && columnNames.length > 1) {
             // This should probably be extended to use a separate type of
             // statement key (instead of just saying its a statement which
@@ -159,23 +161,23 @@ public class CachingLogicalConnection40
             }
             // No caching being done, but we are able to continue.
         } else {
-            int generatedKeys = Statement.RETURN_GENERATED_KEYS;
+            int generatedKeys = ClientStatement.RETURN_GENERATED_KEYS;
             // If names is null or empty, don't return autogenerated keys.
             if (columnNames == null || columnNames.length == 0) {
-                generatedKeys = Statement.NO_GENERATED_KEYS;
+                generatedKeys = ClientStatement.NO_GENERATED_KEYS;
             }
             ps = cacheInteractor.prepareStatement(sql, generatedKeys);
         }
         return ps;
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql)
+    public synchronized CallableStatement prepareCall(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareCall(sql);
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql,
+    public synchronized CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency)
             throws SQLException {
@@ -184,7 +186,7 @@ public class CachingLogicalConnection40
                 sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized java.sql.CallableStatement prepareCall(String sql,
+    public synchronized CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency,
                                                       int resultSetHoldability)

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,8 @@
 
 package org.apache.derby.client.am;
 
+import java.sql.ResultSet;
+import java.sql.Types;
 import org.apache.derby.shared.common.error.ExceptionUtil;
 import org.apache.derby.shared.common.reference.SQLState;
 
@@ -53,27 +55,27 @@ class CallableLocatorProcedures 
     
     // One member variable for each stored procedure that can be called.
     // Used to be able to only prepare each procedure call once per connection.
-    private CallableStatement blobCreateLocatorCall;
-    private CallableStatement blobReleaseLocatorCall;
-    private CallableStatement blobGetPositionFromLocatorCall;
-    private CallableStatement blobGetPositionFromBytesCall;
-    private CallableStatement blobGetLengthCall;
-    private CallableStatement blobGetBytesCall;
-    private CallableStatement blobSetBytesCall;
-    private CallableStatement blobTruncateCall;
-    private CallableStatement clobCreateLocatorCall;
-    private CallableStatement clobReleaseLocatorCall;
-    private CallableStatement clobGetPositionFromStringCall;
-    private CallableStatement clobGetPositionFromLocatorCall;
-    private CallableStatement clobGetLengthCall;
-    private CallableStatement clobGetSubStringCall;
-    private CallableStatement clobSetStringCall;
-    private CallableStatement clobTruncateCall;
+    private ClientCallableStatement blobCreateLocatorCall;
+    private ClientCallableStatement blobReleaseLocatorCall;
+    private ClientCallableStatement blobGetPositionFromLocatorCall;
+    private ClientCallableStatement blobGetPositionFromBytesCall;
+    private ClientCallableStatement blobGetLengthCall;
+    private ClientCallableStatement blobGetBytesCall;
+    private ClientCallableStatement blobSetBytesCall;
+    private ClientCallableStatement blobTruncateCall;
+    private ClientCallableStatement clobCreateLocatorCall;
+    private ClientCallableStatement clobReleaseLocatorCall;
+    private ClientCallableStatement clobGetPositionFromStringCall;
+    private ClientCallableStatement clobGetPositionFromLocatorCall;
+    private ClientCallableStatement clobGetLengthCall;
+    private ClientCallableStatement clobGetSubStringCall;
+    private ClientCallableStatement clobSetStringCall;
+    private ClientCallableStatement clobTruncateCall;
 
     /**
      * The connection to be used when calling the stored procedures.
      */
-    private final Connection connection; 
+    private final ClientConnection connection;
 
     /**
      * Max size of byte[] and String parameters to procedures
@@ -89,7 +91,7 @@ class CallableLocatorProcedures 
      *
      * @param conn the connection to be used to prepare calls.
      */
-    CallableLocatorProcedures(Connection conn) 
+    CallableLocatorProcedures(ClientConnection conn)
     {
         this.connection = conn;
     }
@@ -116,11 +118,11 @@ class CallableLocatorProcedures 
                     !blobCreateLocatorCall.openOnClient_) {
                 blobCreateLocatorCall = connection.prepareCallX
                         ("? = CALL SYSIBM.BLOBCREATELOCATOR()",
-                        java.sql.ResultSet.TYPE_FORWARD_ONLY,
-                        java.sql.ResultSet.CONCUR_READ_ONLY,
+                        ResultSet.TYPE_FORWARD_ONLY,
+                        ResultSet.CONCUR_READ_ONLY,
                         connection.holdability());
                 blobCreateLocatorCall
-                        .registerOutParameterX(1, java.sql.Types.INTEGER);
+                        .registerOutParameterX(1, Types.INTEGER);
                 // Make sure this statement does not commit user transaction
                 blobCreateLocatorCall.isAutoCommittableStatement_ = false;
             }
@@ -167,9 +169,9 @@ class CallableLocatorProcedures 
                 !blobReleaseLocatorCall.openOnClient_) {
             blobReleaseLocatorCall = connection.prepareCallX
                 ("CALL SYSIBM.BLOBRELEASELOCATOR(?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             blobReleaseLocatorCall.isAutoCommittableStatement_ = false;
         }
@@ -203,11 +205,11 @@ class CallableLocatorProcedures 
                 !blobGetPositionFromLocatorCall.openOnClient_) {
             blobGetPositionFromLocatorCall = connection.prepareCallX
                 ("? = CALL SYSIBM.BLOBGETPOSITIONFROMLOCATOR(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             blobGetPositionFromLocatorCall
-                .registerOutParameterX(1, java.sql.Types.BIGINT);
+                .registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             blobGetPositionFromLocatorCall.isAutoCommittableStatement_ = false;
         }
@@ -329,11 +331,11 @@ class CallableLocatorProcedures 
                 !blobGetPositionFromBytesCall.openOnClient_) {
             blobGetPositionFromBytesCall = connection.prepareCallX
                 ("? = CALL SYSIBM.BLOBGETPOSITIONFROMBYTES(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             blobGetPositionFromBytesCall
-                .registerOutParameterX(1, java.sql.Types.BIGINT);
+                .registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             blobGetPositionFromBytesCall.isAutoCommittableStatement_ = false;
         }
@@ -372,10 +374,10 @@ class CallableLocatorProcedures 
         if (blobGetLengthCall == null || !blobGetLengthCall.openOnClient_) {
             blobGetLengthCall = connection.prepareCallX
                 ("? = CALL SYSIBM.BLOBGETLENGTH(?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
-            blobGetLengthCall.registerOutParameterX(1, java.sql.Types.BIGINT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
+            blobGetLengthCall.registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             blobGetLengthCall.isAutoCommittableStatement_ = false;
         }
@@ -421,10 +423,10 @@ class CallableLocatorProcedures 
         if (blobGetBytesCall == null || !blobGetBytesCall.openOnClient_) {
             blobGetBytesCall = connection.prepareCallX
                 ("? = CALL SYSIBM.BLOBGETBYTES(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
-            blobGetBytesCall.registerOutParameterX(1, java.sql.Types.VARBINARY);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
+            blobGetBytesCall.registerOutParameterX(1, Types.VARBINARY);
             // Make sure this statement does not commit user transaction
             blobGetBytesCall.isAutoCommittableStatement_ = false;
         }
@@ -494,9 +496,9 @@ class CallableLocatorProcedures 
         if (blobSetBytesCall == null || !blobSetBytesCall.openOnClient_) {
             blobSetBytesCall = connection.prepareCallX
                 ("CALL SYSIBM.BLOBSETBYTES(?, ?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             blobSetBytesCall.isAutoCommittableStatement_ = false;
         }
@@ -549,9 +551,9 @@ class CallableLocatorProcedures 
         if (blobTruncateCall == null || !blobTruncateCall.openOnClient_) {
             blobTruncateCall = connection.prepareCallX
                 ("CALL SYSIBM.BLOBTRUNCATE(?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             blobTruncateCall.isAutoCommittableStatement_ = false;
         }
@@ -588,11 +590,11 @@ class CallableLocatorProcedures 
                     !clobCreateLocatorCall.openOnClient_) {
                 clobCreateLocatorCall = connection.prepareCallX
                         ("? = CALL SYSIBM.CLOBCREATELOCATOR()",
-                        java.sql.ResultSet.TYPE_FORWARD_ONLY,
-                        java.sql.ResultSet.CONCUR_READ_ONLY,
-                        java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                        ResultSet.TYPE_FORWARD_ONLY,
+                        ResultSet.CONCUR_READ_ONLY,
+                        ResultSet.CLOSE_CURSORS_AT_COMMIT);
                 clobCreateLocatorCall
-                        .registerOutParameterX(1, java.sql.Types.INTEGER);
+                        .registerOutParameterX(1, Types.INTEGER);
                 // Make sure this statement does not commit user transaction
                 clobCreateLocatorCall.isAutoCommittableStatement_ = false;
             }
@@ -639,9 +641,9 @@ class CallableLocatorProcedures 
                 !clobReleaseLocatorCall.openOnClient_) {
             clobReleaseLocatorCall = connection.prepareCallX
                 ("CALL SYSIBM.CLOBRELEASELOCATOR(?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             clobReleaseLocatorCall.isAutoCommittableStatement_ = false;
         }
@@ -757,11 +759,11 @@ class CallableLocatorProcedures 
                 !clobGetPositionFromStringCall.openOnClient_) {
             clobGetPositionFromStringCall = connection.prepareCallX
                 ("? = CALL SYSIBM.CLOBGETPOSITIONFROMSTRING(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             clobGetPositionFromStringCall
-                .registerOutParameterX(1, java.sql.Types.BIGINT);
+                .registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             clobGetPositionFromStringCall.isAutoCommittableStatement_ = false;
         }
@@ -806,11 +808,11 @@ class CallableLocatorProcedures 
                 !clobGetPositionFromLocatorCall.openOnClient_) {
             clobGetPositionFromLocatorCall = connection.prepareCallX
                 ("? = CALL SYSIBM.CLOBGETPOSITIONFROMLOCATOR(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             clobGetPositionFromLocatorCall
-                .registerOutParameterX(1, java.sql.Types.BIGINT);
+                .registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             clobGetPositionFromLocatorCall.isAutoCommittableStatement_ = false;
         }
@@ -839,10 +841,10 @@ class CallableLocatorProcedures 
         if (clobGetLengthCall == null || !clobGetLengthCall.openOnClient_) {
             clobGetLengthCall = connection.prepareCallX
                 ("? = CALL SYSIBM.CLOBGETLENGTH(?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
-            clobGetLengthCall.registerOutParameterX(1, java.sql.Types.BIGINT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
+            clobGetLengthCall.registerOutParameterX(1, Types.BIGINT);
             // Make sure this statement does not commit user transaction
             clobGetLengthCall.isAutoCommittableStatement_ = false;
         }
@@ -889,11 +891,11 @@ class CallableLocatorProcedures 
                 !clobGetSubStringCall.openOnClient_) {
             clobGetSubStringCall = connection.prepareCallX
                 ("? = CALL SYSIBM.CLOBGETSUBSTRING(?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             clobGetSubStringCall
-                .registerOutParameterX(1, java.sql.Types.VARCHAR);
+                .registerOutParameterX(1, Types.VARCHAR);
             // Make sure this statement does not commit user transaction
             clobGetSubStringCall.isAutoCommittableStatement_ = false;
         }
@@ -937,16 +939,16 @@ class CallableLocatorProcedures 
      * <code>CLOB</code> value designated by <code>sourceLocator</code>.
      * Writing starts at position <code>fromPosition</code> in the
      * <code>CLOB</code> value; <code>forLength</code> characters from the
-     * given string are written. If the end of the <code>Clob</code> value is
+     * given string are written. If the end of the <code>CLOB</code> value is
      * reached while writing the string, then the length of the
-     * <code>Clob</code> value will be increased to accomodate the extra
+     * <code>CLOB</code> value will be increased to accomodate the extra
      * characters.
      * <p> 
      * If <code>forLength</code> is larger than the maximum length of a
      * VARCHAR, the writing to the CLOB value will be split into repeated
      * procedure calls.
      *
-     * @param sourceLocator locator that identifies the Clob to operated on
+     * @param sourceLocator locator that identifies the CLOB to operated on
      * @param fromPosition the position in the <code>CLOB</code> value at which
      *        to start writing; the first position is 1
      * @param forLength the number of characters to be written to the
@@ -964,9 +966,9 @@ class CallableLocatorProcedures 
         if (clobSetStringCall == null || !clobSetStringCall.openOnClient_) {
             clobSetStringCall = connection.prepareCallX
                 ("CALL SYSIBM.CLOBSETSTRING(?, ?, ?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             clobSetStringCall.isAutoCommittableStatement_ = false;
         }
@@ -1006,7 +1008,7 @@ class CallableLocatorProcedures 
      * than the length+1 of the <code>CLOB</code> value then an
      * <code>SqlException</code> will be thrown.
      * 
-     * @param sourceLocator locator identifying the Clob to be truncated
+     * @param sourceLocator locator identifying the CLOB to be truncated
      * @param length the length, in characters, to which the <code>CLOB</code>
      *        value should be truncated
      */
@@ -1015,9 +1017,9 @@ class CallableLocatorProcedures 
         if (clobTruncateCall == null || !clobTruncateCall.openOnClient_) {
             clobTruncateCall = connection.prepareCallX
                 ("CALL SYSIBM.CLOBTRUNCATE(?, ?)",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                 ResultSet.TYPE_FORWARD_ONLY,
+                 ResultSet.CONCUR_READ_ONLY,
+                 ResultSet.CLOSE_CURSORS_AT_COMMIT);
             // Make sure this statement does not commit user transaction
             clobTruncateCall.isAutoCommittableStatement_ = false;
         }

Copied: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java (from r1471244, db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java?p2=db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java&p1=db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java&r1=1471244&r2=1471245&rev=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java Wed Apr 24 04:37:28 2013
@@ -21,14 +21,16 @@
 
 package org.apache.derby.client.am;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.sql.Blob;
 import java.sql.SQLException;
 
 import org.apache.derby.shared.common.reference.SQLState;
 
-public class Blob extends Lob implements java.sql.Blob {
+public class ClientBlob extends Lob implements Blob {
 
     //-----------------------------state------------------------------------------
 
@@ -36,12 +38,12 @@ public class Blob extends Lob implements
 
     // Only used for input purposes.  For output, each getBinaryStream call
     // must generate an independent stream.
-    java.io.InputStream binaryStream_ = null;
+    InputStream binaryStream_ = null;
     int dataOffset_;
     
     //---------------------constructors/finalizer---------------------------------
 
-    public Blob(byte[] binaryString,
+    public ClientBlob(byte[] binaryString,
                 Agent agent,
                 int dataOffset) {
         
@@ -55,8 +57,8 @@ public class Blob extends Lob implements
     }
 
     // CTOR for input:
-    public Blob(Agent agent,
-                java.io.InputStream binaryStream,
+    public ClientBlob(Agent agent,
+                InputStream binaryStream,
                 int length) {
         
         super(agent,
@@ -87,7 +89,7 @@ public class Blob extends Lob implements
      * @param agent
      * @param binaryStream the stream to get data from
      */
-    public Blob(Agent agent, java.io.InputStream binaryStream) {
+    public ClientBlob(Agent agent, InputStream binaryStream) {
         
         super(agent,
               isLayerBStreamingPossible(agent));
@@ -102,7 +104,7 @@ public class Blob extends Lob implements
      * @param agent context for this Blob object (incl. connection)
      * @param locator reference id to Blob value on server
      */
-    public Blob(Agent agent, int locator)  
+    public ClientBlob(Agent agent, int locator)
     {
         super(agent, false);
         locator_ = locator;
@@ -142,6 +144,7 @@ public class Blob extends Lob implements
      * this locator based <Blob> object.  
      * 
      * A stored procedure call will be made to get it from the server.
+     * @throws org.apache.derby.client.am.SqlException
      * @return length of Blob in bytes
      */
     long getLocatorLength() throws SqlException
@@ -230,7 +233,7 @@ public class Blob extends Lob implements
     }
 
 
-    public java.io.InputStream getBinaryStream() throws SQLException {
+    public InputStream getBinaryStream() throws SQLException {
         //call checkValidity to exit by throwing a SQLException if
         //the Blob object has been freed by calling free() on it
         checkValidity();
@@ -240,7 +243,7 @@ public class Blob extends Lob implements
                 if (agent_.loggingEnabled()) {
                     agent_.logWriter_.traceEntry(this, "getBinaryStream");
                 }
-                java.io.InputStream retVal = getBinaryStreamX();
+                InputStream retVal = getBinaryStreamX();
                 if (agent_.loggingEnabled()) {
                     agent_.logWriter_.traceExit(this, "getBinaryStream", retVal);
                 }
@@ -253,7 +256,7 @@ public class Blob extends Lob implements
         }
     }
 
-    java.io.InputStream getBinaryStreamX() throws SqlException {
+    InputStream getBinaryStreamX() throws SqlException {
         checkForClosedConnection();
 
         if (isBinaryStream())    // this Lob is used for input
@@ -267,7 +270,7 @@ public class Blob extends Lob implements
             return new UpdateSensitiveBlobLocatorInputStream
                     (agent_.connection_, this);
         } else {  // binary string
-            return new java.io.ByteArrayInputStream(binaryString_, dataOffset_,
+            return new ByteArrayInputStream(binaryString_, dataOffset_,
                                            binaryString_.length - dataOffset_);
         }
     }
@@ -314,7 +317,7 @@ public class Blob extends Lob implements
         }
     }
 
-    public long position(java.sql.Blob pattern, long start) throws SQLException {
+    public long position(Blob pattern, long start) throws SQLException {
         //call checkValidity to exit by throwing a SQLException if
         //the Blob object has been freed by calling free() on it
         checkValidity();
@@ -345,18 +348,19 @@ public class Blob extends Lob implements
         }
     }
 
-    private long positionX(java.sql.Blob pattern, long start) throws SqlException {
+    private long positionX(Blob pattern, long start) throws SqlException {
         checkForClosedConnection();
 
         try {
             if (isLocator()) {
-                if ((pattern instanceof Blob) 
-                    && ((Blob )pattern).isLocator()) {
+                if ((pattern instanceof ClientBlob)
+                    && ((ClientBlob )pattern).isLocator()) {
                     // Send locator for pattern to server
                     return agent_.connection_.locatorProcedureCall()
-                        .blobGetPositionFromLocator(locator_, 
-                                                 ((Blob )pattern).getLocator(),
-                                                 start);
+                        .blobGetPositionFromLocator(
+                            locator_,
+                            ((ClientBlob )pattern).getLocator(),
+                            start);
                 } else {
                     // Convert pattern to byte array before sending to server
                     return agent_.connection_.locatorProcedureCall()
@@ -369,7 +373,7 @@ public class Blob extends Lob implements
                                   pattern.getBytes(1L, (int )pattern.length()),
                                   start);
             }
-        } catch (java.sql.SQLException e) {
+        } catch (SQLException e) {
             throw new SqlException(e);
         }
     }
@@ -498,13 +502,13 @@ public class Blob extends Lob implements
             System.arraycopy(bytes, offset, 
                              binaryString_, (int) pos + dataOffset_ - 1, 
                              length);
-            binaryStream_ = new java.io.ByteArrayInputStream(binaryString_);
+            binaryStream_ = new ByteArrayInputStream(binaryString_);
             setSqlLength(binaryString_.length - dataOffset_);
         }
         return length;
     }
 
-    public java.io.OutputStream setBinaryStream(long pos) throws SQLException {
+    public OutputStream setBinaryStream(long pos) throws SQLException {
         //call checkValidity to exit by throwing a SQLException if
         //the Blob object has been freed by calling free() on it
         checkValidity();
@@ -574,7 +578,7 @@ public class Blob extends Lob implements
                                      newbuf, 0, (int) newLength);
                     binaryString_ = newbuf;
                     binaryStream_ 
-                        = new java.io.ByteArrayInputStream(binaryString_);
+                        = new ByteArrayInputStream(binaryString_);
                     setSqlLength(binaryString_.length - dataOffset_);
                 }
             }
@@ -669,7 +673,7 @@ public class Blob extends Lob implements
                                                        pos,
                                                        length);
                 } else {  // binary string
-                    retVal = new java.io.ByteArrayInputStream
+                    retVal = new ByteArrayInputStream
                         (binaryString_, 
                          (int)(dataOffset_ + pos - 1), 
                          (int)length);