db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1471245 [11/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/a...
Date Wed, 24 Apr 2013 04:37:31 GMT
Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/UnitOfWorkListener.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/UnitOfWorkListener.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/UnitOfWorkListener.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/UnitOfWorkListener.java Wed Apr 24 04:37:28 2013
@@ -21,10 +21,12 @@
 
 package org.apache.derby.client.am;
 
+import java.util.Iterator;
+
 public interface UnitOfWorkListener {
     public void listenToUnitOfWork();
 
-    public void completeLocalCommit(java.util.Iterator listenerIterator);
+    public void completeLocalCommit(Iterator listenerIterator);
 
-    public void completeLocalRollback(java.util.Iterator listenerIterator);
+    public void completeLocalRollback(Iterator listenerIterator);
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveBlobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveBlobLocatorInputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveBlobLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveBlobLocatorInputStream.java Wed Apr 24 04:37:28 2013
@@ -34,7 +34,7 @@ class UpdateSensitiveBlobLocatorInputStr
         extends UpdateSensitiveLOBLocatorInputStream {
     //Stores the Blob instance associated with
     //this InputStream.
-    private Blob blob = null;
+    private ClientBlob blob = null;
     
     /**
      * Creates an instance of the BlobLocatorInputStream
@@ -49,8 +49,10 @@ class UpdateSensitiveBlobLocatorInputStr
      * @throws SqlException If any exception occurs during stream
      *                      creation.
      */
-    UpdateSensitiveBlobLocatorInputStream(Connection con, Blob blob)
-    throws SqlException {
+    UpdateSensitiveBlobLocatorInputStream(
+            ClientConnection con,
+            ClientBlob blob) throws SqlException {
+
         super(con, blob, new BlobLocatorInputStream(con, blob));
         this.blob = blob;
     }
@@ -70,8 +72,12 @@ class UpdateSensitiveBlobLocatorInputStr
      * @throws SqlException If any exception occurs during stream
      *                      creation.
      */
-    UpdateSensitiveBlobLocatorInputStream(Connection con, Blob blob,
-            long position, long length) throws SqlException {
+    UpdateSensitiveBlobLocatorInputStream(
+            ClientConnection con,
+            ClientBlob blob,
+            long position,
+            long length) throws SqlException {
+
         super(con, blob, 
                 new BlobLocatorInputStream(con, blob, position, length), 
                 position, length);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorInputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorInputStream.java Wed Apr 24 04:37:28 2013
@@ -35,7 +35,7 @@ class UpdateSensitiveClobLocatorInputStr
         extends UpdateSensitiveLOBLocatorInputStream {
     //Stores the Clob instance associated with
     //this InputStream.
-    private Clob clob = null;
+    private ClientClob clob = null;
     
     /**
      * Creates an instance of the ClobLocatorInputStream
@@ -50,8 +50,10 @@ class UpdateSensitiveClobLocatorInputStr
      * @throws SqlException If any exception occurs during stream
      *                      creation.
      */
-    UpdateSensitiveClobLocatorInputStream(Connection con, Clob clob)
-    throws SqlException {
+    UpdateSensitiveClobLocatorInputStream(
+            ClientConnection con,
+            ClientClob clob) throws SqlException {
+
         super(con, clob, new BufferedInputStream
                 (new ClobLocatorInputStream(con, clob)));
         this.clob = clob;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java Wed Apr 24 04:37:28 2013
@@ -39,11 +39,11 @@ public class UpdateSensitiveClobLocatorR
     
     //The connection object from which
     //this Clob is obtained.
-    private Connection con = null;
+    private ClientConnection con = null;
     
     //Stores the Clob instance
     //this class refers to.
-    private Clob clob = null;
+    private ClientClob clob = null;
     
     //stores the current value of
     //the updateCount in the Clob.
@@ -67,8 +67,10 @@ public class UpdateSensitiveClobLocatorR
      * @param clob the <code>Clob</code> object associated with
      *            this stream.
      */
-    protected UpdateSensitiveClobLocatorReader(Connection con, Clob clob) 
-    throws SqlException {
+    protected UpdateSensitiveClobLocatorReader(
+            ClientConnection con,
+            ClientClob clob) throws SqlException {
+
         //check if the locator associated with the
         //underlying Clob is valid.
         clob.checkForLocatorValidity();
@@ -103,8 +105,12 @@ public class UpdateSensitiveClobLocatorR
      *            retrieved.
      *
      */
-    protected UpdateSensitiveClobLocatorReader(Connection con, Clob clob, 
-            long pos, long len) throws SqlException {
+    protected UpdateSensitiveClobLocatorReader(
+            ClientConnection con,
+            ClientClob clob,
+            long pos,
+            long len) throws SqlException {
+
         //check if the locator associated with the
         //underlying Clob is valid.
         clob.checkForLocatorValidity();

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveLOBLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveLOBLocatorInputStream.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveLOBLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveLOBLocatorInputStream.java Wed Apr 24 04:37:28 2013
@@ -49,7 +49,7 @@ abstract class UpdateSensitiveLOBLocator
     //this LOB is obtained.
     //Will be used while re-creating the stream
     //in the sub-class hence protected.
-    protected Connection con = null;
+    protected ClientConnection con = null;
     
     //Stores the Blob instance
     //this class refers to.
@@ -84,8 +84,11 @@ abstract class UpdateSensitiveLOBLocator
      * @param is an {@code InputStream} that contains the
      *           appropriate locator stream instance.
      */
-    protected UpdateSensitiveLOBLocatorInputStream(Connection con, Lob lob,
+    protected UpdateSensitiveLOBLocatorInputStream(
+            ClientConnection con,
+            Lob lob,
             InputStream is) throws SqlException {
+
         //check if the locator associated with the
         //underlying Lob is valid.
         lob.checkForLocatorValidity();
@@ -120,8 +123,13 @@ abstract class UpdateSensitiveLOBLocator
      *            retrieved.
      *
      */
-    protected UpdateSensitiveLOBLocatorInputStream(Connection con, Lob lob,
-            InputStream is, long pos, long len) throws SqlException {
+    protected UpdateSensitiveLOBLocatorInputStream(
+            ClientConnection con,
+            Lob lob,
+            InputStream is,
+            long pos,
+            long len) throws SqlException {
+
         this(con, lob, is);
         //Initialize with the mentioned
         //position and length values.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java Wed Apr 24 04:37:28 2013
@@ -21,7 +21,9 @@
 
 package org.apache.derby.client.am;
 
+import java.math.BigDecimal;
 import java.sql.SQLException;
+import java.sql.Types;
 import org.apache.derby.shared.common.reference.MessageId;
 
 // Self-contained utilities.
@@ -109,11 +111,11 @@ public final class Utils {
         return stringBuffer.toString();
     }
 
-    static public int computeBigDecimalPrecision(java.math.BigDecimal decimal) {
+    static public int computeBigDecimalPrecision(BigDecimal decimal) {
         byte[] bBytes = decimal.unscaledValue().abs().toByteArray();
 
         if (byteArrayCmp(bBytes, tenRadixArr[tenRadixArr.length - 1]) >= 0) {
-            throw new java.lang.IllegalArgumentException(
+            throw new IllegalArgumentException(
                 SqlException.getMessageUtil().
                     getTextMessage(MessageId.CONN_PRECISION_TOO_LARGE));
         }
@@ -225,7 +227,10 @@ public final class Utils {
         }
     }
 
-    static public void checkForNegativePositiveSqlcard(Sqlca sqlca, Statement statement) throws SqlException {
+    static public void checkForNegativePositiveSqlcard(
+            Sqlca sqlca,
+            ClientStatement statement) throws SqlException {
+
         if (sqlca != null) {
             int sqlcode = sqlca.getSqlCode();
             if (sqlcode < 0) {
@@ -238,7 +243,10 @@ public final class Utils {
         }
     }
 
-    static public void checkForNegativePositiveSqlcard(Sqlca sqlca, ResultSet resultSet) throws SqlException {
+    static public void checkForNegativePositiveSqlcard(
+            Sqlca sqlca,
+            ClientResultSet resultSet) throws SqlException {
+
         if (sqlca != null) {
             int sqlcode = sqlca.getSqlCode();
             if (sqlcode < 0) {
@@ -307,47 +315,47 @@ public final class Utils {
     // just a thought...
     static String getSQLTypeName(int sqlType) {
         switch (sqlType) {
-        case java.sql.Types.BIGINT:
+        case Types.BIGINT:
             return "BIGINT";
-        case java.sql.Types.BINARY:
+        case Types.BINARY:
             return "BINARY";
-        case java.sql.Types.BIT:
+        case Types.BIT:
             return "BIT";
-        case java.sql.Types.CHAR:
+        case Types.CHAR:
             return "CHAR";
-        case java.sql.Types.DATE:
+        case Types.DATE:
             return "DATE";
-        case java.sql.Types.DECIMAL:
+        case Types.DECIMAL:
             return "DECIMAL";
-        case java.sql.Types.DOUBLE:
+        case Types.DOUBLE:
             return "DOUBLE";
-        case java.sql.Types.REAL:
+        case Types.REAL:
             return "REAL";
-        case java.sql.Types.INTEGER:
+        case Types.INTEGER:
             return "INTEGER";
-        case java.sql.Types.LONGVARBINARY:
+        case Types.LONGVARBINARY:
             return "LONGVARBINARY";
-        case java.sql.Types.LONGVARCHAR:
+        case Types.LONGVARCHAR:
             return "LONGVARCHAR";
-        case java.sql.Types.NULL:
+        case Types.NULL:
             return "NULL";
-        case java.sql.Types.NUMERIC:
+        case Types.NUMERIC:
             return "NUMERIC";
-        case java.sql.Types.OTHER:
+        case Types.OTHER:
             return "OTHER";
-        case java.sql.Types.FLOAT:
+        case Types.FLOAT:
             return "FLOAT";
-        case java.sql.Types.SMALLINT:
+        case Types.SMALLINT:
             return "SMALLINT";
-        case java.sql.Types.TIME:
+        case Types.TIME:
             return "TIME";
-        case java.sql.Types.TIMESTAMP:
+        case Types.TIMESTAMP:
             return "TIMESTAMP";
-        case java.sql.Types.TINYINT:
+        case Types.TINYINT:
             return "TINYINT";
-        case java.sql.Types.VARBINARY:
+        case Types.VARBINARY:
             return "VARBINARY";
-        case java.sql.Types.VARCHAR:
+        case Types.VARCHAR:
             return "VARCHAR";
         default:
             return null;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,9 @@
 
 package org.apache.derby.client.am;
 
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import org.apache.derby.shared.common.i18n.MessageUtil;
 import org.apache.derby.shared.common.reference.MessageId;
 
@@ -73,7 +76,7 @@ public abstract class Version {
 
     // -------------------------- configuration print stream ---------------------
 
-    public static void writeDriverConfiguration(java.io.PrintWriter printWriter) {
+    public static void writeDriverConfiguration(PrintWriter printWriter) {
         String header = "[derby] ";
         synchronized (printWriter) {
             printWriter.println(header + "BEGIN TRACE_DRIVER_CONFIGURATION");
@@ -94,14 +97,14 @@ public abstract class Version {
             printWriter.println(header + "Default fetch size: " + Configuration.defaultFetchSize);
             printWriter.println(header + "Default isolation: " + Configuration.defaultIsolation);
 
-            java.lang.SecurityManager security = java.lang.System.getSecurityManager();
+            SecurityManager security = System.getSecurityManager();
             if (security == null) {
                 printWriter.println(header + "No security manager detected.");
             } else {
                 printWriter.println(header + "Security manager detected.");
             }
 
-            detectLocalHost(java.lang.System.getSecurityManager(), printWriter);
+            detectLocalHost(System.getSecurityManager(), printWriter);
 
             printSystemProperty(security, "JDBC 1 system property jdbc.drivers = ", "jdbc.drivers", printWriter);
 
@@ -135,10 +138,10 @@ public abstract class Version {
         }
     }
 
-    private static void printSystemProperty(java.lang.SecurityManager security,
+    private static void printSystemProperty(SecurityManager security,
                                             String prefix,
                                             String property,
-                                            java.io.PrintWriter printWriter) {
+                                            PrintWriter printWriter) {
         String header = "[derby] ";
         synchronized (printWriter) {
             try {
@@ -157,15 +160,18 @@ public abstract class Version {
     }
 
     // printWriter synchronized by caller
-    private static void detectLocalHost(java.lang.SecurityManager security, java.io.PrintWriter printWriter) {
+    private static void detectLocalHost(
+            SecurityManager security,
+            PrintWriter printWriter) {
+
         String header = "[derby] ";
         // getLocalHost() will hang the HotJava 1.0 browser with a high security manager.
         if (security == null) {
             try {
                 printWriter.print(header + "Detected local client host: ");
-                printWriter.println(java.net.InetAddress.getLocalHost().toString());
+                printWriter.println(InetAddress.getLocalHost().toString());
                 printWriter.flush();
-            } catch (java.net.UnknownHostException e) {
+            } catch (UnknownHostException e) {
                 printWriter.println(header + 
                     msgutil.getTextMessage(MessageId.UNKNOWN_HOST_ID, e.getMessage()));
                 printWriter.flush();

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java Wed Apr 24 04:37:28 2013
@@ -21,8 +21,11 @@
 
 package org.apache.derby.client.am;
 
+import java.io.PrintWriter;
+import javax.transaction.xa.XAException;
 
-public class XaException extends javax.transaction.xa.XAException implements Diagnosable {
+
+public class XaException extends XAException implements Diagnosable {
 
     //-----------------constructors-----------------------------------------------
 
@@ -33,7 +36,7 @@ public class XaException extends javax.t
         }
     }
 
-    public XaException(LogWriter logWriter, java.lang.Throwable throwable) {
+    public XaException(LogWriter logWriter, Throwable throwable) {
         super();
         initCause(throwable);
         if (logWriter != null) {
@@ -49,7 +52,7 @@ public class XaException extends javax.t
         }
     }
 
-    public XaException(LogWriter logWriter, java.lang.Throwable throwable, int errcode) {
+    public XaException(LogWriter logWriter, Throwable throwable, int errcode) {
         super();
         errorCode = errcode;
         initCause(throwable);
@@ -65,7 +68,7 @@ public class XaException extends javax.t
         }
     }
 
-    public XaException(LogWriter logWriter, java.lang.Throwable throwable, String s) {
+    public XaException(LogWriter logWriter, Throwable throwable, String s) {
         super(s);
         initCause(throwable);
         if (logWriter != null) {
@@ -77,7 +80,7 @@ public class XaException extends javax.t
         return null;
     }
 
-    public void printTrace(java.io.PrintWriter printWriter, String header) {
+    public void printTrace(PrintWriter printWriter, String header) {
         ExceptionFormatter.printTrace(this, printWriter, header);
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,7 @@
 
 package org.apache.derby.client.am.stmtcache;
 
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -53,7 +54,7 @@ public final class JDBCStatementCache {
     /** Structure holding the cached prepared statement objects. */
     //@GuardedBy("this");
     private final
-        LinkedHashMap<StatementKey, java.sql.PreparedStatement> statements;
+        LinkedHashMap<StatementKey, PreparedStatement> statements;
 
     /**
      * Creates a new, empty JDBC statement cache.
@@ -76,7 +77,7 @@ public final class JDBCStatementCache {
      * @param statementKey key for the prepared statement to look up
      * @return A cached statement if one exists, <code>null</code> otherwise.
      */
-    public synchronized java.sql.PreparedStatement getCached(
+    public synchronized PreparedStatement getCached(
             StatementKey statementKey) {
         if (SanityManager.DEBUG) {
             // Getting a null here indicates a programming error, but does not
@@ -97,7 +98,7 @@ public final class JDBCStatementCache {
      */
     public synchronized boolean cacheStatement(
                                         StatementKey statementKey,
-                                        java.sql.PreparedStatement ps) {
+                                        PreparedStatement ps) {
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(statementKey != null,
                                  "statementKey is not supposed to be null");
@@ -119,7 +120,7 @@ public final class JDBCStatementCache {
      */
     //@NotThreadSafe
     private static class BoundedLinkedHashMap
-            extends LinkedHashMap<StatementKey, java.sql.PreparedStatement> {
+            extends LinkedHashMap<StatementKey, PreparedStatement> {
 
         /** Maximum number of entries. */
         private final int maxSize;
@@ -149,7 +150,7 @@ public final class JDBCStatementCache {
          *      <code>false</code> if not.
          */
         protected boolean removeEldestEntry(
-                Map.Entry<StatementKey, java.sql.PreparedStatement> eldest) {
+                Map.Entry<StatementKey, PreparedStatement> eldest) {
             final boolean remove = size() > maxSize;
             if (remove && eldest != null) {
                 try {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKey.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKey.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKey.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKey.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,8 @@
 
 package org.apache.derby.client.am.stmtcache;
 
+import java.sql.ResultSet;
+import java.sql.Statement;
 import org.apache.derby.shared.common.sanity.SanityManager;
 
 /**
@@ -84,21 +86,21 @@ public class StatementKey {
         // In sane builds, make sure valid JDBC values are passed.
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(
-                rsType == java.sql.ResultSet.TYPE_FORWARD_ONLY ||
-                rsType == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE ||
-                rsType == java.sql.ResultSet.TYPE_SCROLL_SENSITIVE,
+                rsType == ResultSet.TYPE_FORWARD_ONLY ||
+                rsType == ResultSet.TYPE_SCROLL_INSENSITIVE ||
+                rsType == ResultSet.TYPE_SCROLL_SENSITIVE,
                 "Invalid result set type: " + rsType);
             SanityManager.ASSERT(
-                rsConcurrency == java.sql.ResultSet.CONCUR_READ_ONLY ||
-                rsConcurrency == java.sql.ResultSet.CONCUR_UPDATABLE,
+                rsConcurrency == ResultSet.CONCUR_READ_ONLY ||
+                rsConcurrency == ResultSet.CONCUR_UPDATABLE,
                 "Invalid result set concurrency: " + rsConcurrency);
             SanityManager.ASSERT(
-                rsHoldability == java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT ||
-                rsHoldability == java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT,
+                rsHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT ||
+                rsHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT,
                 "Invalid result set holdability: " + rsHoldability);
             SanityManager.ASSERT(
-                autogeneratedKeys == java.sql.Statement.NO_GENERATED_KEYS ||
-                autogeneratedKeys == java.sql.Statement.RETURN_GENERATED_KEYS,
+                autogeneratedKeys == Statement.NO_GENERATED_KEYS ||
+                autogeneratedKeys == Statement.RETURN_GENERATED_KEYS,
                 "Invalid autogenerated key value: " + autogeneratedKeys);
         }
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKeyFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKeyFactory.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKeyFactory.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/StatementKeyFactory.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,9 @@
 
 package org.apache.derby.client.am.stmtcache;
 
+import java.sql.ResultSet;
+import java.sql.Statement;
+
 
 /**
  * A factory for creating JDBC statement keys for use with the JDBC statement
@@ -53,9 +56,9 @@ public final class StatementKeyFactory {
     public static StatementKey newPrepared(
             String sql, String schema, int holdability) {
         return new StatementKey(PREPARED, sql, schema,
-                java.sql.ResultSet.TYPE_FORWARD_ONLY,
-                java.sql.ResultSet.CONCUR_READ_ONLY,
-                holdability, java.sql.Statement.NO_GENERATED_KEYS);
+                ResultSet.TYPE_FORWARD_ONLY,
+                ResultSet.CONCUR_READ_ONLY,
+                holdability, Statement.NO_GENERATED_KEYS);
     }
 
     /**
@@ -76,8 +79,8 @@ public final class StatementKeyFactory {
     public static StatementKey newPrepared(
             String sql, String schema, int holdability, int autogeneratedKeys) {
         return new StatementKey(PREPARED, sql, schema,
-                                java.sql.ResultSet.TYPE_FORWARD_ONLY,
-                                java.sql.ResultSet.CONCUR_READ_ONLY,
+                                ResultSet.TYPE_FORWARD_ONLY,
+                                ResultSet.CONCUR_READ_ONLY,
                                 holdability, autogeneratedKeys);
     }
 
@@ -96,7 +99,7 @@ public final class StatementKeyFactory {
     public static StatementKey newPrepared(
             String sql, String schema, int rst, int rsc, int rsh) {
         return new StatementKey(PREPARED, sql, schema, rst, rsc, rsh,
-                                java.sql.Statement.NO_GENERATED_KEYS);
+                                Statement.NO_GENERATED_KEYS);
     }
 
     /**
@@ -113,8 +116,8 @@ public final class StatementKeyFactory {
      */
     public static StatementKey newCallable(
             String sql, String schema, int holdability) {
-        return newCallable(sql, schema, java.sql.ResultSet.TYPE_FORWARD_ONLY,
-                java.sql.ResultSet.CONCUR_READ_ONLY, holdability);
+        return newCallable(sql, schema, ResultSet.TYPE_FORWARD_ONLY,
+                ResultSet.CONCUR_READ_ONLY, holdability);
     }
 
     /**
@@ -133,6 +136,6 @@ public final class StatementKeyFactory {
     public static StatementKey newCallable(
             String sql, String schema, int rst, int rsc, int rsh) {
         return new StatementKey(CALLABLE, sql, schema, rst, rsc, rsh,
-                                java.sql.Statement.NO_GENERATED_KEYS);
+                                Statement.NO_GENERATED_KEYS);
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java Wed Apr 24 04:37:28 2013
@@ -22,33 +22,35 @@
 package org.apache.derby.client.net;
 
 import java.sql.BatchUpdateException;
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.Properties;
 import org.apache.derby.client.ClientPooledConnection;
 import org.apache.derby.client.ClientXAConnection;
 import org.apache.derby.client.am.CachingLogicalConnection;
-import org.apache.derby.client.am.CallableStatement;
+import org.apache.derby.client.am.ClientCallableStatement;
 import org.apache.derby.client.am.ClientJDBCObjectFactory;
 import org.apache.derby.client.am.ClientMessageId;
 import org.apache.derby.client.am.LogicalConnection;
-import org.apache.derby.client.am.ParameterMetaData;
-import org.apache.derby.client.am.PreparedStatement;
+import org.apache.derby.client.am.ClientParameterMetaData;
+import org.apache.derby.client.am.ClientPreparedStatement;
 import org.apache.derby.client.am.LogicalCallableStatement;
 import org.apache.derby.client.am.LogicalPreparedStatement;
 import org.apache.derby.client.am.LogWriter;
 import org.apache.derby.client.am.Agent;
 import org.apache.derby.client.am.Section;
-import org.apache.derby.client.am.Statement;
+import org.apache.derby.client.am.ClientStatement;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.Cursor;
 import org.apache.derby.client.am.stmtcache.JDBCStatementCache;
 import org.apache.derby.client.am.stmtcache.StatementKey;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
 import org.apache.derby.client.am.ColumnMetaData;
-import org.apache.derby.client.am.Connection;
-import org.apache.derby.client.am.DatabaseMetaData;
+import org.apache.derby.client.am.ClientConnection;
+import org.apache.derby.client.am.ClientDatabaseMetaData;
 import org.apache.derby.client.am.MaterialStatement;
-import org.apache.derby.client.am.ResultSet;
+import org.apache.derby.client.am.ClientResultSet;
 import org.apache.derby.client.am.StatementCacheInteractor;
 import org.apache.derby.client.am.Utils;
 import org.apache.derby.shared.common.i18n.MessageUtil;
@@ -56,9 +58,8 @@ import org.apache.derby.shared.common.er
 
 /**
  * Implements the the ClientJDBCObjectFactory interface and returns the classes
- * that implement the JDBC3.0/2.0 interfaces.
- * For example newCallableStatement would return
- * {@link  CallableStatement}.
+ * that implement the JDBC3.0/2.0 interfaces
+ * For example, newCallableStatement would return ClientCallableStatement
  */
 
 public class ClientJDBCObjectFactoryImpl implements ClientJDBCObjectFactory{
@@ -106,8 +107,7 @@ public class ClientJDBCObjectFactoryImpl
             (NetLogWriter)logWriter,user,password);
     }
     /**
-     * Returns an instance of {@link
-     * org.apache.derby.client.am.CallableStatement}.
+     * Returns an instance of ClientCallableStatement.
      *
      * @param agent       The instance of NetAgent associated with this
      *                    {@link org.apache.derby.client.am.CallableStatement}
@@ -126,11 +126,11 @@ public class ClientJDBCObjectFactoryImpl
      *         object
      * @throws SqlException
      */
-    public CallableStatement newCallableStatement(Agent agent,
-            Connection connection,
+    public ClientCallableStatement newCallableStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,
             int holdability,ClientPooledConnection cpc) throws SqlException {
-        return new CallableStatement(agent,connection,sql,type,
+        return new ClientCallableStatement(agent,connection,sql,type,
                 concurrency,holdability,cpc);
     }
    
@@ -139,7 +139,7 @@ public class ClientJDBCObjectFactoryImpl
      * org.apache.derby.client.am.LogicalConnection}
      */
     public LogicalConnection newLogicalConnection(
-            Connection physicalConnection,
+                    ClientConnection physicalConnection,
                     ClientPooledConnection pooledConnection)
         throws SqlException {
         return new LogicalConnection(physicalConnection, pooledConnection);
@@ -158,7 +158,7 @@ public class ClientJDBCObjectFactoryImpl
     * @throws SqlException if creation of the logical connection fails
     */
     public LogicalConnection newCachingLogicalConnection(
-            Connection physicalConnection,
+            ClientConnection physicalConnection,
             ClientPooledConnection pooledConnection,
             JDBCStatementCache stmtCache) throws SqlException {
         return new CachingLogicalConnection(physicalConnection,
@@ -167,11 +167,11 @@ public class ClientJDBCObjectFactoryImpl
     }
 
     /**
-     * This method returns an instance of PreparedStatement which
-     * implements {@code java.sql.PreparedStatement}. It has the {@link
-     * org.apache.derby.client.ClientPooledConnection} as one of its
-     * parameters this is used to raise the Statement Events when the
-     * prepared statement is closed.
+     * This method returns an instance of ClientPreparedStatement
+     * which implements 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.
      *
      * @param agent The instance of NetAgent associated with this
      *              {@link org.apache.derby.client.am.CallableStatement}
@@ -189,16 +189,16 @@ public class ClientJDBCObjectFactoryImpl
      * @return a PreparedStatement object
      * @throws SqlException
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,Section section,ClientPooledConnection cpc) 
             throws SqlException {
-        return new PreparedStatement(agent,connection,sql,section,cpc);
+        return new ClientPreparedStatement(agent,connection,sql,section,cpc);
     }
     
     /**
      *
-     * This method returns an instance of PreparedStatement
+     * This method returns an instance of ClientPreparedStatement
      * which implements {@code java.sql.PreparedStatement}.
      * It has the {@link org.apache.derby.client.ClientPooledConnection} as one
      * of its parameters this is used to raise the Statement Events when the
@@ -227,19 +227,29 @@ public class ClientJDBCObjectFactoryImpl
      * @throws SqlException
      *
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,int holdability,
             int autoGeneratedKeys,String [] columnNames,
             int[] columnIndexes,
             ClientPooledConnection cpc)
             throws SqlException {
-        return new PreparedStatement(agent,connection,sql,type,concurrency,
-                holdability,autoGeneratedKeys,columnNames, columnIndexes, cpc);
+
+        return new ClientPreparedStatement(
+            agent,
+            connection,
+            sql,
+            type,
+            concurrency,
+            holdability,
+            autoGeneratedKeys,
+            columnNames,
+            columnIndexes,
+            cpc);
     }
 
     /**
-     * Returns a new logcial prepared statement object.
+     * Returns a new logical prepared statement object.
      *
      * @param ps underlying physical prepared statement
      * @param stmtKey key for the underlying physical prepared statement
@@ -247,7 +257,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return A logical prepared statement.
      */
     public LogicalPreparedStatement newLogicalPreparedStatement(
-            java.sql.PreparedStatement ps,
+            PreparedStatement ps,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalPreparedStatement(ps, stmtKey, cacheInteractor);
@@ -262,7 +272,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return A logical callable statement.
      */
     public LogicalCallableStatement newLogicalCallableStatement(
-            java.sql.CallableStatement cs,
+            CallableStatement cs,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalCallableStatement(cs, stmtKey, cacheInteractor);
@@ -271,10 +281,10 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return a new connection, see {@link NetConnection}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             String databaseName,
-            java.util.Properties properties) throws SqlException {
+            Properties properties) throws SqlException {
 
         return new NetConnection(
                 (NetLogWriter)netLogWriter,
@@ -284,7 +294,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return a new connection, see {@link NetConnection}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
            LogWriter netLogWriter,
            ClientBaseDataSourceRoot clientDataSource,
            String user,
@@ -299,7 +309,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link org.apache.derby.client.net.NetConnection}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             int driverManagerLoginTimeout,
             String serverName,
@@ -318,7 +328,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link org.apache.derby.client.net.NetConnection}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,String user,
             String password,
             ClientBaseDataSourceRoot dataSource,
@@ -336,7 +346,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link org.apache.derby.client.net.NetConnection}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             String ipaddr,
             int portNumber,
@@ -368,7 +378,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return a {@link Connection} object
      * @throws             SqlException
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,String user,
             String password,
             ClientBaseDataSourceRoot dataSource,
@@ -387,7 +397,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetResultSet}
      */
-    public ResultSet newNetResultSet(Agent netAgent,
+    public ClientResultSet newNetResultSet(Agent netAgent,
             MaterialStatement netStatement,
             Cursor cursor,
             int qryprctyp,int sqlcsrhld,int qryattscr,int qryattsns,
@@ -402,8 +412,8 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetDatabaseMetaData}
      */
-    public DatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
-            Connection netConnection) {
+    public ClientDatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
+            ClientConnection netConnection) {
         return new NetDatabaseMetaData((NetAgent)netAgent,
                 (NetConnection)netConnection);
     }
@@ -412,13 +422,15 @@ public class ClientJDBCObjectFactoryImpl
      * This method provides an instance of Statement 
      * @param  agent      Agent
      * @param  connection Connection
-     * @return a {@code java.sql.Statement} implementation
+     * @return a ClientStatement implementation
      * @throws SqlException
      *
      */
-     public Statement newStatement(Agent agent, Connection connection)
-                                            throws SqlException {
-         return new Statement(agent,connection);
+     public ClientStatement newStatement(
+             Agent agent,
+             ClientConnection connection) throws SqlException {
+
+         return new ClientStatement(agent,connection);
      }
      
      /**
@@ -431,18 +443,25 @@ public class ClientJDBCObjectFactoryImpl
      * @param autoGeneratedKeys int
      * @param columnNames       String[]
      * @param columnIndexes     int[]
-     * @return a {@code java.sql.Statement} implementation
+     * @return a ClientStatement implementation
      * @throws SqlException
      *
      */
-     public Statement newStatement(Agent agent, 
-                     Connection connection, int type,
+     public ClientStatement newStatement(Agent agent,
+                     ClientConnection connection, int type,
                      int concurrency, int holdability,
                      int autoGeneratedKeys, String[] columnNames,
                      int[] columnIndexes) 
                      throws SqlException {
-         return new Statement(agent,connection,type,concurrency,holdability,
-                 autoGeneratedKeys,columnNames, columnIndexes);
+         return new ClientStatement(
+             agent,
+             connection,
+             type,
+             concurrency,
+             holdability,
+             autoGeneratedKeys,
+             columnNames,
+             columnIndexes);
      }
      
      /**
@@ -477,8 +496,9 @@ public class ClientJDBCObjectFactoryImpl
      * @return a ParameterMetaData implementation
      *
      */
-    public ParameterMetaData newParameterMetaData(ColumnMetaData columnMetaData) {
-        return new ParameterMetaData(columnMetaData);
+    public ClientParameterMetaData newParameterMetaData(
+            ColumnMetaData columnMetaData) {
+        return new ClientParameterMetaData(columnMetaData);
     }
 
     /**

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java Wed Apr 24 04:37:28 2013
@@ -21,6 +21,8 @@
 
 package org.apache.derby.client.net;
 
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.Properties;
 import org.apache.derby.client.ClientPooledConnection;
@@ -29,11 +31,9 @@ import org.apache.derby.client.ClientXAC
 import org.apache.derby.client.ClientXAConnection40;
 import org.apache.derby.client.am.Agent;
 import org.apache.derby.client.am.CachingLogicalConnection40;
-import org.apache.derby.client.am.CallableStatement;
-import org.apache.derby.client.am.CallableStatement40;
-import org.apache.derby.client.am.Connection;
+import org.apache.derby.client.am.ClientCallableStatement;
+import org.apache.derby.client.am.ClientCallableStatement40;
 import org.apache.derby.client.am.Cursor;
-import org.apache.derby.client.am.DatabaseMetaData;
 import org.apache.derby.client.am.LogWriter;
 import org.apache.derby.client.am.LogicalCallableStatement;
 import org.apache.derby.client.am.LogicalCallableStatement40;
@@ -41,10 +41,12 @@ import org.apache.derby.client.am.Logica
 import org.apache.derby.client.am.LogicalConnection40;
 import org.apache.derby.client.am.LogicalPreparedStatement;
 import org.apache.derby.client.am.LogicalPreparedStatement40;
+import org.apache.derby.client.am.ClientPreparedStatement;
+import org.apache.derby.client.am.ClientPreparedStatement40;
+import org.apache.derby.client.am.ClientConnection;
+import org.apache.derby.client.am.ClientDatabaseMetaData;
 import org.apache.derby.client.am.MaterialStatement;
-import org.apache.derby.client.am.PreparedStatement;
-import org.apache.derby.client.am.PreparedStatement40;
-import org.apache.derby.client.am.ResultSet;
+import org.apache.derby.client.am.ClientResultSet;
 import org.apache.derby.client.am.SQLExceptionFactory40;
 import org.apache.derby.client.am.Section;
 import org.apache.derby.client.am.SqlException;
@@ -97,8 +99,7 @@ public class ClientJDBCObjectFactoryImpl
             (NetLogWriter)logWriter,user,password);
     }
     /**
-     * Returns an instance of
-     * {@link org.apache.derby.client.am.CallableStatement}.
+     * Returns an instance of ClientCallableStatement.
      *
      * @param agent       The instance of NetAgent associated with this
      *                    CallableStatement object.
@@ -115,12 +116,19 @@ public class ClientJDBCObjectFactoryImpl
      * @return a CallableStatement object
      * @throws SqlException
      */
-    public CallableStatement newCallableStatement(Agent agent,
-            Connection connection,
+    public ClientCallableStatement newCallableStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,
             int holdability,ClientPooledConnection cpc) throws SqlException {
-        return new CallableStatement40(agent,connection,sql,type,concurrency,
-                holdability,cpc);
+
+        return new ClientCallableStatement40(
+            agent,
+            connection,
+            sql,
+            type,
+            concurrency,
+            holdability,
+            cpc);
     }
 
     /**
@@ -129,9 +137,9 @@ public class ClientJDBCObjectFactoryImpl
      * (or LogicalConnection40) which implements {@link java.sql.Connection}.
      */
     public LogicalConnection newLogicalConnection(
-            Connection physicalConnection,
-            ClientPooledConnection pooledConnection) throws SqlException {
-
+                    ClientConnection physicalConnection,
+                    ClientPooledConnection pooledConnection)
+        throws SqlException {
         return new LogicalConnection40(physicalConnection, pooledConnection);
     }
     
@@ -147,7 +155,7 @@ public class ClientJDBCObjectFactoryImpl
     * @throws SqlException if creation of the logical connection fails
     */
     public LogicalConnection newCachingLogicalConnection(
-            Connection physicalConnection,
+            ClientConnection physicalConnection,
             ClientPooledConnection pooledConnection,
             JDBCStatementCache stmtCache) throws SqlException {
         return new CachingLogicalConnection40(physicalConnection,
@@ -156,20 +164,19 @@ public class ClientJDBCObjectFactoryImpl
     }
 
     /**
-     * @return an instance of {@link
-     * org.apache.derby.client.am.CallableStatement40}
+     * Returns an instance of ClientCallableStatement40
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,Section section,ClientPooledConnection cpc) 
             throws SqlException {
-        return new PreparedStatement40(agent,connection,sql,section,cpc);
+        return new ClientPreparedStatement40(agent,connection,sql,section,cpc);
     }
     
     /**
      *
-     * This method returns an instance of PreparedStatement
-     * which implements {@link java.sql.PreparedStatement}.
+     * This method returns an instance of ClientPreparedStatement
+     * 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.
@@ -198,15 +205,25 @@ public class ClientJDBCObjectFactoryImpl
      * @throws SqlException
      *
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,
             int holdability,int autoGeneratedKeys,
             String [] columnNames,
             int[] columnIndexes, ClientPooledConnection cpc) 
             throws SqlException {
-        return new PreparedStatement40(agent,connection,sql,type,concurrency,
-                holdability,autoGeneratedKeys,columnNames,columnIndexes, cpc);
+
+        return new ClientPreparedStatement40(
+            agent,
+            connection,
+            sql,
+            type,
+            concurrency,
+            holdability,
+            autoGeneratedKeys,
+            columnNames,
+            columnIndexes,
+            cpc);
     }
 
     /**
@@ -218,7 +235,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return A logical prepared statement.
      */
     public LogicalPreparedStatement newLogicalPreparedStatement(
-            java.sql.PreparedStatement ps,
+            PreparedStatement ps,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalPreparedStatement40(ps, stmtKey, cacheInteractor);
@@ -233,7 +250,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return A logical callable statement.
      */
     public LogicalCallableStatement newLogicalCallableStatement(
-            java.sql.CallableStatement cs,
+            CallableStatement cs,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalCallableStatement40(cs, stmtKey, cacheInteractor);
@@ -242,7 +259,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetConnection40}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             String databaseName,
             Properties properties) throws SqlException {
@@ -255,7 +272,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetConnection40}
      */
-    public Connection newNetConnection
+    public ClientConnection newNetConnection
             (LogWriter netLogWriter,
             ClientBaseDataSourceRoot clientDataSource,
             String user,
@@ -271,7 +288,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return  an instance of
      * {@link org.apache.derby.client.net.NetConnection40}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             int driverManagerLoginTimeout,
             String serverName,
@@ -291,7 +308,7 @@ public class ClientJDBCObjectFactoryImpl
      * @return an instance of
      * {@link org.apache.derby.client.net.NetConnection40}
      */
-    public Connection newNetConnection(
+    public ClientConnection newNetConnection(
             LogWriter netLogWriter,
             String user,
             String password,
@@ -324,9 +341,8 @@ public class ClientJDBCObjectFactoryImpl
      * @return a Connection object
      * @throws             SqlException
      */
-    public Connection newNetConnection(
-            LogWriter netLogWriter,
-            String user,
+    public ClientConnection newNetConnection(
+            LogWriter netLogWriter,String user,
             String password,
             ClientBaseDataSourceRoot dataSource,
             int rmId,
@@ -346,7 +362,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetResultSet}
      */
-    public ResultSet newNetResultSet(Agent netAgent,
+    public ClientResultSet newNetResultSet(Agent netAgent,
             MaterialStatement netStatement,
             Cursor cursor,
             int qryprctyp,
@@ -368,8 +384,8 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * @return an instance of {@link NetDatabaseMetaData}
      */
-    public DatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
-           Connection netConnection) {
+    public ClientDatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
+            ClientConnection netConnection) {
         return new NetDatabaseMetaData40((NetAgent)netAgent,
                 (NetConnection)netConnection);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java Wed Apr 24 04:37:28 2013
@@ -21,22 +21,25 @@
 
 package org.apache.derby.client.net;
 
+import java.sql.BatchUpdateException;
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
 import org.apache.derby.client.am.SqlException;
 
 import org.apache.derby.client.ClientPooledConnection;
 import org.apache.derby.client.am.Agent;
-import org.apache.derby.client.am.CallableStatement;
-import org.apache.derby.client.am.CallableStatement42;
-import org.apache.derby.client.am.Connection;
+import org.apache.derby.client.am.ClientCallableStatement;
+import org.apache.derby.client.am.ClientCallableStatement42;
 import org.apache.derby.client.am.Cursor;
 import org.apache.derby.client.am.LogicalCallableStatement;
 import org.apache.derby.client.am.LogicalCallableStatement42;
 import org.apache.derby.client.am.LogicalPreparedStatement;
 import org.apache.derby.client.am.LogicalPreparedStatement42;
+import org.apache.derby.client.am.ClientPreparedStatement;
+import org.apache.derby.client.am.ClientPreparedStatement42;
+import org.apache.derby.client.am.ClientConnection;
+import org.apache.derby.client.am.ClientResultSet;
 import org.apache.derby.client.am.MaterialStatement;
-import org.apache.derby.client.am.PreparedStatement;
-import org.apache.derby.client.am.PreparedStatement42;
-import org.apache.derby.client.am.ResultSet;
 import org.apache.derby.client.am.Section;
 import org.apache.derby.client.am.StatementCacheInteractor;
 import org.apache.derby.client.am.stmtcache.StatementKey;
@@ -47,21 +50,29 @@ import org.apache.derby.client.am.stmtca
  */
 public class ClientJDBCObjectFactoryImpl42 extends ClientJDBCObjectFactoryImpl40
 {
-    /** This method is overriden on JVM 8 to take advantage of long update counts */
-    protected   java.sql.BatchUpdateException   newBatchUpdateException
+    /**
+     * This method is overridden on JVM 8 to take advantage of long
+     * update counts.
+     */
+    protected   BatchUpdateException   newBatchUpdateException
         ( String message, String sqlState, int errorCode, long[] updateCounts, SqlException cause )
     {
-        return new java.sql.BatchUpdateException( message, sqlState, errorCode, updateCounts, cause );
+        return new BatchUpdateException(
+            message,
+            sqlState,
+            errorCode,
+            updateCounts,
+            cause);
     }
 
     /**
      * Returns a PreparedStatement.
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,Section section,ClientPooledConnection cpc) 
             throws SqlException {
-        return new PreparedStatement42(agent,connection,sql,section,cpc);
+        return new ClientPreparedStatement42(agent,connection,sql,section,cpc);
     }
     
     /**
@@ -72,22 +83,32 @@ public class ClientJDBCObjectFactoryImpl
      * this is used to raise the Statement Events when the prepared
      * statement is closed.
      */
-    public PreparedStatement newPreparedStatement(Agent agent,
-            Connection connection,
+    public ClientPreparedStatement newPreparedStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,
             int holdability,int autoGeneratedKeys,
             String [] columnNames,
             int[] columnIndexes, ClientPooledConnection cpc) 
             throws SqlException {
-        return new PreparedStatement42(agent,connection,sql,type,concurrency,
-                holdability,autoGeneratedKeys,columnNames,columnIndexes, cpc);
+
+        return new ClientPreparedStatement42(
+            agent,
+            connection,
+            sql,
+            type,
+            concurrency,
+            holdability,
+            autoGeneratedKeys,
+            columnNames,
+            columnIndexes,
+            cpc);
     }
 
     /**
-     * Returns a new logcial prepared statement object.
+     * Returns a new logical prepared statement object.
      */
     public LogicalPreparedStatement newLogicalPreparedStatement(
-            java.sql.PreparedStatement ps,
+            PreparedStatement ps,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalPreparedStatement42(ps, stmtKey, cacheInteractor);
@@ -96,7 +117,7 @@ public class ClientJDBCObjectFactoryImpl
     /**
      * returns an instance of org.apache.derby.client.net.NetResultSet
      */
-    public ResultSet newNetResultSet(Agent netAgent,
+    public ClientResultSet newNetResultSet(Agent netAgent,
             MaterialStatement netStatement,
             Cursor cursor,int qryprctyp,int sqlcsrhld,
             int qryattscr,int qryattsns,int qryattset,long qryinsid,
@@ -109,20 +130,27 @@ public class ClientJDBCObjectFactoryImpl
                 actualResultSetHoldability);
     }
 
-    /** return a CallableStatement */
-    public CallableStatement newCallableStatement(Agent agent,
-            Connection connection,
+    /** return a ClientCallableStatement42 object */
+    public ClientCallableStatement newCallableStatement(Agent agent,
+            ClientConnection connection,
             String sql,int type,int concurrency,
             int holdability,ClientPooledConnection cpc) throws SqlException {
-        return new CallableStatement42(agent,connection,sql,type,concurrency,
-                holdability,cpc);
+
+        return new ClientCallableStatement42(
+            agent,
+            connection,
+            sql,
+            type,
+            concurrency,
+            holdability,
+            cpc);
     }
 
     /**
      * Returns a new logical callable statement object.
      */
     public LogicalCallableStatement newLogicalCallableStatement(
-            java.sql.CallableStatement cs,
+            CallableStatement cs,
             StatementKey stmtKey,
             StatementCacheInteractor cacheInteractor) {
         return new LogicalCallableStatement42(cs, stmtKey, cacheInteractor);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java Wed Apr 24 04:37:28 2013
@@ -22,12 +22,15 @@
 package org.apache.derby.client.net;
 
 // This mapping is used by DssTrace only.
+
+import java.util.Hashtable;
+
 // This is not part of the driver and is not initialized unless dss tracing is enabled.
 // This is an abstract mapping from 2-byte code point to a string representing the name of the code point.
 // This data type may be modified for performance to adapt to any sort of lookup implementation,
 // such as binary search on an underlying sorted array.
 
-class CodePointNameTable extends java.util.Hashtable<Integer, String> {
+class CodePointNameTable extends Hashtable<Integer, String> {
     CodePointNameTable() {
         put(CodePoint.ACCSECRD, "ACCSECRD");
         put(CodePoint.TYPDEFNAM, "TYPDEFNAM");

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ConnectionRequestInterface.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ConnectionRequestInterface.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/ConnectionRequestInterface.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ConnectionRequestInterface.java Wed Apr 24 04:37:28 2013
@@ -39,8 +39,7 @@ public interface ConnectionRequestInterf
     public void writeLocalRollback(NetConnection connection)
             throws SqlException;
 
-    public void writeLocalXAStart(NetConnection connection)
-            throws SqlException;
+    public void writeLocalXAStart(NetConnection connection) throws SqlException;
 
     public void writeLocalXACommit(NetConnection connection)
             throws SqlException;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/EbcdicCcsidManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/EbcdicCcsidManager.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/EbcdicCcsidManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/EbcdicCcsidManager.java Wed Apr 24 04:37:28 2013
@@ -129,10 +129,8 @@ public class EbcdicCcsidManager extends 
         );
     }
 
-    public byte[] convertFromJavaString(
-            String sourceString,
-            Agent agent) throws SqlException {
-
+    public byte[] convertFromJavaString(String sourceString, Agent agent)
+            throws SqlException {
         CharBuffer src = CharBuffer.wrap(sourceString);
         ByteBuffer dest = ByteBuffer.allocate(sourceString.length());
         startEncoding();

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java Wed Apr 24 04:37:28 2013
@@ -22,12 +22,18 @@
 package org.apache.derby.client.net;
 
 import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.KeyManagementException;
 import javax.net.SocketFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 import javax.net.ssl.KeyManagerFactory;
 import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.UnrecoverableKeyException;
 import java.security.cert.X509Certificate;
 import java.security.cert.CertificateException;
 
@@ -55,13 +61,13 @@ public class NaiveTrustManager
      * interface.
      **/
     public static SocketFactory getSocketFactory()
-        throws java.security.NoSuchAlgorithmException,
-               java.security.KeyManagementException,
-               java.security.NoSuchProviderException,
-               java.security.KeyStoreException,
-               java.security.UnrecoverableKeyException,
-               java.security.cert.CertificateException,
-               java.io.IOException
+        throws NoSuchAlgorithmException,
+               KeyManagementException,
+               NoSuchProviderException,
+               KeyStoreException,
+               UnrecoverableKeyException,
+               CertificateException,
+               IOException
     {
         if (thisManager == null) {
             thisManager = new TrustManager [] {new NaiveTrustManager()};

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java Wed Apr 24 04:37:28 2013
@@ -21,14 +21,21 @@
 
 package org.apache.derby.client.net;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.Socket;
 import java.net.SocketException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
 
 import org.apache.derby.client.am.Agent;
 import org.apache.derby.client.am.DisconnectException;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.client.am.ClientStatement;
 import org.apache.derby.client.am.LogWriter;
-import org.apache.derby.client.am.Statement;
 import org.apache.derby.client.am.Utils;
 import org.apache.derby.shared.common.sanity.SanityManager;
 
@@ -78,9 +85,9 @@ public class NetAgent extends Agent {
 
     //-----------------------------state------------------------------------------
 
-    java.net.Socket socket_;
-    java.io.InputStream rawSocketInputStream_;
-    java.io.OutputStream rawSocketOutputStream_;
+    Socket socket_;
+    InputStream rawSocketInputStream_;
+    OutputStream rawSocketOutputStream_;
 
     String server_;
     int port_;
@@ -131,8 +138,9 @@ public class NetAgent extends Agent {
         }
 
         try {
-            socket_ = (java.net.Socket) java.security.AccessController.doPrivileged(new OpenSocketAction(server, port, clientSSLMode_));
-        } catch (java.security.PrivilegedActionException e) {
+            socket_ = (Socket)AccessController.doPrivileged(
+                new OpenSocketAction(server, port, clientSSLMode_));
+        } catch (PrivilegedActionException e) {
             throw new DisconnectException(this,
                 new ClientMessageId(SQLState.CONNECT_UNABLE_TO_CONNECT_TO_SERVER),
                 new Object[] { e.getException().getClass().getName(), server, 
@@ -147,10 +155,10 @@ public class NetAgent extends Agent {
                 socket_.setKeepAlive(true); // PROTOCOL Manual: TCP/IP connection allocation rule #2
                 socket_.setSoTimeout(loginTimeout * 1000);
             }
-        } catch (java.net.SocketException e) {
+        } catch (SocketException e) {
             try {
                 socket_.close();
-            } catch (java.io.IOException doNothing) {
+            } catch (IOException doNothing) {
             }
             exceptionOpeningSocket_ = new DisconnectException(this,
                 new ClientMessageId(SQLState.CONNECT_SOCKET_EXCEPTION),
@@ -162,10 +170,10 @@ public class NetAgent extends Agent {
                 rawSocketOutputStream_ = socket_.getOutputStream();
                 rawSocketInputStream_ = socket_.getInputStream();
             }
-        } catch (java.io.IOException e) {
+        } catch (IOException e) {
             try {
                 socket_.close();
-            } catch (java.io.IOException doNothing) {
+            } catch (IOException doNothing) {
             }
             exceptionOpeningSocket_ = new DisconnectException(this, 
                 new ClientMessageId(SQLState.CONNECT_UNABLE_TO_OPEN_SOCKET_STREAM),
@@ -245,10 +253,10 @@ public class NetAgent extends Agent {
         // Set TCP/IP Socket Properties
         try {
             socket_.setSoTimeout(loginTimeout * 1000);
-        } catch (java.net.SocketException e) {
+        } catch (SocketException e) {
             try {
                 socket_.close();
-            } catch (java.io.IOException doNothing) {
+            } catch (IOException doNothing) {
             }
             throw new SqlException(logWriter_, 
                 new ClientMessageId(SQLState.SOCKET_EXCEPTION),
@@ -283,7 +291,7 @@ public class NetAgent extends Agent {
         if (rawSocketInputStream_ != null) {
             try {
                 rawSocketInputStream_.close();
-            } catch (java.io.IOException e) {
+            } catch (IOException e) {
                 // note when {6} = 0 it indicates the socket was closed.
                 // this should be ok since we are going to go an close the socket
                 // immediately following this call.
@@ -299,7 +307,7 @@ public class NetAgent extends Agent {
         if (rawSocketOutputStream_ != null) {
             try {
                 rawSocketOutputStream_.close();
-            } catch (java.io.IOException e) {
+            } catch (IOException e) {
                 // note when {6} = 0 it indicates the socket was closed.
                 // this should be ok since we are going to go an close the socket
                 // immediately following this call.
@@ -316,7 +324,7 @@ public class NetAgent extends Agent {
         if (socket_ != null) {
             try {
                 socket_.close();
-            } catch (java.io.IOException e) {
+            } catch (IOException e) {
                 // again {6} = 0, indicates the socket was closed.
                 // maybe set {4} to e.getMessage().
                 // do this for now and but may need to modify or
@@ -393,12 +401,12 @@ public class NetAgent extends Agent {
     protected void sendRequest() throws DisconnectException {
         try {
             request_.flush(rawSocketOutputStream_);
-        } catch (java.io.IOException e) {
+        } catch (IOException e) {
             throwCommunicationsFailure(e);
         }
     }
 
-    public java.io.InputStream getInputStream() {
+    public InputStream getInputStream() {
         return rawSocketInputStream_;
     }
 
@@ -406,21 +414,21 @@ public class NetAgent extends Agent {
         return currentCcsidManager_;
     }
     
-    public java.io.OutputStream getOutputStream() {
+    public OutputStream getOutputStream() {
         return rawSocketOutputStream_;
     }
 
-    void setInputStream(java.io.InputStream inputStream) {
+    void setInputStream(InputStream inputStream) {
         rawSocketInputStream_ = inputStream;
     }
 
-    void setOutputStream(java.io.OutputStream outputStream) {
+    void setOutputStream(OutputStream outputStream) {
         rawSocketOutputStream_ = outputStream;
     }
 
     public void throwCommunicationsFailure(Throwable cause) 
-            throws DisconnectException {
-        //org.apache.derby.client.am.DisconnectException
+        throws DisconnectException {
+        //DisconnectException
         //accumulateReadExceptionAndDisconnect
         // note when {6} = 0 it indicates the socket was closed.
         // need to still validate any token values against message publications.
@@ -432,7 +440,7 @@ public class NetAgent extends Agent {
         
     // ----------------------- call-down methods ---------------------------------
 
-    public LogWriter newLogWriter_(java.io.PrintWriter printWriter,
+    public LogWriter newLogWriter_(PrintWriter printWriter,
                                                               int traceLevel) {
         return new NetLogWriter(printWriter, traceLevel);
     }
@@ -470,7 +478,7 @@ public class NetAgent extends Agent {
         super.beginWriteChainOutsideUOW();
     }
 
-    public void beginWriteChain(Statement statement) throws SqlException {
+    public void beginWriteChain(ClientStatement statement) throws SqlException {
         request_.initialize();
         writeDeferredResetConnection();
         super.beginWriteChain(statement);
@@ -495,7 +503,8 @@ public class NetAgent extends Agent {
         }
     }
 
-    protected void beginReadChain(Statement statement) throws SqlException {
+    protected void beginReadChain(ClientStatement statement)
+            throws SqlException {
         readDeferredResetConnection();
         super.beginReadChain(statement);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java Wed Apr 24 04:37:28 2013
@@ -20,7 +20,7 @@
 */
 package org.apache.derby.client.net;
 
-import org.apache.derby.client.am.CallableStatement;
+import org.apache.derby.client.am.ClientCallableStatement;
 import org.apache.derby.client.am.ColumnMetaData;
 import org.apache.derby.client.am.MaterialPreparedStatement;
 import org.apache.derby.client.am.Section;
@@ -32,7 +32,7 @@ import org.apache.derby.client.ClientPoo
 public class NetCallableStatement extends NetPreparedStatement
         implements MaterialPreparedStatement {
 
-    CallableStatement callableStatement_;
+    ClientCallableStatement callableStatement_;
 
     //-----------------------------state------------------------------------------
 
@@ -42,8 +42,8 @@ public class NetCallableStatement extend
         callableStatement_ = null;
     }
 
-    // Relay constructor for all NetCallableStatement constructors
-    NetCallableStatement(CallableStatement statement,
+    // Relay constructor for all NetCallableStatement, constructors
+    NetCallableStatement(ClientCallableStatement statement,
                          NetAgent netAgent,
                          NetConnection netConnection) throws SqlException {
         super(statement, netAgent, netConnection);
@@ -51,7 +51,7 @@ public class NetCallableStatement extend
         initNetCallableStatement(statement);
     }
 
-    void resetNetCallableStatement(CallableStatement statement,
+    void resetNetCallableStatement(ClientCallableStatement statement,
                                    NetAgent netAgent,
                                    NetConnection netConnection) throws SqlException {
         super.resetNetPreparedStatement(statement, netAgent, netConnection);
@@ -59,7 +59,7 @@ public class NetCallableStatement extend
         initNetCallableStatement(statement);
     }
 
-    private void initNetCallableStatement(CallableStatement statement) {
+    private void initNetCallableStatement(ClientCallableStatement statement) {
         callableStatement_ = statement;
         callableStatement_.materialCallableStatement_ = this;
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Wed Apr 24 04:37:28 2013
@@ -25,27 +25,29 @@ import java.io.OutputStream;
 import java.net.SocketTimeoutException;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
+import java.sql.SQLException;
 import java.util.Arrays;
+import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Properties;
 import javax.transaction.xa.Xid;
-import org.apache.derby.client.am.CallableStatement;
-import org.apache.derby.client.am.DatabaseMetaData;
+import org.apache.derby.client.am.ClientCallableStatement;
+import org.apache.derby.client.am.ClientDatabaseMetaData;
 import org.apache.derby.client.am.DisconnectException;
 import org.apache.derby.client.am.EncryptionManager;
-import org.apache.derby.client.am.PreparedStatement;
+import org.apache.derby.client.am.ClientPreparedStatement;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.ClientMessageId;
 import org.apache.derby.shared.common.reference.MessageId;
 import org.apache.derby.shared.common.i18n.MessageUtil;
-import org.apache.derby.client.am.Statement;
+import org.apache.derby.client.am.ClientStatement;
 import org.apache.derby.iapi.reference.Attribute;
 import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
 import org.apache.derby.jdbc.ClientDriver;
 import org.apache.derby.client.ClientPooledConnection;
 import org.apache.derby.client.am.Agent;
-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.Section;
 import org.apache.derby.client.am.SectionManager;
@@ -54,7 +56,7 @@ import org.apache.derby.jdbc.ClientDataS
 import org.apache.derby.shared.common.reference.SQLState;
 import org.apache.derby.shared.common.sanity.SanityManager;
 
-public class NetConnection extends Connection {
+public class NetConnection extends ClientConnection {
     
     // Use this to get internationalized strings...
     protected static final MessageUtil msgutil = SqlException.getMessageUtil();
@@ -438,8 +440,8 @@ public class NetConnection extends Conne
             }
         } catch (Throwable e) {
             // If *anything* goes wrong, make sure the connection is
-            // destroyed always mark the connection closed in case of
-            // an error.
+            // destroyed.
+            // Always mark the connection closed in case of an error.
             // This prevents attempts to use this closed connection
             // to retrieve error message text if an error SQLCA
             // is returned in one of the connect flows.
@@ -487,8 +489,8 @@ public class NetConnection extends Conne
             flowServerAttributes();
         } catch (Throwable e) {
             // If *anything* goes wrong, make sure the connection is
-            // destroyed always mark the connection closed in case of
-            // an error.
+            // destroyed.
+            // Always mark the connection closed in case of an error.
             // This prevents attempts to use this closed connection
             // to retrieve error message text if an error SQLCA
             // is returned in one of the connect flows.
@@ -1022,7 +1024,8 @@ public class NetConnection extends Conne
 
     //-------------------Abstract object factories--------------------------------
 
-    protected Agent newAgent_(LogWriter logWriter,
+    protected Agent newAgent_(
+            LogWriter logWriter,
             int loginTimeout,
             String serverName,
             int portNumber,
@@ -1037,23 +1040,39 @@ public class NetConnection extends Conne
     }
 
 
-    protected Statement newStatement_(int type, int concurrency, int holdability) throws SqlException {
+    protected ClientStatement newStatement_(
+            int type,
+            int concurrency,
+            int holdability) throws SqlException {
+
         return new NetStatement(netAgent_, this, type, concurrency, holdability).statement_;
     }
 
-    protected void resetStatement_(Statement statement, int type, int concurrency, int holdability) throws SqlException {
+    protected void resetStatement_(
+            ClientStatement statement,
+            int type,
+            int concurrency,
+            int holdability) throws SqlException {
+
         ((NetStatement) statement.getMaterialStatement()).resetNetStatement(netAgent_, this, type, concurrency, holdability);
     }
 
-    protected PreparedStatement newPositionedUpdatePreparedStatement_(
+    protected ClientPreparedStatement newPositionedUpdatePreparedStatement_(
             String sql,
             Section section) throws SqlException {
+
         //passing the pooledConnection_ object which will be used to raise 
         //StatementEvents to the PooledConnection
         return new NetPreparedStatement(netAgent_, this, sql, section,pooledConnection_).preparedStatement_;
     }
 
-    protected PreparedStatement newPreparedStatement_(String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames,
+    protected ClientPreparedStatement newPreparedStatement_(
+            String sql,
+            int type,
+            int concurrency,
+            int holdability,
+            int autoGeneratedKeys,
+            String[] columnNames,
             int[] columnIndexes) throws SqlException {
         
         //passing the pooledConnection_ object which will be used to raise 
@@ -1062,7 +1081,7 @@ public class NetConnection extends Conne
                 columnIndexes, pooledConnection_).preparedStatement_;
     }
 
-    protected void resetPreparedStatement_(PreparedStatement ps,
+    protected void resetPreparedStatement_(ClientPreparedStatement ps,
                                            String sql,
                                            int resultSetType,
                                            int resultSetConcurrency,
@@ -1075,13 +1094,18 @@ public class NetConnection extends Conne
     }
 
 
-    protected CallableStatement newCallableStatement_(String sql, int type, int concurrency, int holdability) throws SqlException {
+    protected ClientCallableStatement newCallableStatement_(
+            String sql,
+            int type,
+            int concurrency,
+            int holdability) throws SqlException {
+
         //passing the pooledConnection_ object which will be used to raise 
         //StatementEvents to the PooledConnection
         return new NetCallableStatement(netAgent_, this, sql, type, concurrency, holdability,pooledConnection_).callableStatement_;
     }
 
-    protected void resetCallableStatement_(CallableStatement cs,
+    protected void resetCallableStatement_(ClientCallableStatement cs,
                                            String sql,
                                            int resultSetType,
                                            int resultSetConcurrency,
@@ -1090,7 +1114,7 @@ public class NetConnection extends Conne
     }
 
 
-    protected DatabaseMetaData newDatabaseMetaData_() {
+    protected ClientDatabaseMetaData newDatabaseMetaData_() {
             return ClientDriver.getFactory().newNetDatabaseMetaData(netAgent_, this);
     }
 
@@ -1593,7 +1617,8 @@ public class NetConnection extends Conne
     }
 
 
-    public void writeTransactionStart(Statement statement) throws SqlException {
+    public void writeTransactionStart(ClientStatement statement)
+            throws SqlException {
     }
 
     public void readTransactionStart() throws SqlException {
@@ -1821,7 +1846,8 @@ public class NetConnection extends Conne
     }
     
     
-    protected void writeXATransactionStart(Statement statement) throws SqlException {
+    protected void writeXATransactionStart(ClientStatement statement)
+            throws SqlException {
         xares_.netXAConn_.writeTransactionStart(statement);
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java?rev=1471245&r1=1471244&r2=1471245&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java Wed Apr 24 04:37:28 2013
@@ -23,6 +23,8 @@ package org.apache.derby.client.net;
 
 import java.sql.Array;
 import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
 import java.sql.SQLClientInfoException;
 import java.sql.SQLException;
 import java.sql.SQLPermission;
@@ -44,7 +46,7 @@ public class  NetConnection40 extends Ne
      * connection. The statement is created the first time isValid is called
      * and closed when the connection is closed (by the close call).
      */
-    private java.sql.PreparedStatement isValidStmt = null;
+    private PreparedStatement isValidStmt = null;
 
     /*
      *-------------------------------------------------------
@@ -54,7 +56,7 @@ public class  NetConnection40 extends Ne
 
     public NetConnection40(NetLogWriter netLogWriter,
                          String databaseName,
-                         java.util.Properties properties) throws SqlException {
+                         Properties properties) throws SqlException {
     super(netLogWriter,databaseName,properties);
     }
     public NetConnection40(NetLogWriter netLogWriter,
@@ -68,7 +70,7 @@ public class  NetConnection40 extends Ne
                          String serverName,
                          int portNumber,
                          String databaseName,
-                         java.util.Properties properties) throws SqlException{
+                         Properties properties) throws SqlException{
     super(netLogWriter,driverManagerLoginTimeout,serverName,portNumber,databaseName,properties);
      }
      public NetConnection40(NetLogWriter netLogWriter,
@@ -196,7 +198,7 @@ public class  NetConnection40 extends Ne
                 isValidStmt.setQueryTimeout(timeout);
 
                 // Run the query against the database
-                java.sql.ResultSet rs = isValidStmt.executeQuery();
+                ResultSet rs = isValidStmt.executeQuery();
                 rs.close();
 
                 // Restore the previous timeout value
@@ -352,7 +354,7 @@ public class  NetConnection40 extends Ne
      * @throws java.sql.SQLException if no object if found that implements the 
      * interface
      */
-    public <T> T unwrap(java.lang.Class<T> interfaces)
+    public <T> T unwrap(Class<T> interfaces)
                                    throws SQLException {
         try { 
             checkForClosedConnection();



Mime
View raw message