db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1467726 [1/4] - in /db/derby/code/trunk/java/client/org/apache/derby: client/ client/am/ client/am/stmtcache/ client/net/ jdbc/
Date Sun, 14 Apr 2013 04:17:08 GMT
Author: dag
Date: Sun Apr 14 04:17:07 2013
New Revision: 1467726

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

derby-6125-imports-01-a. This "horizontal" patch makes the import
policy consistent for the client driver:

- iff a class from java.sql.* can be shadowed by a Derby class
  (i.e. Clob, ResultSet); we do not import such java.sql.* classes but
  refer to them using the full package and class name. The Derby
  classes are always imported and referenced in the short form. This
  makes the code much more readable IMHO.

- I'd like to change the names of the Derby classes that can shadow
  java.sql.* classes (so we can import such classes from java.sql.*
  too), but I need to investigate whether that can have any
  compatibility issues first. Does anyone know?

- removes unused public static variable ClientXid#MAXGTRIDSIZE

- removes a few unused initial values to silence NetBeans warnings

- removes unused Cursor#getUnicodeStream

Otherwise, the patch contains a few Javadoc improvements and typo
fixes.

Modified:
    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/ClientXid.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.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/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/CallableStatement40.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/Clob.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/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/Connection.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/DatabaseMetaData.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/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/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/LogicalStatementEntity.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/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/Statement.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/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/UpdateSensitiveLOBLocatorInputStream.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/CcsidManager.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/ConnectionReply.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/NetAgent.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/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/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/NetSqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetSqldta.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/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/ResultSetReplyInterface.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/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java

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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -20,15 +20,18 @@
 */
 package org.apache.derby.client;
 
-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 org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.client.am.Connection;
+import org.apache.derby.client.am.LogWriter;
+import org.apache.derby.client.am.LogicalConnection;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.stmtcache.JDBCStatementCache;
+import org.apache.derby.client.net.NetConnection;
 import org.apache.derby.client.net.NetLogWriter;
 import org.apache.derby.client.net.NetXAConnection;
 import org.apache.derby.iapi.error.ExceptionSeverity;
@@ -59,10 +62,9 @@ public class ClientPooledConnection impl
      */
     private int eventIterators;
 
-    org.apache.derby.client.am.Connection physicalConnection_ = null;
-    private org.apache.derby.client.net.NetConnection
-            netPhysicalConnection_ = null;
-    org.apache.derby.client.net.NetXAConnection netXAPhysicalConnection_ = null;
+    Connection physicalConnection_ = null;
+    private NetConnection netPhysicalConnection_ = null;
+    NetXAConnection netXAPhysicalConnection_ = null;
 
     /**
      * The statement cache for the underlying physical connection.
@@ -73,10 +75,9 @@ public class ClientPooledConnection impl
 
     /** The logical connection using the physical connection. */
     //@GuardedBy("this")
-    private org.apache.derby.client.am.LogicalConnection
-        logicalConnection_ = null;
+    private LogicalConnection logicalConnection_ = null;
 
-    protected org.apache.derby.client.am.LogWriter logWriter_ = null;
+    protected LogWriter logWriter_ = null;
 
     /** Resource manager identifier. */
     protected int rmId_ = 0;
@@ -95,7 +96,7 @@ public class ClientPooledConnection impl
      *      in the database, or problems communicating with the database
      */
     public ClientPooledConnection(ClientBaseDataSourceRoot ds,
-                                  org.apache.derby.client.am.LogWriter logWriter,
+                                  LogWriter logWriter,
                                   String user,
                                   String password) throws SQLException {
         logWriter_ = logWriter;
@@ -115,7 +116,7 @@ public class ClientPooledConnection impl
             //PooledConnection which will then raise the events
             //on the listeners
             
-            netPhysicalConnection_ = (org.apache.derby.client.net.NetConnection)
+            netPhysicalConnection_ = (NetConnection)
             ClientDriver.getFactory().newNetConnection(
                     (NetLogWriter) logWriter_,
                     user,
@@ -123,7 +124,7 @@ public class ClientPooledConnection impl
                     ds,
                     -1,
                     false,
-                    this);
+                    ClientPooledConnection.this);
         } catch (SqlException se) {
             throw se.getSQLException();
         }
@@ -145,7 +146,7 @@ public class ClientPooledConnection impl
      *      in the database, or problems communicating with the database
      */
     public ClientPooledConnection(ClientBaseDataSourceRoot ds,
-                                  org.apache.derby.client.am.LogWriter logWriter,
+                                  LogWriter logWriter,
                                   String user,
                                   String password,
                                   int rmId) throws SQLException {
@@ -184,11 +185,18 @@ public class ClientPooledConnection impl
         return this.statementCache != null;
     }
 
