You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2013/05/03 05:42:16 UTC

svn commit: r1478635 [1/5] - in /db/derby/code/trunk/java: client/org/apache/derby/client/ client/org/apache/derby/client/am/ client/org/apache/derby/client/net/ client/org/apache/derby/jdbc/ engine/org/apache/derby/iapi/services/info/ testing/org/apac...

Author: dag
Date: Fri May  3 03:42:14 2013
New Revision: 1478635

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

Patch derby-6125-visibility-02-e.

Further limits scopes of program entities and also removes dead code,
including maintenance of fields that are never read, i.e. they are not
used for anything except setting them.

When I use the term "unused" below it may mean that something is
ultimately/transitively unused, e.g a method used to set an unused
field, or due to other code removal transitively. All references are
to client classes.

* Agent

  Removed unused method batchUpdateExceptionGenerated

* ClientCallableStatement

  Removed two unused overloads: resetCallableStatement

* ClientClob

  Removed unused field encoding_

  Removed unused methods createClobWrapper, convertFromAsciiToCharacterStream

* ClientPreparedStatement

  Removed unused methods resetPreparedStatement,
  initPreparedStatement, writeDescribeOutput, readDescribeOutput,
  writePrepareDescribeInputOutput, checkScaleForINOUTDecimal

  Inlined creation of method not implemented exception, removed
  jdbc3FeatureNotSupported.

* ClientResultSet

  Commented out unused fields updatability_unknown__, updatability_readOnly__

  Removed unused fields NEXT_ROWSET, PREVIOUS_ROWSET, ABSOLUTE_ROWSET,
  FIRST_ROWSET, LAST_ROWSET, RELATIVE_ROWSET, REFRESH_ROWSET, nestingLevel_

  Removed unused method rowCountIsKnown. flowFetch moved to NetResultSet.

* ClientStatement

  Removed unused field returnValueFromProcedure_

  Commented out unused fields isCommitSql__, isRollbackSql__, isPositionedUpdateDeleteSql__

  Removed unused method clientmarkResultSetsClosed, getProcedureName,
  upperCaseProcedureName, jdbc3FeatureNotSupported

* ClobLocatorOutputStream

  Removed unused field connection

* ColumnMetaData

  Removed unused fields singleMixedByteOrDouble_,
  protocolTypeToOverrideLidMapping_, mddOverrideArray_

  Removed unused method isParameterModeGuessedAsOutput, columnIsNotInUnicode

* Configuration

  Removed unused fields jreLevelMajor, jreLevelMinor, jreLevel,
  dncPackageVersion, enableNetConnectionPooling,
  cursorAttribute_InsensitiveRowset,
  cursorAttribute_SensitiveDynamicRowset,
  cursorAttribute_InsensitiveRowset

* CrossConverters

  Removed unused method getBooleanFromByte, getBigDecimalFromBoolean,
  getStringFromBoolean, getDateFromTime(Time),
  getDateFromTimestamp(Timestamp), getTimeFromTimestamp(Timestamp),
  getTimestampFromTime(Time), getTimestampFromDate(Date)

* DisconnectException

  Removed unused constructor DisconnectException(Agent, ClientMessageId, SqlCode)

* LogWriter

  Removed unused traceExit overloads.

* SectionManager

  Removed unused fields collection_, HOLD, NO_HOLD,

* SqlCode

  Removed unused fields invalidCommitOrRollbackUnderXA,
  invalidSetAutoCommitUnderXA, undefinedError

* SqlException

  Removed unused constructor SqlException(LogWriter, ClientMessageId, SqlCode)

* SqlWarning

  Removed unused constructors
  Removed unused method getNextWarning

* Sqlca

  Removed unused methods getReturnValue, includesSqlCode

* Utils

  Removed unused methods getStringFromStrings, padOrTruncate,
  checkForNegativePositiveSqlcard (2X), getUpdateCountFromSqlcard,
  accumulateSQLWarning, getSQLTypeName (we might want to keep this for
  debugging possibly?)

* Version

  Removed unused methods getDriverName, getBuildNumber, isAlpha, isBeta

* XaException

  Removed unused constructors
  Removed unused method copyAsUnchainedXAException

* CodePoint

  Removed many unused code points (fields). One could argue that it's
  nice to keep these if we need them later, opinions welcomed. For me
  it seems clearer to only keep those we need, we know what the source
  for the constants is anyway, i.e. the DRDA specification.

* DssConstants

  Removed many unused constants, cf previous item considerations.

* FdocaConstants

  Removed many unused constants, cf previous item considerations.

* FdocaSimpleDataArray

  Removed unused fields fdocaFieldType_, representation_, mode_, fieldLength_

* NetAgent

  Removed unused fields packageRequest_,
  Removed unused method convertToStringTcpIpAddress

* NetConfiguration

  Removed unused fields INITIAL_CAPACITY, NON_CHAR_DDM_DATA_PAD_BYTE,
  CURSOR_NOT_OPEN, CURSOR_OPEN, CURSOR_CLOSE_ONLY, DDMHDR_LENGTH,
  PRDDTA_MAX_ACCT_SUFFIX_LEN, MGRLVL_3, MGRLVL_4, MGRLVL_6,
  SECMEC_DCESEC, SECMEC_EUSRIDNWPWD, SYSTEM_ASC

* NetConnection

  Removed unused field pendingEndXACallinfoOffset_, targetSrvclsnm_, seqNo_

  Removed unused methods getSpecialRegisters, addSpecialRegisters,
  getSequenceNumber, getIndoubtTransaction, doResetNow,
  serverSupportsBooleanValues

* NetConnectionRequest

  Removed unused method writeDummyExchangeServerAttributes

* NetCursor

  Removed unused fields targetSqlamForTypdef_, numMddOverrides_

* NetResultSet

  Removed unused method queryDataWasReturnedOnOpen

* NetResultSet

  Method flowFetch moved from ClientResultSet to be able to make it
  package private.

* NetStatement

  Removed unused constructor
  Removed unused method netReset

* NetXACallInfo

  Removed unused fields xaInProgress_, xaWasSuspended,
  currConnection_, freeEntry_, convReleased_, xaResource_, uowid_,
  readOnlyTransaction_

  Removed unused methods setUOWID, getUOWID,
  setReadOnlyTransactionFlag, getReadOnlyTransactionFlag

* NetXAConnection

  Removed unused methods writeLocalXAStart_, readLocalXAStart, getUOWID, getPort

* NetXAResource

  Removed unused fields TMTIMEOUT, ACTIVE_ONLY, XA_NULL_XID,
  RECOVER_XID_ARRAY_LENGTH, XAFUNC_NONE, rmId_, numXACallInfo_,
  connectionCount_, activeXATransCount_, rmIdx_, rmIdy_, port_,
  ipaddr_, specialRegisters_

  Removed unused methods throwXAException, getSpecialRegisters,
  addSpecialRegisters

* Reply

  Removed unused fields dssIsChainedWithDiffID_

  Removed unused methods readIntArray, readLong, readBoolean,
  readString(int), readLDBytes, peekLength

* Request

  Removed unused method createXACommand, writeScalarBytes,
  writeScalarHeader, writeScalarPaddedBytes, writeDDMString

* Typdef

  Removed unused constructor(NetAgent, int, String)
  Removed unused field environment_
  Removed unused methods clearCcsidSbc, clearCcsidDbc, clearCcsidMbc

* NetIndoubtTransaction removed altogether

Removed:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetIndoubtTransaction.java
Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTimeValue.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/FloatingPoint.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/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/LogicalStatementEntity.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlCode.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/SqlWarning.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/StatementCacheInteractor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/UpdateSensitiveClobLocatorReader.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Utils.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Version.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/XaException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/CcsidManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePoint.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/ConnectionReplyInterface.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/DssConstants.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/FdocaConstants.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/FdocaSimpleDataArray.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NaiveTrustManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConfiguration.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.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/NetPackageReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet42.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSetReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSetRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetSqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/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/NetXACallInfo.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnectionRequest.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/PublicBufferOutputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReply.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/StatementReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReplyInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/Utf8CcsidManagerClientTest.java

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=1478635&r1=1478634&r2=1478635&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 Fri May  3 03:42:14 2013
@@ -59,8 +59,7 @@ public class ClientXAConnection extends 
         // Note: conApp will be set after this call
         logicalCon_ = super.getConnection();
 
-        netXares_ = new NetXAResource(this,
-                rmId_, userId, password, netXAPhysicalConnection_);
+        netXares_ = new NetXAResource(this, netXAPhysicalConnection_);
         xares_ = netXares_;
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Agent.java Fri May  3 03:42:14 2013
@@ -29,14 +29,15 @@ import org.apache.derby.shared.common.re
 import org.apache.derby.shared.common.reference.SQLState;
 
 public abstract class Agent {
-    public SqlException accumulatedReadExceptions_ = null;
+    SqlException accumulatedReadExceptions_ = null;
 
     private boolean enableBatchedExceptionTracking_;
     private int batchedExceptionLabelIndex_;
     private boolean[] batchedExceptionGenerated_;
 
     ClientConnection connection_; // made friendly for lobs only, refactor !!
-    public SectionManager sectionManager_ = null; // temporarily public, make friendly at least !!
+
+    SectionManager sectionManager_ = null;
 
     public LogWriter logWriter_ = null;
 
@@ -46,7 +47,7 @@ public abstract class Agent {
     // cannot be thrown on the getMessage() invocation because the signature of getMessage() does not
     // allow for throwing an exception.
     // Therefore, we must save the exception and throw it at our very first opportunity.
-    SqlException deferredException_;
+    private SqlException deferredException_;
 
     void checkForDeferredExceptions() throws SqlException {
         if (deferredException_ != null) {
@@ -64,7 +65,7 @@ public abstract class Agent {
      * @param dataType the data type to check
      * @exception SqlException if the type is not supported
      */
-    public void checkForSupportedDataType(int dataType) throws SqlException {
+    void checkForSupportedDataType(int dataType) throws SqlException {
 
         // JDBC 4.0 javadoc for setObject() says:
         //
@@ -99,7 +100,7 @@ public abstract class Agent {
         }
     }
 
-    public void accumulateDeferredException(SqlException e) {
+    void accumulateDeferredException(SqlException e) {
         if (deferredException_ == null) {
             deferredException_ = e;
         } else {
@@ -113,7 +114,7 @@ public abstract class Agent {
         crossConverters_ = new CrossConverters(this);
     }
 
-    protected void resetAgent(LogWriter logWriter) {
+    private void resetAgent(LogWriter logWriter) {
         // sectionManager_ is set elsewhere
         accumulatedReadExceptions_ = null;
         enableBatchedExceptionTracking_ = false;
@@ -123,7 +124,7 @@ public abstract class Agent {
         deferredException_ = null;
     }
 
-    public void resetAgent(
+    void resetAgent(
         ClientConnection connection,
         LogWriter logWriter,
         int loginTimeout,
@@ -174,7 +175,7 @@ public abstract class Agent {
     }
 
     // Called only for disconnect event
-    public final void accumulateDisconnectException(DisconnectException e) {
+    private void accumulateDisconnectException(DisconnectException e) {
         if (enableBatchedExceptionTracking_) {
             batchedExceptionGenerated_[batchedExceptionLabelIndex_] = true;
             labelAsBatchedException(e, batchedExceptionLabelIndex_);
@@ -229,18 +230,13 @@ public abstract class Agent {
         }
     }
 
-    // precondition: all batch execute reads have occurred
-    final boolean batchUpdateExceptionGenerated() {
-        return batchedExceptionGenerated_[batchedExceptionLabelIndex_];
-    }
-
     public final void flow(ClientStatement statement) throws SqlException {
         endWriteChain();
         flush_();
         beginReadChain(statement);
     }
 
-    public final void flowBatch(ClientStatement statement, int batchSize)
+    final void flowBatch(ClientStatement statement, int batchSize)
             throws SqlException {
         endBatchedWriteChain();
         flush_();
@@ -266,7 +262,7 @@ public abstract class Agent {
         }
     }
 
-    public final void disconnectEvent() {
+    final void disconnectEvent() {
         // closes client-side resources associated with database connection
         try {
             close();
@@ -282,7 +278,7 @@ public abstract class Agent {
         connection_.writeTransactionStart(statement);
     }
 
-    public final void beginBatchedWriteChain(ClientStatement statement)
+    final void beginBatchedWriteChain(ClientStatement statement)
             throws SqlException {
         beginWriteChain(statement);
     }
@@ -290,7 +286,7 @@ public abstract class Agent {
     protected void endWriteChain() {
     }
 
-    protected final void endBatchedWriteChain() {
+    private final void endBatchedWriteChain() {
     }
 
     protected void beginReadChain(ClientStatement statement)
@@ -298,7 +294,7 @@ public abstract class Agent {
         connection_.readTransactionStart();
     }
 
-    protected final void beginBatchedReadChain(
+    private void beginBatchedReadChain(
         ClientStatement statement,
         int batchSize)
             throws SqlException {
@@ -314,8 +310,10 @@ public abstract class Agent {
         checkForExceptions();
     }
 
-    public final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions)
-        throws BatchUpdateException {
+    final void endBatchedReadChain(long[] updateCounts,
+                                   SqlException accumulatedExceptions)
+            throws BatchUpdateException {
+
         disableBatchedExceptionTracking();
         for (int i = 0; i < batchedExceptionGenerated_.length; i++) {
             if (batchedExceptionGenerated_[i]) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/AsciiStream.java Fri May  3 03:42:14 2013
@@ -25,12 +25,12 @@ import java.io.InputStream;
 import java.io.Reader;
 import java.io.StringReader;
 
-public class AsciiStream extends InputStream {
+class AsciiStream extends InputStream {
     private Reader reader_;
     private String materializedString_;
     private int charsRead_ = 0;
     
-    public AsciiStream(String materializedString){
+    AsciiStream(String materializedString){
         this(materializedString,new StringReader(materializedString));
     }
     

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java Fri May  3 03:42:14 2013
@@ -41,7 +41,7 @@ import org.apache.derby.shared.common.sa
  * this.  A more efficient skip implementation should also be
  * straight-forward.
  */
-public class BlobLocatorInputStream extends InputStream
+class BlobLocatorInputStream extends InputStream
 {
 
     /**
@@ -55,7 +55,7 @@ public class BlobLocatorInputStream exte
      * @throws SqlException if an error occurs when obtaining the
      *         length of the <code>Blob</code>.
      */
-    public BlobLocatorInputStream(ClientConnection connection, ClientBlob blob)
+    BlobLocatorInputStream(ClientConnection connection, ClientBlob blob)
         throws SqlException
     {        
         if (SanityManager.DEBUG) {
@@ -88,7 +88,7 @@ public class BlobLocatorInputStream exte
      * @throws SqlException if an error occurs when obtaining the
      *         length of the <code>Blob</code>.
      */
-    public BlobLocatorInputStream(ClientConnection connection, ClientBlob blob,
+    BlobLocatorInputStream(ClientConnection connection, ClientBlob blob,
                                   long position, long length) 
         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=1478635&r1=1478634&r2=1478635&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 Fri May  3 03:42:14 2013
@@ -37,7 +37,7 @@ import org.apache.derby.shared.common.sa
  * buffering of data is done.  Hence, for efficiency #write(byte[])
  * should be used instead of #write(int).  
  */
-public class BlobLocatorOutputStream extends OutputStream {
+class BlobLocatorOutputStream extends OutputStream {
     
     /**
      * Create an <code>OutputStream</code> for writing to the
@@ -50,7 +50,7 @@ public class BlobLocatorOutputStream ext
      * @param pos the position in the <code>BLOB</code> value at which
      *        to start writing; the first position is 1
      */
-    public BlobLocatorOutputStream(
+    BlobLocatorOutputStream(
         ClientConnection connection,
         ClientBlob blob,
         long pos) throws SqlException {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobOutputStream.java Fri May  3 03:42:14 2013
@@ -26,11 +26,11 @@ import java.io.IOException;
 import java.io.OutputStream;
 
 
-public class BlobOutputStream extends OutputStream {
+class BlobOutputStream extends OutputStream {
     private ClientBlob blob_;
     private long offset_;
 
-    public BlobOutputStream(ClientBlob blob, long offset) {
+    BlobOutputStream(ClientBlob blob, long offset) {
         blob_ = blob;
         offset_ = offset;
         

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=1478635&r1=1478634&r2=1478635&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 Fri May  3 03:42:14 2013
@@ -51,7 +51,7 @@ class CallableLocatorProcedures 
     //caches the information from a Stored Procedure
     //call as to whether locator support is available in
     //the server or not.
-    boolean isLocatorSupportAvailable = true;
+    private boolean isLocatorSupportAvailable = true;
     
     // One member variable for each stored procedure that can be called.
     // Used to be able to only prepare each procedure call once per connection.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientBlob.java Fri May  3 03:42:14 2013
@@ -57,7 +57,7 @@ public class ClientBlob extends Lob impl
     }
 
     // CTOR for input:
-    public ClientBlob(Agent agent,
+    ClientBlob(Agent agent,
                 InputStream binaryStream,
                 int length) {
         
@@ -89,7 +89,7 @@ public class ClientBlob extends Lob impl
      * @param agent
      * @param binaryStream the stream to get data from
      */
-    public ClientBlob(Agent agent, InputStream binaryStream) {
+    ClientBlob(Agent agent, InputStream binaryStream) {
         
         super(agent,
               isLayerBStreamingPossible(agent));
@@ -427,7 +427,8 @@ public class ClientBlob extends Lob impl
         }
     }
 
-    public int setBytesX(long pos, byte[] bytes, int offset, int len) throws SqlException {
+    int setBytesX(long pos, byte[] bytes, int offset, int len)
+            throws SqlException {
         /*
             Check if position is less than 0 and if true
             raise an exception
@@ -707,7 +708,7 @@ public class ClientBlob extends Lob impl
         return binaryString_;
     }
 
-    protected long binaryStringPosition(byte[] pattern, long start) {
+    private long binaryStringPosition(byte[] pattern, long start) {
         // perform a local byte string search, starting at start
         // check that the range of comparison is valid
         int index = (int) start + dataOffset_ - 1; // api start begins at 1
@@ -722,7 +723,7 @@ public class ClientBlob extends Lob impl
     }
 
     // precondition: binaryString_ is long enough for the comparison
-    protected boolean isSubString(byte[] pattern, int index) {
+    private boolean isSubString(byte[] pattern, int index) {
         for (int i = 0; i < pattern.length; i++, index++) {
             if (pattern[i] != binaryString_[index]) {
                 return false;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientCallableStatement.java Fri May  3 03:42:14 2013
@@ -131,25 +131,6 @@ public class ClientCallableStatement ext
         initCallableStatement();
     }
 
-    public void resetCallableStatement(Agent agent,
-                                       ClientConnection connection,
-                                       String sql,
-                                       Section section) throws SqlException {
-        super.resetPreparedStatement(agent, connection, sql, section);
-        initCallableStatement();
-    }
-
-
-    public void resetCallableStatement(Agent agent,
-                                       ClientConnection connection,
-                                       String sql,
-                                       Section section,
-                                       ColumnMetaData parameterMetaData,
-                                       ColumnMetaData resultSetMetaData) throws SqlException {
-        super.resetPreparedStatement(agent, connection, sql, section, parameterMetaData, resultSetMetaData);
-        initCallableStatement();
-    }
-
     protected void finalize() throws Throwable {
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceEntry(this, "finalize");
@@ -1294,7 +1275,7 @@ public class ClientCallableStatement ext
         }
     }
     
-    protected SQLException jdbcMethodNotImplemented() throws SQLException
+    SQLException jdbcMethodNotImplemented() throws SQLException
     {
         try
         {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientClob.java Fri May  3 03:42:14 2013
@@ -47,15 +47,13 @@ public class ClientClob extends Lob impl
 
     // Only used for input purposes.  For output, each getXXXStream call
     // must generate an independent stream.
-    protected InputStream asciiStream_ = null;
-    protected InputStream unicodeStream_ = null;
-    protected Reader characterStream_ = null;
+    private InputStream asciiStream_ = null;
+    private InputStream unicodeStream_ = null;
+    private Reader characterStream_ = null;
 
     // used for input
     // Therefore, we always convert a String to UTF-8 before we flow it for input
-    protected byte[] utf8String_;
-
-    protected String encoding_ = "UNICODE";
+    private byte[] utf8String_;
 
     //---------------------constructors/finalizer---------------------------------
     public ClientClob(Agent agent, String string) {
@@ -147,7 +145,7 @@ public class ClientClob extends Lob impl
      * @param encoding encoding to use for characters. Only "ISO-8859-1" is
      *      allowed.
      */
-    public ClientClob(Agent agent, InputStream inputStream, String encoding)
+    ClientClob(Agent agent, InputStream inputStream, String encoding)
             throws SqlException {
 
         this(agent,
@@ -165,7 +163,7 @@ public class ClientClob extends Lob impl
 
     // CTOR for character stream input
     // THE ENCODING IS ASSUMED TO BE "UTF-16BE"
-    public ClientClob(Agent agent, Reader reader, int length) {
+    ClientClob(Agent agent, Reader reader, int length) {
 
         this(agent,
              false);
@@ -199,7 +197,7 @@ public class ClientClob extends Lob impl
      * @param agent
      * @param reader the data to insert
      */
-    public ClientClob(Agent agent, Reader reader) {
+    ClientClob(Agent agent, Reader reader) {
 
         this(agent,
              isLayerBStreamingPossible( agent ) );
@@ -622,7 +620,8 @@ public class ClientClob extends Lob impl
         }
     }
 
-    public int setStringX(long pos, String str, int offset, int len) throws SqlException {
+    int setStringX(long pos, String str, int offset, int len)
+            throws SqlException {
         if ((int) pos <= 0 ) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.BLOB_BAD_POSITION), pos);
@@ -707,7 +706,7 @@ public class ClientClob extends Lob impl
                     //The Lob is locator enabled. Return an instance of the
                     //Locator enabled Clob specific OutputStream implementation.
                     outStream = new ClobLocatorOutputStream
-                            (agent_.connection_, this, pos);
+                            (this, pos);
                 }
                 else {
                     //The Lob is not locator enabled.
@@ -991,45 +990,6 @@ public class ClientClob extends Lob impl
         }
     }
 
-    // auxiliary method for position (Clob, long)
-    protected ClientClob createClobWrapper(Clob clob) throws SqlException {
-        long length;
-        Reader rdr;
-
-        try {
-            length = clob.length();
-        } catch (SQLException e) {
-            throw new SqlException(e);
-        }
-
-        if (length > Integer.MAX_VALUE) {
-            throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
-                length, Integer.MAX_VALUE);
-        }
-
-        try {
-            rdr = clob.getCharacterStream();
-        } catch (SQLException e) {
-            throw SqlException.javaException(agent_.logWriter_, e);
-        }
-
-        return new ClientClob(this.agent_, rdr, (int) length);
-    }
-
-    public void convertFromAsciiToCharacterStream() throws SqlException {
-        try {
-            characterStream_ =
-                    new InputStreamReader(asciiStream_, "ISO-8859-1");
-            dataType_ = CHARACTER_STREAM;
-        } catch (UnsupportedEncodingException e) {
-            throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),
-                "ISO-8859-1", "CharacterStream", e);
-        }
-    }
-
-
     /**
      * Reinitialize the value of this CLOB.
      *

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientConnection.java Fri May  3 03:42:14 2013
@@ -83,8 +83,8 @@ public abstract class ClientConnection
 
     // See ClientDataSource pre-connect settings
     protected final String user_;
-    public boolean retrieveMessageText_;
-    protected boolean jdbcReadOnly_;
+    boolean retrieveMessageText_;
+    private boolean jdbcReadOnly_;
     /**
      * Holdabilty for created statements.
      * Only access through the holdability method
@@ -183,11 +183,11 @@ public abstract class ClientConnection
     // XA Host Type
     public int xaHostVersion_ = 0;
 
-    public int loginTimeout_;
+    private int loginTimeout_;
     public ClientBaseDataSourceRoot dataSource_;
     public String serverNameIP_;
     public int portNumber_;
-    public int clientSSLMode_ = ClientBaseDataSourceRoot.SSL_OFF;
+    private int clientSSLMode_ = ClientBaseDataSourceRoot.SSL_OFF;
 
     Hashtable<String, String> clientCursorNameCache_ =
             new Hashtable<String, String>();
@@ -225,7 +225,7 @@ public abstract class ClientConnection
     }
 
     // For jdbc 2 connections
-    protected void initConnection(
+    private void initConnection(
             LogWriter logWriter,
             ClientBaseDataSourceRoot dataSource)
             throws SqlException {
@@ -442,8 +442,7 @@ public abstract class ClientConnection
     }
 
     // For internal use only.  Use by updatable result set code.
-    synchronized
-        public ClientPreparedStatement preparePositionedUpdateStatement (
+    synchronized ClientPreparedStatement preparePositionedUpdateStatement (
             String sql,
             Section querySection) throws SqlException {
 
@@ -525,7 +524,7 @@ public abstract class ClientConnection
 
     }
 
-    synchronized public String nativeSQLX(String sql) throws SqlException {
+    synchronized String nativeSQLX(String sql) throws SqlException {
         checkForClosedConnection();
         if (sql == null) {
             throw new SqlException(agent_.logWriter_,
@@ -623,7 +622,8 @@ public abstract class ClientConnection
                 new ClientMessageId(SQLState.DRDA_INVALID_XA_STATE_ON_COMMIT_OR_ROLLBACK));
         }
     }
-    public void flowCommit() throws SqlException {
+
+    private void flowCommit() throws SqlException {
         // Per JDBC specification (see javadoc for Connection.commit()):
         //   "This method should be used only when auto-commit mode has been disabled."
         // However, some applications do this anyway, it is harmless, so
@@ -677,7 +677,7 @@ public abstract class ClientConnection
         }
     }
 
-    public void writeCommit() throws SqlException {
+    void writeCommit() throws SqlException {
         if (isXAConnection_) {
             writeXACommit_ ();
         } else {
@@ -692,7 +692,7 @@ public abstract class ClientConnection
         }
     }
 
-    public void readCommit() throws SqlException {
+    void readCommit() throws SqlException {
         if (isXAConnection_) {
             readXACommit_ ();
         } else {
@@ -750,7 +750,7 @@ public abstract class ClientConnection
         }
     }
 
-    public void writeRollback() throws SqlException {
+    private void writeRollback() throws SqlException {
         if (isXAConnection_) {
             writeXARollback_ ();
         } else {
@@ -758,7 +758,7 @@ public abstract class ClientConnection
         }
     }
 
-    public void readRollback() throws SqlException {
+    private void readRollback() throws SqlException {
         if (isXAConnection_) {
             readLocalXARollback_();
         } else {
@@ -912,7 +912,7 @@ public abstract class ClientConnection
 
     protected abstract void markClosed_();
 
-    public void markClosed(boolean statementPooling) // called by LogicalConnection.close()
+    private void markClosed(boolean statementPooling)
     {
         open_ = false;
         inUnitOfWork_ = false;
@@ -1333,7 +1333,7 @@ public abstract class ClientConnection
     }
 
     // An untraced version of clearWarnings()
-    public void clearWarningsX() throws SqlException {
+    private void clearWarningsX() throws SqlException {
         warnings_ = null;
         accumulated440ForMessageProcFailure_ = false;
         accumulated444ForMessageProcFailure_ = false;
@@ -1495,7 +1495,7 @@ public abstract class ClientConnection
         }
     }
 
-    synchronized public ClientCallableStatement prepareMessageProc(String sql)
+    synchronized ClientCallableStatement prepareMessageProc(String sql)
             throws SqlException {
         checkForClosedConnection();
 
@@ -1603,9 +1603,10 @@ public abstract class ClientConnection
         }
     }
 
-    public int dncGeneratedSavepointId_;
+    private int dncGeneratedSavepointId_;
     // generated name used internally for unnamed savepoints
-    public static final String dncGeneratedSavepointNamePrefix__ = "DNC_GENENERATED_NAME_";
+    private static final String
+            dncGeneratedSavepointNamePrefix__ = "DNC_GENENERATED_NAME_";
 
     synchronized public Savepoint setSavepoint() throws SQLException {
         try
@@ -2097,9 +2098,7 @@ public abstract class ClientConnection
 
     protected abstract boolean doCloseStatementsOnClose_();
 
-    public abstract SectionManager newSectionManager(String collection,
-                                                     Agent agent,
-                                                     String databaseName);
+    public abstract SectionManager newSectionManager(Agent agent);
     //--------------------Abstract material factory methods-----------------
 
     protected abstract Agent newAgent_(LogWriter logWriter, int loginTimeout, String serverName, int portNumber, int clientSSLMode) throws SqlException;
@@ -2158,9 +2157,8 @@ public abstract class ClientConnection
         databaseMetaData_ = newDatabaseMetaData_();
 
         agent_.sectionManager_ =
-                newSectionManager("NULLID",
-                        agent_,
-                        databaseName_);
+                newSectionManager(
+                        agent_);
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceConnectExit(this);
         }
@@ -2220,7 +2218,7 @@ public abstract class ClientConnection
      * @param uwl The UnitOfWorkLitener to be rolled back
      *
      */
-    public void completeSpecificRollback(UnitOfWorkListener uwl) {
+    private void completeSpecificRollback(UnitOfWorkListener uwl) {
         Set<UnitOfWorkListener> keySet = CommitAndRollbackListeners_.keySet();
         for (Iterator<UnitOfWorkListener> i = keySet.iterator(); i.hasNext();) {
             UnitOfWorkListener listener = i.next();
@@ -2341,8 +2339,6 @@ public abstract class ClientConnection
         currentSchemaName_ = pbSchema;
     }
 
-    public abstract void addSpecialRegisters(String s);
-
     // can this only be called by the PooledConnection
     // can this be called on a closed connection
     // can this be called in a unit of work
@@ -2477,7 +2473,7 @@ public abstract class ClientConnection
         xaState_ = state;
     }
 
-    public void accumulateWarning(SqlWarning e) {
+    private void accumulateWarning(SqlWarning e) {
         if (warnings_ == null) {
             warnings_ = e;
         } else {
@@ -2485,14 +2481,14 @@ public abstract class ClientConnection
         }
     }
 
-    public void accumulate440WarningForMessageProcFailure(SqlWarning e) {
+    void accumulate440WarningForMessageProcFailure(SqlWarning e) {
         if (!accumulated440ForMessageProcFailure_) {
             accumulateWarning(e);
             accumulated440ForMessageProcFailure_ = true;
         }
     }
 
-    public void accumulate444WarningForMessageProcFailure(SqlWarning e) {
+    void accumulate444WarningForMessageProcFailure(SqlWarning e) {
         if (!accumulated444ForMessageProcFailure_) {
             accumulateWarning(e);
             accumulated444ForMessageProcFailure_ = true;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientDatabaseMetaData.java Fri May  3 03:42:14 2013
@@ -56,7 +56,7 @@ public abstract class ClientDatabaseMeta
 
     //---------------------navigational members-----------------------------------
 
-    protected Agent agent_;
+    private Agent agent_;
     protected ClientConnection connection_;
 
     //-----------------------------state------------------------------------------
@@ -65,15 +65,13 @@ public abstract class ClientDatabaseMeta
     private Object[] metaDataInfoCache_ = new Object[numberOfMetaDataInfoMethods__];
     private boolean metaDataInfoIsCached_ = false;
 
-    public ProductLevel productLevel_;
+    ProductLevel productLevel_;
 
     /** The JDBC major version supported by the server. */
     private final int serverJdbcMajorVersion;
     /** The JDBC minor version supported by the server. */
     private final int serverJdbcMinorVersion;
 
-    public boolean useServerXAState_ = true;
-
     /** True if the server supports QRYCLSIMP. */
     private boolean supportsQryclsimp_;
     
@@ -2341,7 +2339,7 @@ public abstract class ClientDatabaseMeta
     // values. So, LEAVE INSTANCE VARIABLES UNINITIALIZED!
     //
     // END OF WARNING
-    protected void computeFeatureSet_() {
+    private void computeFeatureSet_() {
 
         // Support for QRYCLSIMP was added in 10.2.0
         if (productLevel_.greaterThanOrEqualTo(10, 2, 0)) {
@@ -2981,7 +2979,7 @@ public abstract class ClientDatabaseMeta
      * @exception SqlException if the server does not support the
      * specified JDBC version
      */
-    protected void checkServerJdbcVersionX(String method, int major, int minor)
+    private void checkServerJdbcVersionX(String method, int major, int minor)
         throws SqlException
     {
         if (serverJdbcMajorVersion < major ||

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientParameterMetaData.java Fri May  3 03:42:14 2013
@@ -33,7 +33,7 @@ import org.apache.derby.shared.common.re
 // and we won't have to wrap column meta data instances directly.
 
 public class ClientParameterMetaData implements ParameterMetaData {
-    ColumnMetaData columnMetaData_;
+    private ColumnMetaData columnMetaData_;
 
     public ClientParameterMetaData(ColumnMetaData columnMetaData) {
         columnMetaData_ = columnMetaData;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java Fri May  3 03:42:14 2013
@@ -63,16 +63,16 @@ public class ClientPreparedStatement ext
 
     //-----------------------------state------------------------------------------
 
-    public String sql_;
+    String sql_;
 
     // This variable is only used by Batch.
     // True if a call sql statement has an OUT or INOUT parameter registered.
-    public boolean outputRegistered_ = false;
+    boolean outputRegistered_ = false;
 
     // Parameter inputs are cached as objects so they may be sent on execute()
-    public Object[] parameters_;
+    Object[] parameters_;
 
-    boolean[] parameterSet_;
+    private boolean[] parameterSet_;
     boolean[] parameterRegistered_;
     
     void setInput(int parameterIndex, Object input) {
@@ -80,7 +80,7 @@ public class ClientPreparedStatement ext
         parameterSet_[parameterIndex - 1] = true;
     }
 
-    public ColumnMetaData parameterMetaData_; // type information for input sqlda
+    ColumnMetaData parameterMetaData_; // type information for input sqlda
     
     private ArrayList<int[]> parameterTypeList;
 
@@ -92,11 +92,11 @@ public class ClientPreparedStatement ext
     // gets repositioned.
     // So instead of caching the scrollableRS_, we will cache the cursorName.  And re-retrieve the scrollable
     // result set from the map using this cursorName every time the PreparedStatement excutes.
-    String positionedUpdateCursorName_ = null;
+    private String positionedUpdateCursorName_ = null;
     
     // the ClientPooledConnection object used to notify of the events that occur
     // on this prepared statement object
-    protected final ClientPooledConnection pooledConnection_;
+    private final ClientPooledConnection pooledConnection_;
 
 
     private void initPreparedStatement() {
@@ -183,7 +183,7 @@ public class ClientPreparedStatement ext
         pooledConnection_ = cpc;
     }
     
-    public void resetPreparedStatement(Agent agent,
+    private void resetPreparedStatement(Agent agent,
                                        ClientConnection connection,
                                        String sql,
                                        Section section) throws SqlException {
@@ -304,29 +304,6 @@ public class ClientPreparedStatement ext
         }
     }
 
-    public void resetPreparedStatement(Agent agent,
-                                       ClientConnection connection,
-                                       String sql,
-                                       Section section,
-                                       ColumnMetaData parameterMetaData,
-                                       ColumnMetaData resultSetMetaData) throws SqlException {
-        resetPreparedStatement(agent, connection, sql, section);
-        initPreparedStatement(parameterMetaData, resultSetMetaData);
-    }
-
-    private void initPreparedStatement(ColumnMetaData parameterMetaData,
-                                       ColumnMetaData resultSetMetaData) {
-        isPreparedStatement_ = true;
-        parameterMetaData_ = parameterMetaData;
-        resultSetMetaData_ = resultSetMetaData;
-        if (parameterMetaData_ != null) {
-            parameters_ = new Object[parameterMetaData_.columns_];
-            //parameterSetOrRegistered_ = new boolean[parameterMetaData_.columns_];
-            parameterSet_ = new boolean[parameterMetaData_.columns_];
-            parameterRegistered_ = new boolean[parameterMetaData_.columns_];
-        }
-    }
-
     // called immediately after the constructor by Connection prepare*() methods
     void prepare() throws SqlException {
         try {
@@ -959,8 +936,8 @@ public class ClientPreparedStatement ext
         }
     }
 
-    // also used by BLOB
-    public void setBytesX(int parameterIndex, byte[] x) throws SqlException {
+    // also used by CallableLocatorProcedures
+    void setBytesX(int parameterIndex, byte[] x) throws SqlException {
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] =
             Types.LONGVARBINARY;
 
@@ -1317,8 +1294,7 @@ public class ClientPreparedStatement ext
         }
     }
 
-    // also used by Blob
-    public void setBlobX(int parameterIndex, Blob x) throws SqlException {
+    private void setBlobX(int parameterIndex, Blob x) throws SqlException {
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] = Types.BLOB;
         if (x == null) {
             setNullX(parameterIndex, Types.BLOB);
@@ -1344,8 +1320,7 @@ public class ClientPreparedStatement ext
         }
     }
 
-    // also used by Clob
-    void setClobX(int parameterIndex, Clob x) throws SqlException {
+    private void setClobX(int parameterIndex, Clob x) throws SqlException {
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] = Types.CLOB;
         if (x == null) {
             this.setNullX(parameterIndex, ClientTypes.CLOB);
@@ -1796,7 +1771,10 @@ public class ClientPreparedStatement ext
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceEntry(this, "setURL", parameterIndex, x);
         }
-        jdbc3FeatureNotSupported(false);
+
+        throw new SqlException(agent_.logWriter_,
+                new ClientMessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED)).
+                getSQLException();
     }
 
     public ParameterMetaData getParameterMetaData() throws SQLException {
@@ -1837,7 +1815,7 @@ public class ClientPreparedStatement ext
 
     // ------------------------ box car and callback methods --------------------------------
 
-    public void writeExecute(Section section,
+    private void writeExecute(Section section,
                              ColumnMetaData parameterMetaData,
                              Object[] inputs,
                              int numInputColumns,
@@ -1857,7 +1835,7 @@ public class ClientPreparedStatement ext
     }
 
 
-    public void readExecute() throws SqlException {
+    private void readExecute() throws SqlException {
         materialPreparedStatement_.readExecute_();
     }
 
@@ -1875,11 +1853,11 @@ public class ClientPreparedStatement ext
                 inputs);
     }
 
-    public void writeDescribeInput(Section section) throws SqlException {
+    private void writeDescribeInput(Section section) throws SqlException {
         materialPreparedStatement_.writeDescribeInput_(section);
     }
 
-    public void readDescribeInput() throws SqlException {
+    private void readDescribeInput() throws SqlException {
         materialPreparedStatement_.readDescribeInput_();
     }
 
@@ -1910,14 +1888,6 @@ public class ClientPreparedStatement ext
         }
     }
 
-    public void writeDescribeOutput(Section section) throws SqlException {
-        materialPreparedStatement_.writeDescribeOutput_(section);
-    }
-
-    public void readDescribeOutput() throws SqlException {
-        materialPreparedStatement_.readDescribeOutput_();
-    }
-
     public void completeDescribeOutput(ColumnMetaData resultSetMetaData, Sqlca sqlca) {
         int sqlcode = super.completeSqlca(sqlca);
         if (sqlcode < 0) {
@@ -1929,19 +1899,19 @@ public class ClientPreparedStatement ext
         }
     }
 
-    void writePrepareDescribeInputOutput() throws SqlException {
+    private void writePrepareDescribeInputOutput() throws SqlException {
         // Notice that sql_ is passed in since in general ad hoc sql must be passed in for unprepared statements
         writePrepareDescribeOutput(sql_, section_);
         writeDescribeInput(section_);
     }
 
-    void readPrepareDescribeInputOutput() throws SqlException {
+    private void readPrepareDescribeInputOutput() throws SqlException {
         readPrepareDescribeOutput();
         readDescribeInput();
         completePrepareDescribe();
     }
 
-    void writePrepareDescribeInput() throws SqlException {
+    private void writePrepareDescribeInput() throws SqlException {
         // performance will be better if we flow prepare with output enable vs. prepare then describe input for callable
         // Notice that sql_ is passed in since in general ad hoc sql must be passed in for unprepared statements
         writePrepare(sql_, section_);
@@ -1954,7 +1924,7 @@ public class ClientPreparedStatement ext
         completePrepareDescribe();
     }
 
-    void completePrepareDescribe() {
+    private void completePrepareDescribe() {
         if (parameterMetaData_ == null) {
             return;
         }
@@ -1989,13 +1959,6 @@ public class ClientPreparedStatement ext
         return array;
     }
 
-    void writePrepareDescribeInputOutput(String sql,
-                                         Section section) throws SqlException {
-        // Notice that sql_ is passed in since in general ad hoc sql must be passed in for unprepared statements
-        writePrepareDescribeOutput(sql, section);
-        writeDescribeInput(section);
-    }
-
     void flowPrepareDescribeInputOutput() throws SqlException {
         agent_.beginWriteChain(this);
         if (sqlMode_ == isCall__) {
@@ -2235,7 +2198,7 @@ public class ClientPreparedStatement ext
             }
     }
 
-    public long[] executeBatchX(boolean supportsQueryBatchRequest) 
+    private long[] executeBatchX(boolean supportsQueryBatchRequest)
         throws SqlException, SQLException {
         synchronized (connection_) {
             checkForClosedStatement(); // Per jdbc spec (see Statement.close() javadoc)
@@ -2416,7 +2379,7 @@ public class ClientPreparedStatement ext
 
     //------------------material layer event callbacks follow-----------------------
 
-    boolean listenToUnitOfWork_ = false;
+    private boolean listenToUnitOfWork_ = false;
 
     public void listenToUnitOfWork() {
         if (!listenToUnitOfWork_) {
@@ -2488,45 +2451,6 @@ public class ClientPreparedStatement ext
         }
     }
 
-    void checkScaleForINOUTDecimal(int parameterIndex, int registerOutScale) throws SqlException {
-        BigDecimal decimalInput = (BigDecimal) parameters_[parameterIndex - 1];
-        if (decimalInput == null) {
-            return;
-        }
-        // if the register out scale is greater than input scale, input scale is stored in sqlScale_
-        if (registerOutScale > parameterMetaData_.sqlScale_[parameterIndex - 1]) {
-            int inputLength = decimalInput.toString().length();
-            int scaleDifference = registerOutScale - decimalInput.scale();
-            if (decimalInput.signum() == -1) {
-                inputLength--;
-            }
-            // if the new Decimal (with bigger scale) cannot fit into the DA
-            if ((32 - scaleDifference) < inputLength) {
-                // TODO - FINISH THIS
-                throw new SqlException(agent_.logWriter_, 
-                    new ClientMessageId(SQLState.REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER));
-            }
-            // if the new Decimal (with bigger scale) can fit
-            else {
-                parameters_[parameterIndex - 1] = decimalInput.setScale(registerOutScale);
-                parameterMetaData_.sqlScale_[parameterIndex - 1] = registerOutScale;
-            }
-        }
-        // if the register out sacle is smaller than input scale
-        else if (registerOutScale < parameterMetaData_.sqlScale_[parameterIndex - 1]) {
-            // remove 0's at the end of input
-            try {
-                // if the new Decimal (with smaller scale) can fit
-                parameters_[parameterIndex - 1] = decimalInput.setScale(registerOutScale);
-                parameterMetaData_.sqlScale_[parameterIndex - 1] = registerOutScale;
-            } catch (ArithmeticException e) {
-                // if the new Decimal (with smaller scale) cannot fit into the DA
-                throw new SqlException(agent_.logWriter_, 
-                    new ClientMessageId(SQLState.REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER));
-            }
-        }
-    }
-
     /* (non-Javadoc)
      * @see org.apache.derby.client.am.Statement#markClosed(boolean)
      */

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java Fri May  3 03:42:14 2013
@@ -73,7 +73,7 @@ public abstract class ClientResultSet im
     //   That is, the state data is set by the constructor and never changes.
 
     // Alias for statement_.connection
-    public final ClientConnection connection_;
+    private final ClientConnection connection_;
 
     //----------------------------- constants ------------------------------------
 
@@ -81,14 +81,14 @@ public abstract class ClientResultSet im
     public final static int scrollOrientation_absolute__ = 2;
     public final static int scrollOrientation_after__ = 3;
     public final static int scrollOrientation_before__ = 4;
-    public final static int scrollOrientation_prior__ = 5;
-    public final static int scrollOrientation_first__ = 6;
-    public final static int scrollOrientation_last__ = 7;
-    public final static int scrollOrientation_current__ = 8;
-    public final static int scrollOrientation_next__ = 0;
+    private final static int scrollOrientation_prior__ = 5;
+    private final static int scrollOrientation_first__ = 6;
+    private final static int scrollOrientation_last__ = 7;
+    private final static int scrollOrientation_current__ = 8;
+    private final static int scrollOrientation_next__ = 0;
 
-    public final static int updatability_unknown__ = 0;
-    public final static int updatability_readOnly__ = 1;
+    // public final static int updatability_unknown__ = 0;
+    // public final static int updatability_readOnly__ = 1;
     public final static int updatability_delete__ = 2;
     public final static int updatability_update__ = 4;
 
@@ -101,18 +101,11 @@ public abstract class ClientResultSet im
     static final private int WAS_NOT_NULL = 2;
     static final private int WAS_NULL_UNSET = 0;
 
-    static final public int NEXT_ROWSET = 1;
-    static final public int PREVIOUS_ROWSET = 2;
-    static final public int ABSOLUTE_ROWSET = 3;
-    static final public int FIRST_ROWSET = 4;
-    static final public int LAST_ROWSET = 5;
-    static final public int RELATIVE_ROWSET = 6;
-    static final public int REFRESH_ROWSET = 7;
     //  determines if a cursor is a:
     //    Return to Client - not to be read by the stored procedure only by client
     //    Return to Caller
-    public static final byte DDM_RETURN_CALLER = 0x01;
-    public static final byte DDM_RETURN_CLIENT = 0x02;
+    private static final byte DDM_RETURN_CALLER = 0x01;
+    private static final byte DDM_RETURN_CLIENT = 0x02;
 
     //-----------------------------state------------------------------------------
 
@@ -125,7 +118,7 @@ public abstract class ClientResultSet im
     //  determines if a cursor is a:
     //    Return to Client - not to be read by the stored procedure only by client
     //    Return to Caller - only calling JSP can read it, not the client
-    protected byte rsReturnability_ = DDM_RETURN_CLIENT;
+    private byte rsReturnability_ = DDM_RETURN_CLIENT;
 
     // This means the client-side jdbc result set object is open.
     boolean openOnClient_ = true;
@@ -145,7 +138,7 @@ public abstract class ClientResultSet im
     // Before the first call to next() or any cursor positioning method, the cursor position is invalid
     // and getter methods cannot be called.
     // Also, if a cursor is exhausted (+100), the cursor position is invalid.
-    public boolean isValidCursorPosition_ = false;
+    private boolean isValidCursorPosition_ = false;
 
     public boolean cursorHold_;
 
@@ -155,16 +148,15 @@ public abstract class ClientResultSet im
     public long queryInstanceIdentifier_ = 0;
 
     public int resultSetType_;
-    public int resultSetConcurrency_;
-    public int resultSetHoldability_;
+    int resultSetConcurrency_;
+    int resultSetHoldability_;
     public boolean scrollable_ = false;
     public int sensitivity_;
     public boolean isRowsetCursor_ = false;
-    public boolean isBeforeFirst_ = true;
-    public boolean isAfterLast_ = false;
-    public boolean isFirst_ = false;
-    public boolean isLast_ = false;
-    public boolean rowsetContainsLastRow_ = false;
+    private boolean isBeforeFirst_ = true;
+    private boolean isAfterLast_ = false;
+    private boolean isFirst_ = false;
+    private boolean isLast_ = false;
     public Sqlca[] rowsetSqlca_;
 
     // Gets its initial value from the statement when the result set is created.
@@ -175,19 +167,20 @@ public abstract class ClientResultSet im
     // type, scrollability and presence of lobs.
     public int fetchSize_;
 
-    public int fetchDirection_;
+    private int fetchDirection_;
 
-    public long rowCount_ = -1;
+    private long rowCount_ = -1;
 
-    protected long absolutePosition_ = 0;       // absolute position of the current row
-    protected long firstRowInRowset_ = 0;       // absolute position of the first row in the current rowset
-    protected long lastRowInRowset_ = 0;        // absolute position of the last row in the current rowset
-    protected long currentRowInRowset_ = -1;     // relative position to the first row in the current rowsetwel
-
-    protected long absoluteRowNumberForTheIntendedRow_;
+    private long absolutePosition_ = 0; // absolute position of the current row
+    private long firstRowInRowset_ = 0; // absolute position of the first row
+                                        // in the current rowset
+    private long lastRowInRowset_ = 0;  // absolute position of the last row in
+                                        // the current rowset
+    private long currentRowInRowset_ = -1; // relative position to the first
+                                           // row in the current rowsetwel
 
     private boolean isOnInsertRow_ = false;  // reserved for later
-    protected boolean isOnCurrentRow_ = true;
+    private boolean isOnCurrentRow_ = true;
     public int rowsReceivedInCurrentRowset_ = 0;  // keep track of the number of rows received in the
     // current rowset so far
 
@@ -213,13 +206,10 @@ public abstract class ClientResultSet im
     private ClientPreparedStatement preparedStatementForDelete_;
     private ClientPreparedStatement preparedStatementForInsert_;
 
-    // Nesting level of the result set in a stored procedure
-    public int nestingLevel_ = -1;
-
     // Whenever a commit occurs, it unpositions the cursor on the server.  We need to
     // reposition the cursor before updating/deleting again.  This flag will be set to true
     // whenever a commit happens, and reset to false again after we repositoin the cursor.
-    public boolean cursorUnpositionedOnServer_ = false;
+    private boolean cursorUnpositionedOnServer_ = false;
     
     // Keep maxRows in the ResultSet, so that changes to maxRow in the statement
     // do not affect the resultSet after it has been created
@@ -1941,7 +1931,7 @@ public abstract class ClientResultSet im
     }
 
     // An untraced version of clearWarnings()
-    public final void clearWarningsX() {
+    private void clearWarningsX() {
         warnings_ = null;
     }
 
@@ -2422,7 +2412,7 @@ public abstract class ClientResultSet im
         }
     }
 
-    public boolean absoluteX(int row) throws SqlException {
+    private boolean absoluteX(int row) throws SqlException {
         checkForClosedResultSet("absolute");
         checkThatResultSetTypeIsScrollable();
         clearWarningsX();
@@ -4040,7 +4030,8 @@ public abstract class ClientResultSet im
         throw jdbc3MethodNotSupported();
     }
 
-    public boolean repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete() throws SqlException {
+    boolean repositionScrollableResultSetBeforeJDBC1PositionedUpdateDelete()
+            throws SqlException {
         boolean repositionedCursor = false;
 
         // calculate the absolutePosition of the current row directly.
@@ -4059,7 +4050,7 @@ public abstract class ClientResultSet im
     }
     //--------------------categorize the methods below -----------------
 
-    public void flowPositioningFetch(int scrollOrientation,
+    private void flowPositioningFetch(int scrollOrientation,
                                      int rowToFetch) throws DisconnectException {
         // need the try-catch block here because agent_.beginWriteChain throws
         // an SqlException
@@ -4078,7 +4069,7 @@ public abstract class ClientResultSet im
         }
     }
 
-    protected void positionToCurrentRowAndUpdate() throws SqlException {
+    private void positionToCurrentRowAndUpdate() throws SqlException {
         agent_.beginWriteChain(statement_);
 
         // calculate the position of the current row relative to the absolute position on server
@@ -4130,7 +4121,7 @@ public abstract class ClientResultSet im
         agent_.endReadChain();
     }
 
-    protected void insert() throws SqlException {
+    private void insert() throws SqlException {
         agent_.beginWriteChain(statement_);
 
         // re-prepare the insert statement if repreparing is needed after a commit.
@@ -4159,7 +4150,7 @@ public abstract class ClientResultSet im
      }    
 
     
-    protected void update() throws SqlException {
+    private void update() throws SqlException {
         agent_.beginWriteChain(statement_);
 
         // re-prepare the update statement if repreparing is needed after a commit.
@@ -4201,7 +4192,7 @@ public abstract class ClientResultSet im
         agent_.endReadChain();
     }
 
-    protected void positionToCurrentRowAndDelete() throws SqlException {
+    private void positionToCurrentRowAndDelete() throws SqlException {
         agent_.beginWriteChain(statement_);
 
         // calculate the position of the current row relative to the absolute position on server
@@ -4251,7 +4242,7 @@ public abstract class ClientResultSet im
         agent_.endReadChain();
     }
 
-    protected void delete() throws SqlException {
+    private void delete() throws SqlException {
         try
         {
             agent_.beginWriteChain(statement_);
@@ -4292,7 +4283,7 @@ public abstract class ClientResultSet im
 
     // Resets all rowset related flags.
     // Called by getRowSet() from material layer.
-    public void setRowsetAfterLastEvent() throws SqlException {
+    private void setRowsetAfterLastEvent() throws SqlException {
         firstRowInRowset_ = 0;
         lastRowInRowset_ = 0;
         absolutePosition_ = (maxRows_ == 0) ? rowCount_ + 1 : maxRows_ + 1;
@@ -4300,7 +4291,7 @@ public abstract class ClientResultSet im
         rowsReceivedInCurrentRowset_ = 0;
     }
 
-    public void setRowsetBeforeFirstEvent() throws SqlException {
+    private void setRowsetBeforeFirstEvent() throws SqlException {
         firstRowInRowset_ = 0;
         lastRowInRowset_ = 0;
         absolutePosition_ = 0;
@@ -4308,7 +4299,7 @@ public abstract class ClientResultSet im
         rowsReceivedInCurrentRowset_ = 0;
     }
 
-    public void setRowsetNoRowsEvent() {
+    private void setRowsetNoRowsEvent() {
         rowCount_ = 0;
         firstRowInRowset_ = 0;
         lastRowInRowset_ = 0;
@@ -4329,28 +4320,17 @@ public abstract class ClientResultSet im
         isValidCursorPosition_ = isValidCursorPosition;
     }
 
-    protected void moveToAfterLast() throws DisconnectException {
+    private void moveToAfterLast() throws DisconnectException {
         flowPositioningFetch(ClientResultSet.scrollOrientation_after__, 0);
     }
 
     // Positions the cursor at before the first row.
-    protected void moveToBeforeFirst() throws DisconnectException {
+    private void moveToBeforeFirst() throws DisconnectException {
         flowPositioningFetch(ClientResultSet.scrollOrientation_before__, 0);
     }
 
-    // analyze the error handling here, and whether or not can be pushed to common
-    // can we make this the common layer fetch method
-    // Called by the read/skip Fdoca bytes methods in the net
-    // whenever data reads exhaust the internal buffer used by this reply
-    public void flowFetch() throws DisconnectException, SqlException {
-        agent_.beginWriteChain(statement_);
-        writeFetch_((generatedSection_ == null) ? statement_.section_ : generatedSection_);
-        agent_.flow(statement_);
-        readFetch_();
-        agent_.endReadChain();
-    }
-
-    public void writeInsertRow(boolean chainedWritesFollowingSetLob) throws SQLException {
+    private void writeInsertRow(boolean chainedWritesFollowingSetLob)
+            throws SQLException {
         try
         {
             preparedStatementForInsert_.materialPreparedStatement_.writeExecute_(
@@ -4368,7 +4348,8 @@ public abstract class ClientResultSet im
         }
     }
     
-    public void writeUpdateRow(boolean chainedWritesFollowingSetLob) throws SQLException {
+    private void writeUpdateRow(boolean chainedWritesFollowingSetLob)
+            throws SQLException {
         try
         {
             preparedStatementForUpdate_.materialPreparedStatement_.writeExecute_(preparedStatementForUpdate_.section_,
@@ -4384,7 +4365,7 @@ public abstract class ClientResultSet im
         }
     }
 
-    public void writeDeleteRow() throws SQLException {
+    private void writeDeleteRow() throws SQLException {
         try
         {
             if (isRowsetCursor_) {
@@ -4409,23 +4390,23 @@ public abstract class ClientResultSet im
         }
     }
 
-    public void readInsertRow() throws DisconnectException, SqlException {
+    private void readInsertRow() throws DisconnectException, SqlException {
         preparedStatementForInsert_.materialPreparedStatement_.readExecute_();
     }
 
-    public void readUpdateRow() throws DisconnectException, SqlException {
+    private void readUpdateRow() throws DisconnectException, SqlException {
         preparedStatementForUpdate_.materialPreparedStatement_.readExecute_();
         accumulateWarning(preparedStatementForUpdate_.getSqlWarnings());
     }
 
-    public void readDeleteRow() throws DisconnectException, SqlException {
+    private void readDeleteRow() throws DisconnectException, SqlException {
         preparedStatementForDelete_.materialPreparedStatement_.readExecute_();
         accumulateWarning(preparedStatementForDelete_.getSqlWarnings());
     }
 
     //------------------material layer event callback methods-----------------------
 
-    boolean listenToUnitOfWork_ = false;
+    private boolean listenToUnitOfWork_ = false;
 
     public void listenToUnitOfWork() {
         if (!listenToUnitOfWork_) {
@@ -4557,7 +4538,7 @@ public abstract class ClientResultSet im
     }
 
     //-------------------------------helper methods-------------------------------
-    protected boolean rowCountIsUnknown() {
+    boolean rowCountIsUnknown() {
         if (sensitivity_ == sensitivity_sensitive_dynamic__) {
             return false;
         } else {
@@ -4565,10 +4546,6 @@ public abstract class ClientResultSet im
         }
     }
 
-    protected boolean rowCountIsKnown() {
-        return rowCount_ != -1;
-    }
-
     private void updateColumn(int column, Object value) {
         if (updatedColumns_ == null) {
             updatedColumns_ = new Object[resultSetMetaData_.columns_];
@@ -4807,7 +4784,7 @@ public abstract class ClientResultSet im
                 new ClientMessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
     }
 
-    final void checkForValidColumnIndex(int column) throws SqlException {
+    private void checkForValidColumnIndex(int column) throws SqlException {
         if (column < 1 || column > resultSetMetaData_.columns_) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.LANG_INVALID_COLUMN_POSITION),
@@ -4932,7 +4909,7 @@ public abstract class ClientResultSet im
         }
     }
 
-    protected void updateColumnInfoFromCache() {
+    private void updateColumnInfoFromCache() {
         // currentRowInRowset_ should never be bigger than the max value of an int,
         // because we have a driver imposed limit of fetch size 1000.
         cursor_.columnDataPosition_ =
@@ -4966,7 +4943,7 @@ public abstract class ClientResultSet im
         }
     }
 
-    public void parseScrollableRowset() throws SqlException {
+    void parseScrollableRowset() throws SqlException {
         // modified check from qrydtaReturned to cursor.dataBufferHasUnprocesseData()
         if (cursor_.dataBufferHasUnprocessedData() && scrollable_) {
             parseRowset_();
@@ -5561,7 +5538,7 @@ public abstract class ClientResultSet im
      * @param columnIndex 1-based column index
      * @throws SQLException if the column has already been accessed
      */
-    void useStreamOrLOB(int columnIndex) throws SqlException {
+    private void useStreamOrLOB(int columnIndex) throws SqlException {
         checkLOBMultiCall(columnIndex);
         columnUsedFlags_[columnIndex - 1] = true;
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientSavepoint.java Fri May  3 03:42:14 2013
@@ -26,11 +26,11 @@ import org.apache.derby.shared.common.re
 import java.sql.SQLException;
 import java.sql.Savepoint;
 
-public class ClientSavepoint implements Savepoint {
+class ClientSavepoint implements Savepoint {
     // ----------------- internals -----------------------------------------------
 
-    int savepointId_ = 0;
-    String savepointName_ = null;
+    private int savepointId_ = 0;
+    private String savepointName_ = null;
     Agent agent_;
 
     //---------------------constructors/finalizer---------------------------------