-    protected void finalize() throws java.lang.Throwable {
+    protected void finalize() throws Throwable {
         if (logWriter_ != null) {
             logWriter_.traceEntry(this, "finalize");
         }
-        close();
+
+        try {
+            close();
+        } finally {
+            // Any exception ignored if thrown from finalizer anyway, so no
+            // need to catch it.
+            super.finalize();
+        }
     }
 
     /**
@@ -441,7 +449,7 @@ public class ClientPooledConnection impl
      * @param statement The PreparedStatement that was closed
      *
      */
-    public void onStatementClose(PreparedStatement statement) {
+    public void onStatementClose(java.sql.PreparedStatement statement) {
         
     }
     
@@ -455,7 +463,7 @@ public class ClientPooledConnection impl
      * @param sqle      The SQLException associated with the error that caused
      *                  the invalidation of this PreparedStatement
      */
-    public void onStatementErrorOccurred(PreparedStatement statement,
+    public void onStatementErrorOccurred(java.sql.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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -21,11 +21,11 @@
 
 package org.apache.derby.client;
 
-import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.concurrent.CopyOnWriteArrayList;
 import javax.sql.StatementEventListener;
 import javax.sql.StatementEvent;
+import org.apache.derby.client.am.LogWriter;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
 
 /**
@@ -48,7 +48,7 @@ public class ClientPooledConnection40 ex
                     new CopyOnWriteArrayList<StatementEventListener>();
 
     public ClientPooledConnection40(ClientBaseDataSourceRoot ds,
-        org.apache.derby.client.am.LogWriter logWriter,
+        LogWriter logWriter,
         String user,
         String password) throws SQLException {
         super(ds,logWriter,user,password);
@@ -57,7 +57,7 @@ public class ClientPooledConnection40 ex
     
     
     public ClientPooledConnection40(ClientBaseDataSourceRoot ds,
-        org.apache.derby.client.am.LogWriter logWriter,
+        LogWriter logWriter,
         String user,
         String password,
         int rmId) throws SQLException {
@@ -110,7 +110,7 @@ public class ClientPooledConnection40 ex
      * @param statement The PreparedStatement that was closed
      *
      */
-    public void onStatementClose(PreparedStatement statement) {
+    public void onStatementClose(java.sql.PreparedStatement statement) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement);
             for (StatementEventListener l : statementEventListeners) {
@@ -129,7 +129,7 @@ public class ClientPooledConnection40 ex
      *                  caused the invalidation of the PreparedStatements
      *
      */
-    public void onStatementErrorOccurred(PreparedStatement statement,
+    public void onStatementErrorOccurred(java.sql.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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -20,15 +20,16 @@
 */
 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.SqlException;
 import org.apache.derby.client.net.NetLogWriter;
 import org.apache.derby.client.net.NetXAConnection;
+import org.apache.derby.client.net.NetXAResource;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
 import org.apache.derby.shared.common.reference.SQLState;
 
@@ -36,14 +37,17 @@ public class ClientXAConnection extends 
     private static int rmIdSeed_ = 95688932; // semi-random starting value for rmId
 
     private XAResource xares_ = null;
-    private org.apache.derby.client.net.NetXAResource netXares_ = null;
+    private NetXAResource netXares_ = null;
     private boolean fFirstGetConnection_ = true;
-    private Connection logicalCon_; // logicalConnection_ is inherited from ClientPooledConnection
+
+     // logicalConnection_ is inherited from ClientPooledConnection
+    private java.sql.Connection logicalCon_;
+
     // This connection is used to access the indoubt table
     private NetXAConnection controlCon_ = null;
 
     public ClientXAConnection(ClientBaseDataSourceRoot ds,
-                              org.apache.derby.client.net.NetLogWriter logWtr,
+                              NetLogWriter logWtr,
                               String userId,
                               String password) throws SQLException {
         super(ds, logWtr, userId, password, getUnigueRmId());
@@ -54,12 +58,12 @@ public class ClientXAConnection extends 
         // Note: conApp will be set after this call
         logicalCon_ = super.getConnection();
 
-        netXares_ = new org.apache.derby.client.net.NetXAResource(this,
+        netXares_ = new NetXAResource(this,
                 rmId_, userId, password, netXAPhysicalConnection_);
         xares_ = netXares_;
     }
 
-    public Connection getConnection() throws SQLException {
+    public java.sql.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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -21,11 +21,11 @@
 
 package org.apache.derby.client;
 
-import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.concurrent.CopyOnWriteArrayList;
 import javax.sql.StatementEvent;
 import javax.sql.StatementEventListener;
+import org.apache.derby.client.net.NetLogWriter;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
 
 /**
@@ -50,7 +50,7 @@ public class ClientXAConnection40 extend
      * @param password 
      */
     public ClientXAConnection40 (ClientBaseDataSourceRoot ds,
-                              org.apache.derby.client.net.NetLogWriter logWtr,
+                              NetLogWriter logWtr,
                               String userId,
                               String password) throws SQLException {
         super(ds, logWtr, userId, password);
@@ -101,7 +101,7 @@ public class ClientXAConnection40 extend
      * corresponding events occurs
      * @param statement The PreparedStatement that was closed
      */
-    public void onStatementClose(PreparedStatement statement) {
+    public void onStatementClose(java.sql.PreparedStatement statement) {
         if (!statementEventListeners.isEmpty()) {
             StatementEvent event = new StatementEvent(this,statement);
             for (StatementEventListener l : statementEventListeners) {
@@ -120,7 +120,7 @@ public class ClientXAConnection40 extend
      *                  caused the invalidation of the PreparedStatements
      *
      */
-    public void onStatementErrorOccurred(PreparedStatement statement,
+    public void onStatementErrorOccurred(java.sql.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/ClientXid.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientXid.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientXid.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientXid.java Sun Apr 14 04:17:07 2013
@@ -57,11 +57,6 @@ public class ClientXid implements Xid {
     static private final int XidDATASIZE = 128;
 
     //
-    // The maximum size of the global transaction identifier.
-    //
-    static public final int MAXGTRIDSIZE = 64;
-
-    //
     // The maximum size of the branch qualifier.
     //
     static private final int MAXBQUALSIZE = 64;

Modified: 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/Blob.java?rev=1467726&r1=1467725&r2=1467726&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/Blob.java Sun Apr 14 04:17:07 2013
@@ -142,7 +142,6 @@ 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

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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -48,7 +48,6 @@ public class BlobLocatorOutputStream ext
      *        the <code>Blob</code> value on the server.
      * @param pos the position in the <code>BLOB</code> value at which
      *        to start writing; the first position is 1
-     * @throws org.apache.derby.client.am.SqlException 
      */
     public BlobLocatorOutputStream(Connection connection, Blob blob, long pos)
         throws SqlException

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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -20,8 +20,6 @@
  */
 package org.apache.derby.client.am;
 
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
 import org.apache.derby.client.ClientPooledConnection;
@@ -75,13 +73,13 @@ public class CachingLogicalConnection
         }
     }
 
-    public synchronized PreparedStatement prepareStatement(String sql)
+    public synchronized java.sql.PreparedStatement prepareStatement(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareStatement(sql);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency)
@@ -91,7 +89,7 @@ public class CachingLogicalConnection
                     sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency,
@@ -102,7 +100,7 @@ public class CachingLogicalConnection
                 sql, resultSetType,resultSetConcurrency, resultSetHoldability);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int autoGeneratedKeys)
             throws SQLException {
@@ -110,12 +108,12 @@ public class CachingLogicalConnection
         return cacheInteractor.prepareStatement(sql, autoGeneratedKeys);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int[] columnIndexes)
             throws SQLException {
         checkForNullPhysicalConnection();
-        PreparedStatement ps = null;
+        java.sql.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
@@ -143,12 +141,12 @@ public class CachingLogicalConnection
         return ps;
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 String[] columnNames)
             throws SQLException {
         checkForNullPhysicalConnection();
-        PreparedStatement ps = null;
+        java.sql.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
@@ -176,13 +174,13 @@ public class CachingLogicalConnection
         return ps;
     }
 
-    public synchronized CallableStatement prepareCall(String sql)
+    public synchronized java.sql.CallableStatement prepareCall(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareCall(sql);
     }
 
-    public synchronized CallableStatement prepareCall(String sql,
+    public synchronized java.sql.CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency)
             throws SQLException {
@@ -191,7 +189,7 @@ public class CachingLogicalConnection
                 sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized CallableStatement prepareCall(String sql,
+    public synchronized java.sql.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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -20,8 +20,6 @@
  */
 package org.apache.derby.client.am;
 
-import java.sql.PreparedStatement;
-import java.sql.CallableStatement;
 import java.sql.SQLException;
 
 import org.apache.derby.client.ClientPooledConnection;
@@ -70,13 +68,13 @@ public class CachingLogicalConnection40
         }
     }
 
-    public synchronized PreparedStatement prepareStatement(String sql)
+    public synchronized java.sql.PreparedStatement prepareStatement(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareStatement(sql);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency)
@@ -86,7 +84,7 @@ public class CachingLogicalConnection40
                     sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int resultSetType,
                                                 int resultSetConcurrency,
@@ -97,7 +95,7 @@ public class CachingLogicalConnection40
                 sql, resultSetType,resultSetConcurrency, resultSetHoldability);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int autoGeneratedKeys)
             throws SQLException {
@@ -105,12 +103,12 @@ public class CachingLogicalConnection40
         return cacheInteractor.prepareStatement(sql, autoGeneratedKeys);
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 int[] columnIndexes)
             throws SQLException {
         checkForNullPhysicalConnection();
-        PreparedStatement ps = null;
+        java.sql.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
@@ -138,12 +136,12 @@ public class CachingLogicalConnection40
         return ps;
     }
 
-    public synchronized PreparedStatement prepareStatement(
+    public synchronized java.sql.PreparedStatement prepareStatement(
                                                 String sql,
                                                 String[] columnNames)
             throws SQLException {
         checkForNullPhysicalConnection();
-        PreparedStatement ps = null;
+        java.sql.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
@@ -171,13 +169,13 @@ public class CachingLogicalConnection40
         return ps;
     }
 
-    public synchronized CallableStatement prepareCall(String sql)
+    public synchronized java.sql.CallableStatement prepareCall(String sql)
             throws SQLException {
         checkForNullPhysicalConnection();
         return cacheInteractor.prepareCall(sql);
     }
 
-    public synchronized CallableStatement prepareCall(String sql,
+    public synchronized java.sql.CallableStatement prepareCall(String sql,
                                                       int resultSetType,
                                                       int resultSetConcurrency)
             throws SQLException {
@@ -186,7 +184,7 @@ public class CachingLogicalConnection40
                 sql, resultSetType, resultSetConcurrency);
     }
 
-    public synchronized CallableStatement prepareCall(String sql,
+    public synchronized java.sql.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=1467726&r1=1467725&r2=1467726&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 Sun Apr 14 04:17:07 2013
@@ -99,7 +99,6 @@ class CallableLocatorProcedures 
      * subsequent operations on this BLOB value will be stored in temporary
      * space on the server.
      *
-     * @throws org.apache.derby.client.am.SqlException
      * @return locator that identifies the created BLOB.
      */
     int blobCreateLocator() throws SqlException
@@ -161,7 +160,6 @@ class CallableLocatorProcedures 
      * This method frees the BLOB and releases the resources that it
      * holds. (E.g., temporary space used to store this BLOB on the server.)
      * @param locator locator that designates the BLOB to be released.
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void blobReleaseLocator(int locator) throws SqlException
     {
@@ -195,7 +193,6 @@ class CallableLocatorProcedures 
      *        search
      * @param fromPosition the position in the BLOB value
      *        at which to begin searching; the first position is 1
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern begins, else -1
      */
     long blobGetPositionFromLocator(int locator, 
@@ -242,7 +239,6 @@ class CallableLocatorProcedures 
      * @param searchLiteral the byte array for which to search
      * @param fromPosition the position at which to begin searching; the
      *        first position is 1
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern appears, else -1
      */
     long blobGetPositionFromBytes(int locator, 
@@ -321,7 +317,6 @@ class CallableLocatorProcedures 
      *        for. It is assumed that this length is smaller than the maximum
      *        size of a VARCHAR FOR BIT DATA column.  Otherwise, an exception
      *        will be thrown.
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern appears, else -1
      */
     private long blobGetPositionFromBytes(int locator,
@@ -370,7 +365,6 @@ class CallableLocatorProcedures 
      * designated by this <code>sourceLocator</code>.
      * 
      * @param sourceLocator locator that identifies the BLOB
-     * @throws org.apache.derby.client.am.SqlException 
      * @return length of the <code>BLOB</code> in bytes 
      */
     long blobGetLength(int sourceLocator) throws SqlException
@@ -414,7 +408,6 @@ class CallableLocatorProcedures 
      *        for length must be 0 or greater.  Specifying a length that goes
      *        beyond the end of the BLOB (i.e., <code>fromPosition + forLength
      *        > blob.length()</code>), will result in an error.
-     * @throws org.apache.derby.client.am.SqlException 
      * @return a byte array containing up to <code>forLength</code> consecutive
      *         bytes from the <code>BLOB</code> value designated by
      *         <code>sourceLocator</code>, starting with the byte at position
@@ -492,7 +485,6 @@ class CallableLocatorProcedures 
      *        of the BLOB (i.e., <code>fromPosition + forLength >
      *        blob.length()</code>, will result in an error.
      * @param bytes the array of bytes to be written
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void blobSetBytes(int sourceLocator, 
                       long fromPosition, 
@@ -551,7 +543,6 @@ class CallableLocatorProcedures 
      * @param sourceLocator locator identifying the Blob to be truncated
      * @param length the length, in bytes, to which the <code>BLOB</code> value
      *        should be truncated
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void blobTruncate(int sourceLocator, long length) throws SqlException
     {
@@ -580,7 +571,6 @@ class CallableLocatorProcedures 
      * subsequent operations on this CLOB value will be stored in temporary
      * space on the server.
      * 
-     * @throws org.apache.derby.client.am.SqlException 
      * @return locator that identifies the created CLOB.
      */
     int clobCreateLocator() throws SqlException
@@ -642,7 +632,6 @@ class CallableLocatorProcedures 
      * This method frees the CLOB and releases the resources that it
      * holds. (E.g., temporary space used to store this CLOB on the server.)
      * @param locator locator that designates the CLOB to be released.
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void clobReleaseLocator(int locator) throws SqlException
     {
@@ -681,7 +670,6 @@ class CallableLocatorProcedures 
      * @param searchLiteral the substring for which to search
      * @param fromPosition the position at which to begin searching; the
      *        first position is 1
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern appears, else -1
      */
     long clobGetPositionFromString(int locator, 
@@ -757,7 +745,6 @@ class CallableLocatorProcedures 
      *        for. It is assumed that this length is smaller than the maximum
      *        size of a VARCHAR column.  Otherwise, an exception will be
      *        thrown.
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern appears, else -1
      */
     private long clobGetPositionFromString(int locator, 
@@ -809,7 +796,6 @@ class CallableLocatorProcedures 
      *        search
      * @param fromPosition the position in the CLOB value
      *        at which to begin searching; the first position is 1
-     * @throws org.apache.derby.client.am.SqlException 
      * @return the position at which the pattern begins, else -1
      */
     long clobGetPositionFromLocator(int locator, 
@@ -846,7 +832,6 @@ class CallableLocatorProcedures 
      * designated by this <code>sourceLocator</code>.
      * 
      * @param sourceLocator locator that identifies the CLOB
-     * @throws org.apache.derby.client.am.SqlException 
      * @return length of the <code>CLOB</code> in characters 
      */
     long clobGetLength(int sourceLocator) throws SqlException
@@ -890,7 +875,6 @@ class CallableLocatorProcedures 
      *        value for length must be 0 or greater.  Specifying a length that
      *        goes beyond the end of the CLOB (i.e., <code>fromPosition +
      *        forLength > clob.length()</code>, will result in an error.
-     * @throws org.apache.derby.client.am.SqlException 
      * @return a string containing up to <code>forLength</code> consecutive
      *         characters from the <code>CLOB</code> value designated by
      *         <code>sourceLocator</code>, starting with the character at
@@ -971,7 +955,6 @@ class CallableLocatorProcedures 
      *        <code>fromPosition + forLength > clob.length()</code>, will
      *        result in an error.
      * @param string the string to be written
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void clobSetString(int sourceLocator, 
                        long fromPosition, 
@@ -1026,7 +1009,6 @@ class CallableLocatorProcedures 
      * @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
-     * @throws org.apache.derby.client.am.SqlException 
      */
     void clobTruncate(int sourceLocator, long length) throws SqlException
     {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java Sun Apr 14 04:17:07 2013
@@ -24,8 +24,6 @@ package org.apache.derby.client.am;
 import java.io.InputStream;
 import java.io.Reader;
 import java.math.BigDecimal;
-import java.sql.Blob;
-import java.sql.Clob;
 import java.sql.Date;
 import java.sql.NClob;
 import java.sql.RowId;
@@ -37,7 +35,7 @@ import org.apache.derby.client.ClientPoo
 import org.apache.derby.shared.common.reference.SQLState;
 
 
-public class CallableStatement40 extends org.apache.derby.client.am.CallableStatement {       
+public class CallableStatement40 extends CallableStatement {
     
     /**
      * Calls the superclass constructor and passes the parameters
@@ -102,12 +100,12 @@ public class CallableStatement40 extends
         throw SQLExceptionFactory.notImplemented ("setRowId (String, RowId)");
     }
     
-    public void setBlob(String parameterName, Blob x)
+    public void setBlob(String parameterName, java.sql.Blob x)
         throws SQLException {
         throw SQLExceptionFactory.notImplemented("setBlob(String, Blob)");
     }
     
-    public void setClob(String parameterName, Clob x)
+    public void setClob(String parameterName, java.sql.Clob x)
         throws SQLException {
         throw SQLExceptionFactory.notImplemented("setClob(String, Clob)");
     }
@@ -308,10 +306,20 @@ public class CallableStatement40 extends
         else if ( Date.class.equals( type ) ) { retval = getDate( parameterIndex ); }
         else if ( Time.class.equals( type ) ) { retval = getTime( parameterIndex ); }
         else if ( Timestamp.class.equals( type ) ) { retval = getTimestamp( parameterIndex ); }
-        else if ( Blob.class.equals( type ) ) { retval = getBlob( parameterIndex ); }
-        else if ( Clob.class.equals( type ) ) { retval = getClob( parameterIndex ); }
-        else if ( type.isArray() && type.getComponentType().equals( byte.class ) ) { retval = getBytes( parameterIndex ); }
-        else { retval = getObject( parameterIndex ); }
+
+        else if ( java.sql.Blob.class.equals( type ) ) {
+            retval = getBlob( parameterIndex );
+
+        } else if ( java.sql.Clob.class.equals( type ) ) {
+            retval = getClob( parameterIndex );
+
+        } else if ( type.isArray() &&
+                    type.getComponentType().equals( byte.class ) ) {
+            retval = getBytes( parameterIndex );
+
+        } else {
+            retval = getObject( parameterIndex );
+        }
 
         if ( wasNull() ) { retval = null; }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java Sun Apr 14 04:17:07 2013
@@ -21,9 +21,9 @@
 
 package org.apache.derby.client.am;
 
+import java.sql.SQLException;
 import org.apache.derby.client.ClientPooledConnection;
 import org.apache.derby.client.ClientXAConnection;
-import java.sql.SQLException;
 import org.apache.derby.client.am.stmtcache.JDBCStatementCache;
 import org.apache.derby.client.am.stmtcache.StatementKey;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
@@ -39,9 +39,10 @@ import org.apache.derby.jdbc.ClientBaseD
 public interface ClientJDBCObjectFactory {
     
     /**
-     * This method is used to return an instance of
-     * ClientPooledConnection (or ClientPooledConnection40) class which
-     * implements javax.sql.PooledConnection
+     * This method is used to return an instance of {@link
+     * org.apache.derby.client.ClientPooledConnection} (or {@link
+     * org.apache.derby.client.ClientPooledConnection40}) class which
+     * implements {@code javax.sql.PooledConnection}.
      */
     ClientPooledConnection newClientPooledConnection(
             ClientBaseDataSourceRoot ds,
@@ -52,7 +53,7 @@ public interface ClientJDBCObjectFactory
     /**
      * This method is used to return an instance of
      * ClientPooledConnection(or ClientPooledConnection40) class which
-     * implements javax.sql.PooledConnection
+     * implements {@code javax.sql.PooledConnection}.
      */
     ClientPooledConnection newClientPooledConnection(
             ClientBaseDataSourceRoot ds,
@@ -64,15 +65,15 @@ public interface ClientJDBCObjectFactory
     /**
      * This method is used to return an instance of
      * ClientXAConnection (or ClientXAConnection40) class which
-     * implements javax.sql.XAConnection
+     * implements {@code javax.sql.XAConnection}.
      */
     ClientXAConnection newClientXAConnection(ClientBaseDataSourceRoot ds,
             LogWriter logWriter,String user,String password)
             throws SQLException;
     
     /**
-     * Returns an instance of org.apache.derby.client.am.CallableStatement.
-     * or CallableStatement40 which implements java.sql.CallableStatement
+     * Returns an instance of CallableStatement or
+     * CallableStatement40 which implements {@code java.sql.CallableStatement}
      *
      * @param agent       The instance of NetAgent associated with this
      *                    CallableStatement object.
@@ -90,17 +91,17 @@ public interface ClientJDBCObjectFactory
      * @throws SqlException
      */
     CallableStatement newCallableStatement(Agent agent,
-            org.apache.derby.client.am.Connection connection, String sql,
+            Connection connection, String sql,
             int type,int concurrency,int holdability,
             ClientPooledConnection cpc) throws SqlException;
     
     /**
      * Returns an instance of LogicalConnection.
      * This method returns an instance of LogicalConnection
-     * (or LogicalConnection40) which implements java.sql.Connection.
+     * (or LogicalConnection40) which implements {@code java.sql.Connection}.
      */
     LogicalConnection newLogicalConnection(
-                    org.apache.derby.client.am.Connection physicalConnection,
+                    Connection physicalConnection,
                     ClientPooledConnection pooledConnection)
         throws SqlException;
     
@@ -116,14 +117,15 @@ public interface ClientJDBCObjectFactory
     * @throws SqlException if creation of the logical connection fails
     */
     public LogicalConnection newCachingLogicalConnection(
-            org.apache.derby.client.am.Connection physicalConnection,
+            Connection physicalConnection,
             ClientPooledConnection pooledConnection,
             JDBCStatementCache stmtCache) throws SqlException;
 
     /**
      * This method returns an instance of PreparedStatement
-     * (or PreparedStatement40) which implements java.sql.PreparedStatement
-     * It has the ClientPooledConnection as one of its parameters 
+     * (or PreparedStatement40) which implements
+     * {@code java.sql.PreparedStatement}.
+     * It has the {@link ClientPooledConnection} as one of its parameters
      * this is used to raise the Statement Events when the prepared
      * statement is closed
      *
@@ -143,13 +145,15 @@ public interface ClientJDBCObjectFactory
      * @throws SqlException
      */
     PreparedStatement newPreparedStatement(Agent agent,
-            org.apache.derby.client.am.Connection connection,
+            Connection connection,
             String sql,Section section,ClientPooledConnection cpc) 
             throws SqlException;
     
     /**
-     * Returns an instance of PreparedStatement
-     * (or PreparedStatement40) which implements java.sql.PreparedStatement
+     * Returns an instance of PreparedStatement (or
+     * PreparedStatement40) which implements {@code
+     * java.sql.PreparedStatement}.
+
      * It has the ClientPooledConnection as one of its parameters 
      * this is used to raise the Statement Events when the prepared
      * statement is closed
@@ -178,7 +182,7 @@ public interface ClientJDBCObjectFactory
      * @throws SqlException
      */
     PreparedStatement newPreparedStatement(Agent agent,
-            org.apache.derby.client.am.Connection connection,String sql,
+            Connection connection,String sql,
             int type,int concurrency,int holdability,int autoGeneratedKeys,
             String [] columnNames, int[] columnIndexes, ClientPooledConnection cpc) 
             throws SqlException;
@@ -211,23 +215,23 @@ public interface ClientJDBCObjectFactory
             StatementCacheInteractor cacheInteractor);
 
     /**
-     * This method returns an instance of NetConnection (or NetConnection40) class
-     * which extends from org.apache.derby.client.am.Connection
-     * this implements the java.sql.Connection interface
+     * This method returns an instance of NetConnection (or
+     * NetConnection40) class which extends from Connection.  This
+     * implements the {@code java.sql.Connection} interface.
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
             String databaseName,java.util.Properties properties)
             throws SqlException;
     
     /**
      * This method returns an instance of NetConnection (or NetConnection40) class
-     * which extends from org.apache.derby.client.am.Connection
-     * this implements the java.sql.Connection interface
+     * which extends from Connection
+     * this implements the {@code java.sql.Connection} interface
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot clientDataSource,
+            ClientBaseDataSourceRoot clientDataSource,
             String user,
             String password) throws SqlException;
     
@@ -236,42 +240,42 @@ public interface ClientJDBCObjectFactory
      * class which extends from org.apache.derby.client.am.Connection
      * this implements the java.sql.Connection interface
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
             int driverManagerLoginTimeout,String serverName,
             int portNumber,String databaseName,java.util.Properties properties)
             throws SqlException;
     
     /**
-     * This method returns an instance of NetConnection (or NetConnection40)
-     * class which extends from org.apache.derby.client.am.Connection
-     * this implements the java.sql.Connection interface
+     * This method returns an instance of NetConnection (or
+     * NetConnection40) class which extends from Connection.  This
+     * implements the {@code java.sql.Connection} interface.
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
             String user,
             String password,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource,
+            ClientBaseDataSourceRoot dataSource,
             int rmId,
             boolean isXAConn) throws SqlException;
     
     /**
-     * This methos returns an instance of NetConnection
+     * This method returns an instance of NetConnection
      * (or NetConnection40) class which extends from
-     * org.apache.derby.client.am.Connection this implements the
-     * java.sql.Connection interface
+     * Connection this implements the
+     * {@code java.sql.Connection interface}.
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
             String ipaddr,
             int portNumber,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource,
+            ClientBaseDataSourceRoot dataSource,
             boolean isXAConn) throws SqlException;
     
     /**
      * This method returns an instance of NetConnection (or NetConnection40)
-     * class which extends from org.apache.derby.client.am.Connection
-     * this implements the java.sql.Connection interface
+     * class which extends Connection.
+     * This implements the {@code java.sql.Connection} interface.
      * This method is used to pass the ClientPooledConnection
      * object to the NetConnection object which can then be used to pass the 
      * statement events back to the user
@@ -289,16 +293,16 @@ public interface ClientJDBCObjectFactory
      *                     object
      * @throws             SqlException
      */
-    org.apache.derby.client.am.Connection newNetConnection(
+    Connection newNetConnection(
             LogWriter netLogWriter,
             String user,String password,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource,int rmId,
+            ClientBaseDataSourceRoot dataSource,int rmId,
             boolean isXAConn,ClientPooledConnection cpc) throws SqlException;
     
     /**
-     * This method returns an instance of NetResultSet(or NetResultSet40)
-     * which extends from org.apache.derby.client.am.ResultSet
-     * which implements java.sql.ResultSet
+     * This method returns an instance of NetResultSet(or
+     * NetResultSet40) which extends from ResultSet which implements
+     * {@code java.sql.ResultSet}.
      */
     ResultSet newNetResultSet(Agent netAgent,MaterialStatement netStatement,
             Cursor cursor,
@@ -308,25 +312,24 @@ public interface ClientJDBCObjectFactory
             throws SqlException;
     
     /**
-     * This method provides an instance of NetDatabaseMetaData
-     * (or NetDatabaseMetaData40) which extends from
-     * org.apache.derby.client.am.DatabaseMetaData which implements
-     * java.sql.DatabaseMetaData
+     * This method provides an instance of NetDatabaseMetaData (or
+     * NetDatabaseMetaData40) which extends from DatabaseMetaData
+     * which implements {@code java.sql.DatabaseMetaData}.
      */
     DatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
-            org.apache.derby.client.am.Connection netConnection);
+            Connection netConnection);
     
     /**
      * This method provides an instance of Statement or Statement40 
      * depending on the jdk version under use
      * @param  agent      Agent
      * @param  connection Connection
-     * @return a java.sql.Statement implementation 
+     * @return a {@code java.sql.Statement} implementation
      * @throws SqlException
      *
      */
      Statement newStatement(Agent agent, 
-             org.apache.derby.client.am.Connection connection) 
+             Connection connection)
              throws SqlException;
      
      /**
@@ -340,12 +343,12 @@ public interface ClientJDBCObjectFactory
      * @param autoGeneratedKeys int
      * @param columnNames       String[]
      * @param columnIndexes     int[]
-     * @return a java.sql.Statement implementation 
+     * @return a {@code java.sql.Statement} implementation
      * @throws SqlException
      *
      */
      Statement newStatement(Agent agent, 
-                     org.apache.derby.client.am.Connection connection, int type, 
+                     Connection connection, int type,
                      int concurrency, int holdability,
                      int autoGeneratedKeys, String[] columnNames,
                      int[] columnIndexes) 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java Sun Apr 14 04:17:07 2013
@@ -1063,7 +1063,6 @@ public class Clob extends Lob implements
      * this locator based <code>Clob</code> object.
      *
      * A stored procedure call will be made to get it from the server.
-     * @throws org.apache.derby.client.am.SqlException
      * @return length of <code>Clob</code> in bytes
      */
     long getLocatorLength() throws SqlException

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java Sun Apr 14 04:17:07 2013
@@ -64,7 +64,6 @@ public class ClobLocatorOutputStream ext
      *        the <code>Clob</code> value on the server.
      * @param pos the position in the <code>CLOB</code> value at which
      *        to start writing; the first position is 1
-     * @throws org.apache.derby.client.am.SqlException
      */
     public ClobLocatorOutputStream(Connection connection, Clob clob, long pos)
     throws SqlException {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java Sun Apr 14 04:17:07 2013
@@ -24,12 +24,12 @@ package org.apache.derby.client.am;
 import java.io.IOException;
 
 /**
- * An <code>Writer</code> that will use an locator to write the
+ * An {@code Writer} that will use an locator to write the
  * Clob value into the server.
  * <p>
- * This <code>Writer</code> implementation is pretty basic.  No
- * buffering of data is done.  Hence, for efficiency #write(char[])
- * should be used instead of #write(int).
+ * This {@code Writer} implementation is pretty basic.  No
+ * buffering of data is done.  Hence, for efficiency {@code #write(char[])}
+ * should be used instead of {@code #write(int)}.
  */
 class ClobLocatorWriter extends java.io.Writer {
     /**
@@ -56,16 +56,15 @@ class ClobLocatorWriter extends java.io.
     private boolean isClosed = false;
     
     /**
-     * Create a <code>Writer</code> for writing to the
-     * <code>Clob</code> value represented by the given locator based
-     * <code>Clob</code> object.
+     * Create a {@code Writer} for writing to the
+     * {@code Clob} value represented by the given locator based
+     * {@code Clob} object.
      * @param connection connection to be used to write to the
-     *        <code>Clob</code> value on the server
-     * @param clob <code>Clob</code> object that contains locator for
-     *        the <code>Clob</code> value on the server.
-     * @param pos the position in the <code>CLOB</code> value at which
+     *        {@code Clob} value on the server
+     * @param clob {@code Clob} object that contains locator for
+     *        the {@code Clob} value on the server.
+     * @param pos the position in the {@code CLOB} value at which
      *        to start writing; the first position is 1
-     * @throws org.apache.derby.client.am.SqlException
      */
     ClobLocatorWriter(Connection connection, Clob clob, long pos)
     throws SqlException {
@@ -89,8 +88,8 @@ class ClobLocatorWriter extends java.io.
     }
     
     /**
-     * Check to see if this <code>Writer</code> is closed. If it
-     * is closed throw an <code>IOException</code> that states that
+     * Check to see if this {@code Writer} is closed. If it
+     * is closed throw an {@code IOException} that states that
      * the stream is closed.
      *
      * @throws IOException if isClosed = true.
@@ -152,7 +151,7 @@ class ClobLocatorWriter extends java.io.
     }
     
     /**
-     * Write the <code>char[]</code> to the <code>Clob</code> value on
+     * Write the {@code char[]} to the {@code Clob} value on
      * the server; starting from the current position of this stream.
      *
      * @param c The character array containing the chars to be written

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobOutputStream.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobOutputStream.java Sun Apr 14 04:17:07 2013
@@ -21,9 +21,11 @@
 
 package org.apache.derby.client.am;
 
+import java.io.IOException;
+import java.io.OutputStream;
 
 
-class ClobOutputStream extends java.io.OutputStream {
+class ClobOutputStream extends OutputStream {
     private Clob clob_;
     private long offset_;
 
@@ -41,14 +43,13 @@ class ClobOutputStream extends java.io.O
         }
     }
 
-    public void write(int b) throws java.io.IOException {
+    public void write(int b) throws IOException {
         byte[] newByte = new byte[1];
         newByte[0] = (byte)b;
         writeBytes(newByte);
     }
 
-
-    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) ||
@@ -64,7 +65,7 @@ class ClobOutputStream extends java.io.O
     }
 
 
-    private void writeBytes(byte b[])  throws java.io.IOException
+    private void writeBytes(byte b[])  throws IOException
     {
         // Since this is an OutputStream returned by Clob.setAsciiStream 
         // use Ascii encoding when creating the String from bytes

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java Sun Apr 14 04:17:07 2013
@@ -21,10 +21,10 @@
 
 package org.apache.derby.client.am;
 
+import java.io.Writer;
 import org.apache.derby.shared.common.reference.SQLState;
 
-
-class ClobWriter extends java.io.Writer {
+class ClobWriter extends Writer {
     private final Clob clob_;
     private long offset_;
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java Sun Apr 14 04:17:07 2013
@@ -790,7 +790,7 @@ public class ColumnMetaData implements j
 
     public boolean hasLobColumns() {
         for (int i = 0; i < columns_; i++) {
-            switch (org.apache.derby.client.am.Utils.getNonNullableSqlType(sqlType_[i])) {
+            switch (Utils.getNonNullableSqlType(sqlType_[i])) {
             case DRDAConstants.DB2_SQLTYPE_BLOB:
             case DRDAConstants.DB2_SQLTYPE_CLOB:
                 return true;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?rev=1467726&r1=1467725&r2=1467726&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Sun Apr 14 04:17:07 2013
@@ -27,6 +27,7 @@ import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 import java.util.WeakHashMap;
 import org.apache.derby.client.net.NetXAResource;
@@ -173,7 +174,7 @@ public abstract class Connection
     public int xaHostVersion_ = 0;
 
     public int loginTimeout_;
-    public org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource_;
+    public ClientBaseDataSourceRoot dataSource_;
     public String serverNameIP_;
     public int portNumber_;
     public int clientSSLMode_ = ClientBaseDataSourceRoot.SSL_OFF;
@@ -190,10 +191,10 @@ public abstract class Connection
 
     // For jdbc 2 connections
     protected Connection(
-            org.apache.derby.client.am.LogWriter logWriter,
+            LogWriter logWriter,
             String user,
             String password,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource)
+            ClientBaseDataSourceRoot dataSource)
             throws SqlException {
 
         this.user_ = user;
@@ -201,12 +202,11 @@ public abstract class Connection
     }
 
     protected Connection(
-            org.apache.derby.client.am.LogWriter logWriter,
+            LogWriter logWriter,
             String user,
             String password,
             boolean isXAConn,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource)
-            throws SqlException {
+            ClientBaseDataSourceRoot dataSource) throws SqlException {
 
         this.user_ = user;
         isXAConnection_ = isXAConn;
@@ -266,10 +266,9 @@ public abstract class Connection
 
     // For jdbc 2 connections
     protected Connection(
-            org.apache.derby.client.am.LogWriter logWriter,
+            LogWriter logWriter,
             boolean isXAConn,
-            org.apache.derby.jdbc.ClientBaseDataSourceRoot dataSource)
-            throws SqlException {
+            ClientBaseDataSourceRoot dataSource) throws SqlException {
 
         if (logWriter != null) {
             logWriter.traceConnectEntry(dataSource);
@@ -326,7 +325,7 @@ public abstract class Connection
                          String serverName,
                          int portNumber,
                          String databaseName,
-                         java.util.Properties properties) throws SqlException {
+                         Properties properties) throws SqlException {
         if (logWriter != null) {
             logWriter.traceConnectEntry(serverName, portNumber, databaseName, properties);
         }
@@ -358,7 +357,7 @@ public abstract class Connection
     // and this will give the driver a chance to close (or otherwise clean up) the objects.
     // Note, however, that there is no guarantee that the garbage collector will ever run.
     // If that is the case, the finalizers will not be called.
-    protected void finalize() throws java.lang.Throwable {
+    protected void finalize() throws Throwable {
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceEntry(this, "finalize");
         }
@@ -509,7 +508,8 @@ public abstract class Connection
 
     // Driver-specific determination if local COMMIT/ROLLBACK is allowed;
     // primary usage is distinction between local and global trans. envs.;
-    protected abstract boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException;
+    protected abstract boolean allowLocalCommitRollback_()
+            throws SqlException;
 
     synchronized public void setAutoCommit(boolean autoCommit) throws SQLException {
         try
@@ -623,7 +623,7 @@ public abstract class Connection
         return false;
     }
 
-    public boolean willAutoCommitGenerateFlow() throws org.apache.derby.client.am.SqlException {
+    public boolean willAutoCommitGenerateFlow() throws SqlException {
         if (!autoCommit_) {
             return false;
         }
@@ -1657,7 +1657,8 @@ public abstract class Connection
                     throw new SqlException(agent_.logWriter_,
                             new ClientMessageId (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
                 }
-            } catch (java.lang.ClassCastException e) { // savepoint is not an instance of am.Savepoint
+            } catch (java.lang.ClassCastException e) {
+                // savepoint is not an instance of am.Savepoint
                 throw new SqlException(agent_.logWriter_,
                         new ClientMessageId (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
             }
@@ -1718,10 +1719,12 @@ public abstract class Connection
                     throw new SqlException(agent_.logWriter_, new ClientMessageId 
                             (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
                 }
-            } catch (java.lang.ClassCastException e) { // savepoint is not an instance of am.Savepoint
-                    throw new SqlException(agent_.logWriter_, new ClientMessageId 
-                            (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
-
+            } catch (ClassCastException e) {
+                // savepoint is not an instance of am.Savepoint
+                throw new SqlException(
+                    agent_.logWriter_,
+                    new ClientMessageId
+                    (SQLState.SAVEPOINT_NOT_CREATED_BY_CONNECTION));
             }
 
             // Construct and flow a savepoint release statement to server.
@@ -2435,9 +2438,6 @@ public abstract class Connection
         //stored procedure CLOBCREATELOCATOR.
         int locator = INVALID_LOCATOR;
 
-        //Stores the Clob instance that is returned.
-        org.apache.derby.client.am.Clob clob = null;
-
         //Call the CLOBCREATELOCATOR stored procedure
         //that will return a locator value.
         try {
@@ -2453,14 +2453,17 @@ public abstract class Connection
         //The code here has been disabled because the Lob implementations
         //have still not been completely converted to use locators. Once
         //the Lob implementations are completed then this code can be enabled.
+
+        //Stores the Clob instance that is returned.
+        Clob clob;
+
         if (locator != INVALID_LOCATOR) {
             //A valid locator value has been obtained.
-            clob = new org.apache.derby.client.am.Clob(this.agent_, locator);
+            clob = new Clob(this.agent_, locator);
         }
         else {
             //A valid locator value could not be obtained.
-            clob = new org.apache.derby.client.am.Clob
-                    (this.agent_, "");
+            clob = new Clob(this.agent_, "");
         }
 
         if (agent_.loggingEnabled()) {
@@ -2495,9 +2498,6 @@ public abstract class Connection
         //stored procedure BLOBCREATELOCATOR.
         int locator = INVALID_LOCATOR;
         
-        //Stores the Blob instance that is returned.
-        org.apache.derby.client.am.Blob blob = null;
-
         //Call the BLOBCREATELOCATOR stored procedure
         //that will return a locator value.
         try {
@@ -2510,14 +2510,16 @@ public abstract class Connection
         //If the locator value is -1 it means that we do not
         //have locator support on the server.
         
+        //Stores the Blob instance that is returned.
+        Blob blob;
+
         if (locator != INVALID_LOCATOR) {
             //A valid locator value has been obtained.
-            blob = new org.apache.derby.client.am.Blob(this.agent_, locator);
+            blob = new Blob(this.agent_, locator);
         } 
         else {
             //A valid locator value could not be obtained.
-            blob = new org.apache.derby.client.am.Blob
-                    (new byte[0],this.agent_, 0);
+            blob = new Blob(new byte[0],this.agent_, 0);
         }
         
         if (agent_.loggingEnabled()) {



Mime
View raw message