Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37686F77E for ; Fri, 3 May 2013 03:43:15 +0000 (UTC) Received: (qmail 59737 invoked by uid 500); 3 May 2013 03:43:15 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 59703 invoked by uid 500); 3 May 2013 03:43:14 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 59691 invoked by uid 99); 3 May 2013 03:43:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 03:43:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 03:43:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F35442388ABA; Fri, 3 May 2013 03:42:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1478635 [5/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... Date: Fri, 03 May 2013 03:42:16 -0000 To: derby-commits@db.apache.org From: dag@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130503034237.F35442388ABA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java Fri May 3 03:42:14 2013 @@ -59,67 +59,44 @@ import org.apache.derby.client.am.XaExce import org.apache.derby.shared.common.reference.SQLState; public class NetXAResource implements XAResource { - public static final int TMTIMEOUT = 0x00000100; - public static final int ACTIVE_ONLY = -1; - public static final int XA_NULL_XID = -1; // null Xid has Format Id of -1 - public static final int INITIAL_CALLINFO_ELEMENTS = 1; - public static final int RECOVER_XID_ARRAY_LENGTH = 10; - public static final ClientXid nullXid = new ClientXid(); + private static final int INITIAL_CALLINFO_ELEMENTS = 1; + static final ClientXid nullXid = new ClientXid(); // xaFunction defines, shows which queued XA function is being performed - public static final int XAFUNC_NONE = 0; - public static final int XAFUNC_COMMIT = 1; - public static final int XAFUNC_END = 2; - public static final int XAFUNC_FORGET = 3; - public static final int XAFUNC_PREPARE = 4; - public static final int XAFUNC_RECOVER = 5; - public static final int XAFUNC_ROLLBACK = 6; - public static final int XAFUNC_START = 7; - public static final String XAFUNCSTR_NONE = "No XA Function"; - public static final String XAFUNCSTR_COMMIT = "XAResource.commit()"; - public static final String XAFUNCSTR_END = "XAResource.end()"; - public static final String XAFUNCSTR_FORGET = "XAResource.forget()"; - public static final String XAFUNCSTR_PREPARE = "XAResource.prepare()"; - public static final String XAFUNCSTR_RECOVER = "XAResource.recover()"; - public static final String XAFUNCSTR_ROLLBACK = "XAResource.rollback()"; - public static final String XAFUNCSTR_START = "XAResource.start()"; + static final int XAFUNC_COMMIT = 1; + private static final int XAFUNC_END = 2; + private static final int XAFUNC_FORGET = 3; + private static final int XAFUNC_PREPARE = 4; + private static final int XAFUNC_RECOVER = 5; + static final int XAFUNC_ROLLBACK = 6; + private static final int XAFUNC_START = 7; + + private static final String XAFUNCSTR_NONE = "No XA Function"; + private static final String XAFUNCSTR_COMMIT = "XAResource.commit()"; + private static final String XAFUNCSTR_END = "XAResource.end()"; + private static final String XAFUNCSTR_FORGET = "XAResource.forget()"; + private static final String XAFUNCSTR_PREPARE = "XAResource.prepare()"; + private static final String XAFUNCSTR_RECOVER = "XAResource.recover()"; + private static final String XAFUNCSTR_ROLLBACK = "XAResource.rollback()"; + private static final String XAFUNCSTR_START = "XAResource.start()"; - public SqlException exceptionsOnXA = null; + SqlException exceptionsOnXA = null; - XAConnection xaconn_; NetXAConnection netXAConn_; NetConnection conn_; private boolean keepIsolationLevel; - int rmId_; // unique RmId generated by XAConnection + // TODO: change to a single callInfo field (not an array) NetXACallInfo callInfoArray_[] = new NetXACallInfo[INITIAL_CALLINFO_ELEMENTS]; - int numXACallInfo_ = INITIAL_CALLINFO_ELEMENTS; - int connectionCount_ = 1; - int activeXATransCount_ = 0; - String rmIdx_; // userid in case we need to create a secondary connection - String rmIdy_; // password in case we need to create a secondary connection - // TODO: remove port and ipaddr_ - int port_; // port needed to make secondary connection for recover in DS mode. - String ipaddr_; // ip address needed to make secondary connection for recover in DS mode. - - private final List specialRegisters_ = - Collections.synchronizedList(new LinkedList()); /** The value of the transaction timeout in seconds. */ private int timeoutSeconds = 0; - public NetXAResource(XAConnection xaconn, int rmId, - String userId, String password, + public NetXAResource(XAConnection xaconn, NetXAConnection conn) { - xaconn_ = xaconn; - rmId_ = rmId; conn_ = conn.getNetConnection(); netXAConn_ = conn; - rmIdx_ = userId; - rmIdy_ = password; - port_ = conn_.netAgent_.getPort(); - ipaddr_ = conn_.netAgent_.socket_.getLocalAddress().getHostAddress(); conn.setNetXAResource(this); // link the primary connection to the first XACallInfo element @@ -127,15 +104,13 @@ public class NetXAResource implements XA // construct the NetXACallInfo object for the array. for (int i = 0; i < INITIAL_CALLINFO_ELEMENTS; ++i) { - callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, this, + callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, null); } // initialize the first XACallInfo element with the information from the // primary connection callInfoArray_[0].actualConn_ = conn; - callInfoArray_[0].currConnection_ = true; - callInfoArray_[0].freeEntry_ = false; // ~~~ save conn_ connection variables in callInfoArray_[0] callInfoArray_[0].saveConnectionVariables(); } @@ -157,7 +132,6 @@ public class NetXAResource implements XA callInfo.xaFlags_ = (onePhase ? XAResource.TMONEPHASE : XAResource.TMNOFLAGS); callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { netAgent.beginWriteChainOutsideUOW(); @@ -173,11 +147,9 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } if (rc != XAResource.XA_OK) { - throwXAException(rc, false); + throwXAException(rc); } } @@ -232,17 +204,15 @@ public class NetXAResource implements XA } NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; - callInfo.setReadOnlyTransactionFlag(conn_.readOnlyTransaction_); callInfo.xaFlags_ = flags; callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { netAgent.beginWriteChainOutsideUOW(); netAgent.netConnectionRequest_.writeXaEndUnitOfWork(conn_); netAgent.flowOutsideUOW(); rc = netAgent.netConnectionReply_.readXaEndUnitOfWork(conn_); - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending end + if (callInfo.xaRetVal_ != XAResource.XA_OK) { // xaRetVal has possible error, format it callInfo.xaFunction_ = XAFUNC_END; rc = xaRetValErrorAccumSQL(callInfo, rc); @@ -252,15 +222,14 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if (rc != XAResource.XA_OK) { // The corresponding XA connection association state // is changed by setXaStateForXAException inside the call // to throwXAException according the error code of the XAException // to be thrown. - throwXAException(rc, false); + throwXAException(rc); }else { conn_.setXAState(ClientConnection.XA_T0_NOT_ASSOCIATED); } @@ -288,7 +257,6 @@ public class NetXAResource implements XA } NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { // flow the required PROTOCOL to the server @@ -311,11 +279,10 @@ public class NetXAResource implements XA } catch (SqlException sqle) { exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); throwXAException(getSqlExceptionXAErrorCode(sqle)); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if (rc != XAResource.XA_OK) { - throwXAException(rc, false); + throwXAException(rc); } } @@ -372,7 +339,6 @@ public class NetXAResource implements XA int rc = XAResource.XA_OK; NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { netAgent.beginWriteChainOutsideUOW(); @@ -393,11 +359,10 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if ((rc != XAResource.XA_OK ) && (rc != XAResource.XA_RDONLY)) { - throwXAException(rc, false); + throwXAException(rc); } if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceExit(this, "prepare", rc); @@ -436,7 +401,6 @@ public class NetXAResource implements XA NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; callInfo.xaFlags_ = flag; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { netAgent.beginWriteChainOutsideUOW(); @@ -455,11 +419,10 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if (rc != XAResource.XA_OK) { - throwXAException(rc, false); + throwXAException(rc); } if (conn_.agent_.loggingEnabled()) { @@ -490,7 +453,6 @@ public class NetXAResource implements XA // update the XACallInfo NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL try { netAgent.beginWriteChainOutsideUOW(); @@ -507,11 +469,10 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if (rc != XAResource.XA_OK) { - throwXAException(rc, false); + throwXAException(rc); } } @@ -593,9 +554,7 @@ public class NetXAResource implements XA // update the XACallInfo NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; callInfo.xaFlags_ = flags; - callInfo.xaInProgress_ = true; callInfo.xid_ = xid; - callInfo.xaResource_ = this; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL // check and setup the transaction timeout settings @@ -636,19 +595,13 @@ public class NetXAResource implements XA } catch (SqlException sqle) { rc = getSqlExceptionXAErrorCode(sqle); exceptionsOnXA = Utils.accumulateSQLException(sqle, exceptionsOnXA); - } finally { - conn_.pendingEndXACallinfoOffset_ = -1; // indicate no pending callinfo } + if (rc != XAResource.XA_OK) { - throwXAException(rc, false); + throwXAException(rc); } } - - protected void throwXAException(int rc) throws XAException { - throwXAException(rc, rc != XAException.XAER_NOTA); - } - private String getXAExceptionText(int rc) { String xaExceptionText; switch (rc) { @@ -731,14 +684,10 @@ public class NetXAResource implements XA return xaExceptionText; } - protected void throwXAException(int rc, boolean resetFlag) throws XAException { // ~~~ - StringBuffer xaExceptionText = new StringBuffer(64); - if (resetFlag) { - // reset the state of the failed connection - NetXACallInfo callInfo = callInfoArray_[conn_.currXACallInfoOffset_]; - callInfo.xaInProgress_ = false; - callInfo.xaWasSuspended = false; - } + private void throwXAException(int rc) + throws XAException { + + StringBuilder xaExceptionText = new StringBuilder(64); xaExceptionText.append(getXAExceptionText(rc)); // save the SqlException chain to add it to the XAException @@ -763,7 +712,7 @@ public class NetXAResource implements XA /** * Reset the transaction branch association state to XA_T0_NOT_ASSOCIATED - * for XAER_RM* and XA_RB* Exceptions. All other exeptions leave the state + * for XAER_RM* and XA_RB* Exceptions. All other exceptions leave the state * unchanged * * @param rc // return code from XAException @@ -894,26 +843,6 @@ public class NetXAResource implements XA } - public List getSpecialRegisters() { - return specialRegisters_; - } - - public void addSpecialRegisters(String s) { - if (s.substring(0, 1).equals("@")) { - // SET statement is coming from Client - if (specialRegisters_.remove(s.substring(1))) { - specialRegisters_.remove(s); - specialRegisters_.add(s.substring(1)); - } else { - specialRegisters_.remove(s); - specialRegisters_.add(s); - } - } else { // SET statement is coming from Server - specialRegisters_.remove(s); - specialRegisters_.add(s); - } - } - private void connectionClosedFailure() throws XAException { // throw an XAException XAER_RMFAIL, with a chained SqlException - closed exceptionsOnXA = Utils.accumulateSQLException (new SqlException(null, Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/OpenSocketAction.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/OpenSocketAction.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/OpenSocketAction.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/OpenSocketAction.java Fri May 3 03:42:14 2013 @@ -35,12 +35,12 @@ import javax.net.SocketFactory; import javax.net.ssl.SSLSocketFactory; import org.apache.derby.jdbc.ClientBaseDataSourceRoot; -public class OpenSocketAction implements PrivilegedExceptionAction { +class OpenSocketAction implements PrivilegedExceptionAction { private String server_; private int port_; private int clientSSLMode_; - public OpenSocketAction(String server, int port, int clientSSLMode) { + OpenSocketAction(String server, int port, int clientSSLMode) { server_ = server; port_ = port; clientSSLMode_ = clientSSLMode; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/PublicBufferOutputStream.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/PublicBufferOutputStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/PublicBufferOutputStream.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/PublicBufferOutputStream.java Fri May 3 03:42:14 2013 @@ -25,9 +25,9 @@ import java.io.ByteArrayOutputStream; /** * A ByteArrayOutputStream which gives a direct reference of the buffer array */ -public class PublicBufferOutputStream extends ByteArrayOutputStream { +class PublicBufferOutputStream extends ByteArrayOutputStream { - public PublicBufferOutputStream() { + PublicBufferOutputStream() { super(); } Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java Fri May 3 03:42:14 2013 @@ -31,13 +31,12 @@ import org.apache.derby.client.am.Agent; import org.apache.derby.client.am.SignedBinary; import org.apache.derby.client.am.SqlException; import org.apache.derby.client.am.DisconnectException; -import org.apache.derby.client.am.SqlState; import org.apache.derby.client.am.ClientMessageId; import org.apache.derby.shared.common.reference.SQLState; import org.apache.derby.shared.common.reference.MessageId; -public class Reply { +class Reply { protected Agent agent_; protected NetAgent netAgent_; //cheat-link to (NetAgent) agent_ @@ -59,18 +58,17 @@ public class Reply { protected int longCountForDecryption_ = 0; protected int dssLength_; - protected boolean dssIsContinued_; + private boolean dssIsContinued_; private boolean dssIsChainedWithSameID_; - private boolean dssIsChainedWithDiffID_; - protected int dssCorrelationID_; + private int dssCorrelationID_; protected int peekedLength_ = 0; - protected int peekedCodePoint_ = END_OF_COLLECTION; // saves the peeked codept + private int peekedCodePoint_ = END_OF_COLLECTION; // saves the peeked codept private int peekedNumOfExtendedLenBytes_ = 0; private int currentPos_ = 0; - public final static int END_OF_COLLECTION = -1; - public final static int END_OF_SAME_ID_CHAIN = -2; + final static int END_OF_COLLECTION = -1; + final static int END_OF_SAME_ID_CHAIN = -2; Reply(NetAgent netAgent, int bufferSize) { buffer_ = new byte[bufferSize]; @@ -88,7 +86,6 @@ public class Reply { dssLength_ = 0; dssIsContinued_ = false; dssIsChainedWithSameID_ = false; - dssIsChainedWithDiffID_ = false; dssCorrelationID_ = 1; } @@ -100,7 +97,7 @@ public class Reply { // wherever they are in the current buffer to the beginning of // different buffer (note these buffers could be the same). // State information is updated as needed after the shift. - private final void shiftBuffer(byte[] destinationBuffer) { + private void shiftBuffer(byte[] destinationBuffer) { // calculate the size of the data in the current buffer. int sz = count_ - pos_; @@ -123,7 +120,7 @@ public class Reply { // as much room as possible in the buffer before trying to // do the read. The idea is to try to have space to get as much data as possible // if we need to do a read on the socket's stream. - protected final void ensureSpaceInBufferForFill(int desiredSpace) { + private void ensureSpaceInBufferForFill(int desiredSpace) { // calculate the total unused space in the buffer. // this includes any space at the end of the buffer and any free // space at the beginning resulting from bytes already read. @@ -160,7 +157,7 @@ public class Reply { // from the underlying stream. This method will keep trying to // read bytes until it has obtained at least the minimum number. // Now returns the total bytes read for decryption, use to return void. - protected int fill(int minimumBytesNeeded) throws DisconnectException { + private int fill(int minimumBytesNeeded) throws DisconnectException { // make sure that there is enough space in the buffer to hold // the minimum number of bytes needed. ensureSpaceInBufferForFill(minimumBytesNeeded); @@ -208,7 +205,8 @@ public class Reply { // Make sure a certain amount of Layer A data is in the buffer. // The data will be in the buffer after this method is called. // Now returns the total bytes read for decryption, use to return void. - protected final int ensureALayerDataInBuffer(int desiredDataSize) throws DisconnectException { + private int ensureALayerDataInBuffer(int desiredDataSize) + throws DisconnectException { int totalBytesRead = 0; // calulate the the number of bytes in the buffer. int avail = count_ - pos_; @@ -238,7 +236,8 @@ public class Reply { // big stuff returned from the server (qrydta's for example) by // copying out the data into some other storage. any extended dss header // info will be removed in the copying process. - private final void compressBLayerData(int continueDssHeaderCount) throws DisconnectException { + private void compressBLayerData(int continueDssHeaderCount) + throws DisconnectException { int tempPos = 0; // jump to the last continuation header. @@ -257,8 +256,8 @@ public class Reply { // read out the continuation header and increment the dss length by the // size of the conitnation bytes, then shift the continuation data as needed. int shiftSize = 0; - int bytesToShift = 0; - int continueHeaderLength = 0; + int bytesToShift; + int continueHeaderLength; int newDssLength = 0; for (int i = 0; i < continueDssHeaderCount; i++) { @@ -314,9 +313,9 @@ public class Reply { dssLength_ = dssLength_ + newDssLength; } - protected final void readDssHeader() throws DisconnectException { - int correlationID = 0; - int nextCorrelationID = 0; + private void readDssHeader() throws DisconnectException { + int correlationID; + int nextCorrelationID; ensureALayerDataInBuffer(6); // read out the dss length @@ -358,11 +357,9 @@ public class Reply { if ((gdsFormatter & 0x40) == 0x40) { // on indicates structure chained to next structure if ((gdsFormatter & 0x10) == 0x10) { dssIsChainedWithSameID_ = true; - dssIsChainedWithDiffID_ = false; nextCorrelationID = dssCorrelationID_; } else { dssIsChainedWithSameID_ = false; - dssIsChainedWithDiffID_ = true; nextCorrelationID = dssCorrelationID_ + 1; } } else { @@ -377,7 +374,6 @@ public class Reply { } dssIsChainedWithSameID_ = false; - dssIsChainedWithDiffID_ = false; nextCorrelationID = 1; } @@ -402,7 +398,8 @@ public class Reply { } - private final void decryptData(int gdsFormatter, int oldDssLength) throws DisconnectException { + private void decryptData(int gdsFormatter, int oldDssLength) + throws DisconnectException { boolean readHeader; if (dssLength_ == 32761) { @@ -607,29 +604,6 @@ public class Reply { return i; } - final void readIntArray(int[] array) throws DisconnectException { - ensureBLayerDataInBuffer(array.length * 4); - adjustLengths(array.length * 4); - - for (int i = 0; i < array.length; i++) { - array[i] = SignedBinary.getInt(buffer_, pos_); - pos_ += 4; - } - } - - - final long readLong() throws DisconnectException { - // should we be checking dss lengths and ddmScalarLengths here - ensureBLayerDataInBuffer(8); - adjustLengths(8); - long l = SignedBinary.getLong(buffer_, pos_); - - pos_ += 8; - - return l; - } - - final int[] readUnsignedShortList() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); @@ -658,22 +632,6 @@ public class Reply { return (byte) (buffer_[pos_++] & 0xff); } - final boolean readBoolean() throws DisconnectException { - ensureBLayerDataInBuffer(1); - adjustLengths(1); - return buffer_[pos_++] != 0; - } - - final String readString(int length) throws DisconnectException { - ensureBLayerDataInBuffer(length); - adjustLengths(length); - - String result = netAgent_.getCurrentCcsidManager() - .convertToJavaString(buffer_, pos_, length); - pos_ += length; - return result; - } - final String readString(int length, String encoding) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); @@ -723,24 +681,6 @@ public class Reply { return b; } - final byte[] readLDBytes() throws DisconnectException { - ensureBLayerDataInBuffer(2); - int len = ((buffer_[pos_++] & 0xff) << 8) + ((buffer_[pos_++] & 0xff) << 0); - - if (len == 0) { - adjustLengths(2); - return null; - } - - ensureBLayerDataInBuffer(len); - adjustLengths(len + 2); - - byte[] b = new byte[len]; - System.arraycopy(buffer_, pos_, b, 0, len); - pos_ += len; - return b; - } - final void skipBytes(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); @@ -808,7 +748,7 @@ public class Reply { // post: dssIsContinued_ is set to true if the continuation bit is on, false otherwise // dssLength_ is set to DssConstants.MAX_DSS_LEN - 2 (don't count the header for the next read) // helper method for getEXTDTAData - protected final void readDSSContinuationHeader() throws DisconnectException { + private void readDSSContinuationHeader() throws DisconnectException { ensureALayerDataInBuffer(2); dssLength_ = @@ -1039,13 +979,6 @@ public class Reply { return peekedCodePoint_; } - // Read out the 2-byte length without moving the pos_ pointer. - protected final int peekLength() throws DisconnectException { - ensureBLayerDataInBuffer(2); - return (((buffer_[pos_] & 0xff) << 8) + - ((buffer_[pos_ + 1] & 0xff) << 0)); - } - // Read "length" number of bytes from the buffer into the byte array b starting from offset // "offset". The current offset in the buffer does not change. protected final int peekFastBytes(byte[] b, int offset, int length) throws DisconnectException { @@ -1081,7 +1014,7 @@ public class Reply { } } - protected final int readLengthAndCodePoint() throws DisconnectException { + private int readLengthAndCodePoint() throws DisconnectException { if (topDdmCollectionStack_ != EMPTY_STACK) { if (ddmCollectionLenStack_[topDdmCollectionStack_] == 0) { return END_OF_COLLECTION; @@ -1116,7 +1049,7 @@ public class Reply { return codePoint; } - private final void readExtendedLength() throws DisconnectException { + private void readExtendedLength() throws DisconnectException { int numberOfExtendedLenBytes = (ddmScalarLen_ - 0x8000); // fix scroll problem was - 4 int adjustSize = 0; switch (numberOfExtendedLenBytes) { @@ -1148,7 +1081,7 @@ public class Reply { */ } - private final void adjustCollectionAndDssLengths(int length) { + private void adjustCollectionAndDssLengths(int length) { // adjust the lengths here. this is a special case since the // extended length bytes do not include their own length. for (int i = 0; i <= topDdmCollectionStack_; i++) { @@ -1201,7 +1134,7 @@ public class Reply { return columnCount; } - private final void peekExtendedLength() throws DisconnectException { + private void peekExtendedLength() throws DisconnectException { peekedNumOfExtendedLenBytes_ = (peekedLength_ - 0x8004); switch (peekedNumOfExtendedLenBytes_) { case 4: @@ -1325,7 +1258,7 @@ public class Reply { } // remove and return the top offset value from mark stack. - final int popMark() { + private int popMark() { return currentPos_; } @@ -1413,7 +1346,7 @@ public class Reply { return (nullInd == CodePoint.NULLDATA); } - private final int skipSQLDHROW(int offset) { + private int skipSQLDHROW(int offset) { int sqldhrowgrpNullInd = buffer_[pos_ + offset++] & 0xff; if (sqldhrowgrpNullInd == CodePoint.NULLDATA) { return offset; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java Fri May 3 03:42:14 2013 @@ -43,7 +43,7 @@ import java.nio.CharBuffer; import java.util.Hashtable; -public class Request { +class Request { // byte array buffer used for constructing requests. // currently requests are built starting at the beginning of the buffer. @@ -87,7 +87,7 @@ public class Request { clearBuffer(); } - protected final void clearBuffer() { + private final void clearBuffer() { buffer.clear(); top_ = 0; for (int i = 0; i < markStack_.length; i++) { @@ -109,7 +109,7 @@ public class Request { // if the buffer does not contain sufficient room for the data, the buffer // will be expanded by the larger of (2 * current size) or (current size + length). // the data from the previous buffer is copied into the larger buffer. - protected final void ensureLength(int length) { + private final void ensureLength(int length) { if (length > buffer.remaining()) { int newLength = Math.max(buffer.capacity() * 2, buffer.position() + length); @@ -127,14 +127,6 @@ public class Request { buildDss(false, false, false, DssConstants.GDSFMT_RQSDSS, ++correlationID_, false); } - // creates an request dss in the buffer to contain a ddm command - // object. calling this method means any previous dss objects in - // the buffer are complete and their length and chaining bytes can - // be updated appropriately. - protected void createXACommand() { - buildDss(false, false, false, DssConstants.GDSFMT_RQSDSS_NOREPLY, ++correlationID_, false); - } - // creates an object dss in the buffer to contain a ddm command // data object. calling this method means any previous dss objects in // the buffer are complete and their length and chaining bytes can @@ -530,7 +522,7 @@ public class Request { // 1. Flushes an existing DSS segment, if necessary // 2. Determines if extended length bytes are needed // 3. Creates a new DSS/DDM header and a null byte indicator, if applicable - protected final int prepScalarStream(boolean chained, + private final int prepScalarStream(boolean chained, boolean chainedWithSameCorrelator, boolean writeNullByte, long leftToRead) @@ -577,7 +569,7 @@ public class Request { } - protected final void flushExistingDSS() throws DisconnectException { + private final void flushExistingDSS() throws DisconnectException { try { if (simpleDssFinalize) { @@ -595,7 +587,7 @@ public class Request { // Writes out a scalar stream DSS segment, along with DSS continuation headers, // if necessary. - protected final int flushScalarStreamSegment(long leftToRead, + private final int flushScalarStreamSegment(long leftToRead, int bytesToRead) throws DisconnectException { int newBytesToRead = bytesToRead; @@ -617,7 +609,7 @@ public class Request { return newBytesToRead; } - protected final int flushScalarStreamSegment() throws DisconnectException { + private final int flushScalarStreamSegment() throws DisconnectException { try { sendBytes(netAgent_.getOutputStream()); @@ -648,7 +640,7 @@ public class Request { * {@code writeStatus} is {@code false} * @throws DisconnectException if flushing the buffer fails */ - protected final void padScalarStreamForError(long leftToRead, + private final void padScalarStreamForError(long leftToRead, int bytesToRead, boolean writeStatus, byte status) @@ -682,7 +674,9 @@ public class Request { // used to finialize a dss which is already in the buffer // before another dss is built. this includes updating length // bytes and chaining bits. - protected final void finalizePreviousChainedDss(boolean dssHasSameCorrelator) { + private final void finalizePreviousChainedDss( + boolean dssHasSameCorrelator) { + finalizeDssLength(); int pos = dssLengthLocation_ + 3; byte value = buffer.get(pos); @@ -696,7 +690,7 @@ public class Request { // method to determine if any data is in the request. // this indicates there is a dss object already in the buffer. - protected final boolean doesRequestContainData() { + private final boolean doesRequestContainData() { return buffer.position() != 0; } @@ -714,7 +708,7 @@ public class Request { * Note: In the future, we may try to optimize this approach * in an attempt to avoid these shifts. */ - protected final void finalizeDssLength() { + private final void finalizeDssLength() { // calculate the total size of the dss and the number of bytes which would // require continuation dss headers. The total length already includes the // the 6 byte dss header located at the beginning of the dss. It does not @@ -910,7 +904,7 @@ public class Request { } // insert the padByte into the buffer by length number of times. - final void padBytes(byte padByte, int length) { + private final void padBytes(byte padByte, int length) { ensureLength(length); for (int i = 0; i < length; i++) { buffer.put(padByte); @@ -933,7 +927,9 @@ public class Request { buffer.put((byte) tripletId); } - final void writeLidAndLengths(int[][] lidAndLengthOverrides, int count, int offset) { + private void writeLidAndLengths(int[][] lidAndLengthOverrides, + int count, + int offset) { ensureLength(count * 3); for (int i = 0; i < count; i++, offset++) { buffer.put((byte) lidAndLengthOverrides[offset][0]); @@ -1053,26 +1049,6 @@ public class Request { buffer.putShort((short) codePoint); } - // insert a 4 byte length/codepoint pair into the buffer followed - // by length number of bytes copied from array buf starting at offset 0. - // the length of this scalar must not exceed the max for the two byte length - // field. This method does not support extended length. The length - // value inserted in the buffer includes the number of bytes to copy plus - // the size of the llcp (or length + 4). It is up to the caller to make sure - // the array, buf, contains at least length number of bytes. - final void writeScalarBytes(int codePoint, byte[] buf, int length) { - writeScalarBytes(codePoint, buf, 0, length); - } - - // insert a 4 byte length/codepoint pair into the buffer. - // total of 4 bytes inserted in buffer. - // Note: datalength will be incremented by the size of the llcp, 4, - // before being inserted. - final void writeScalarHeader(int codePoint, int dataLength) { - writeLengthCodePoint(dataLength + 4, codePoint); - ensureLength(dataLength); - } - /** * Write string with no minimum or maximum limit. * @param codePoint codepoint to write @@ -1179,19 +1155,6 @@ public class Request { buffer.put(buff, start, length); } - // insert a 4 byte length/codepoint pair plus ddm binary data into the - // buffer. The binary data is padded if needed with the padByte - // if the data is less than paddedLength. - // Note: this method is not to be used for truncation and buff.length - // must be <= paddedLength. - // The llcp length bytes will contain the length of the data plus - // the length of the llcp or 4. - // This method does not handle scenarios which require extended length bytes. - final void writeScalarPaddedBytes(int codePoint, byte[] buff, int paddedLength, byte padByte) { - writeLengthCodePoint(paddedLength + 4, codePoint); - writeScalarPaddedBytes(buff, paddedLength, padByte); - } - // this method inserts binary data into the buffer and pads the // data with the padByte if the data length is less than the paddedLength. // Not: this method is not to be used for truncation and buff.length @@ -1210,7 +1173,7 @@ public class Request { } } - protected void sendBytes(OutputStream socketOutputStream) + private void sendBytes(OutputStream socketOutputStream) throws IOException { try { socketOutputStream.write(buffer.array(), 0, buffer.position()); @@ -1235,7 +1198,7 @@ public class Request { } } - final void maskOutPassword() { + private final void maskOutPassword() { int savedPos = buffer.position(); try { String maskChar = "*"; @@ -1259,7 +1222,7 @@ public class Request { } // insert a java byte into the buffer. - final void writeByte(byte v) { + private void writeByte(byte v) { ensureLength(1); buffer.put(v); } @@ -1464,13 +1427,6 @@ public class Request { writeLDBytesXSubset( length, length, buffer ); } - // does it follows - // ccsid manager or typdef rules. should this method write ddm character - // data or fodca data right now it is coded for ddm char data only - final void writeDDMString(String s) throws SqlException { - encodeString(s); - } - private void buildLengthAndCodePointForLob(int codePoint, long leftToRead, boolean writeNullByte, Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReply.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReply.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReply.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReply.java Fri May 3 03:42:14 2013 @@ -26,10 +26,10 @@ import org.apache.derby.client.am.Result import org.apache.derby.client.am.SqlException; -public class ResultSetReply extends StatementReply { +class ResultSetReply extends StatementReply { private ResultSetReplyInterface materialResultSetReply_; - public ResultSetReply(Agent agent, + ResultSetReply(Agent agent, ResultSetReplyInterface materialResultSetReply, StatementReplyInterface materialStatementReply, ConnectionReplyInterface materialConnectionReply) { @@ -37,14 +37,15 @@ public class ResultSetReply extends Stat materialResultSetReply_ = materialResultSetReply; } - public void readFetch(ResultSetCallbackInterface resultSet) throws SqlException { + void readFetch(ResultSetCallbackInterface resultSet) throws SqlException { materialResultSetReply_.readFetch(resultSet); agent_.checkForChainBreakingException_(); } // think about splitting out the position cursor stuff from the fetch stuff - public void readScrollableFetch(ResultSetCallbackInterface resultSet) throws SqlException { + void readScrollableFetch(ResultSetCallbackInterface resultSet) + throws SqlException { materialResultSetReply_.readScrollableFetch(resultSet); agent_.checkForChainBreakingException_(); } @@ -54,7 +55,8 @@ public class ResultSetReply extends Stat agent_.checkForChainBreakingException_(); } - public void readCursorClose(ResultSetCallbackInterface resultSet) throws SqlException { + void readCursorClose(ResultSetCallbackInterface resultSet) + throws SqlException { materialResultSetReply_.readCursorClose(resultSet); agent_.checkForChainBreakingException_(); } Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReplyInterface.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReplyInterface.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReplyInterface.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetReplyInterface.java Fri May 3 03:42:14 2013 @@ -24,7 +24,7 @@ package org.apache.derby.client.net; import org.apache.derby.client.am.DisconnectException; import org.apache.derby.client.am.ResultSetCallbackInterface; -public interface ResultSetReplyInterface { +interface ResultSetReplyInterface { public void readFetch(ResultSetCallbackInterface resultSet) throws DisconnectException; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetRequestInterface.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetRequestInterface.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetRequestInterface.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/ResultSetRequestInterface.java Fri May 3 03:42:14 2013 @@ -29,7 +29,7 @@ import org.apache.derby.client.am.SqlExc // Implementations of this interface should not dereference common layer ResultSet state, as it is passed in, // but may dereference material layer ResultSet state if necessary for performance. -public interface ResultSetRequestInterface { +interface ResultSetRequestInterface { public void writeFetch(NetResultSet resultSet, Section section, int fetchSize) throws SqlException; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReply.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReply.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReply.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReply.java Fri May 3 03:42:14 2013 @@ -26,7 +26,7 @@ import org.apache.derby.client.am.Prepar import org.apache.derby.client.am.SqlException; import org.apache.derby.client.am.StatementCallbackInterface; -public class StatementReply extends ConnectionReply { +class StatementReply extends ConnectionReply { private StatementReplyInterface materialStatementReply_; StatementReply(Agent agent, @@ -36,48 +36,58 @@ public class StatementReply extends Conn materialStatementReply_ = materialStatementReply; } - public void readPrepareDescribeOutput(StatementCallbackInterface statement) throws SqlException { + void readPrepareDescribeOutput(StatementCallbackInterface statement) + throws SqlException { materialStatementReply_.readPrepareDescribeOutput(statement); agent_.checkForChainBreakingException_(); } - public void readExecuteImmediate(StatementCallbackInterface statement) throws SqlException { + void readExecuteImmediate(StatementCallbackInterface statement) + throws SqlException { materialStatementReply_.readExecuteImmediate(statement); agent_.checkForChainBreakingException_(); } - public void readOpenQuery(StatementCallbackInterface statement) throws SqlException { + void readOpenQuery(StatementCallbackInterface statement) + throws SqlException { materialStatementReply_.readOpenQuery(statement); agent_.checkForChainBreakingException_(); } - public void readExecute(PreparedStatementCallbackInterface preparedStatement) throws SqlException { + void readExecute(PreparedStatementCallbackInterface preparedStatement) + throws SqlException { materialStatementReply_.readExecute(preparedStatement); agent_.checkForChainBreakingException_(); } - public void readPrepare(StatementCallbackInterface statement) throws SqlException { + void readPrepare(StatementCallbackInterface statement) throws SqlException { materialStatementReply_.readPrepare(statement); agent_.checkForChainBreakingException_(); } - public void readDescribeInput(PreparedStatementCallbackInterface preparedStatement) throws SqlException { + void readDescribeInput(PreparedStatementCallbackInterface preparedStatement) + throws SqlException { materialStatementReply_.readDescribeInput(preparedStatement); agent_.checkForChainBreakingException_(); } - public void readDescribeOutput(PreparedStatementCallbackInterface preparedStatement) throws SqlException { + + void readDescribeOutput( + PreparedStatementCallbackInterface preparedStatement) + throws SqlException { materialStatementReply_.readDescribeOutput(preparedStatement); agent_.checkForChainBreakingException_(); } - public void readExecuteCall(StatementCallbackInterface statement) throws SqlException { + void readExecuteCall(StatementCallbackInterface statement) + throws SqlException { materialStatementReply_.readExecuteCall(statement); agent_.checkForChainBreakingException_(); } - public void readSetSpecialRegister(StatementCallbackInterface statement) throws SqlException { + void readSetSpecialRegister(StatementCallbackInterface statement) + throws SqlException { materialStatementReply_.readSetSpecialRegister(statement); agent_.checkForChainBreakingException_(); } Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReplyInterface.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReplyInterface.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReplyInterface.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementReplyInterface.java Fri May 3 03:42:14 2013 @@ -25,7 +25,7 @@ import org.apache.derby.client.am.Discon import org.apache.derby.client.am.PreparedStatementCallbackInterface; import org.apache.derby.client.am.StatementCallbackInterface; -public interface StatementReplyInterface { +interface StatementReplyInterface { public void readPrepareDescribeOutput(StatementCallbackInterface statement) throws DisconnectException; public void readExecuteImmediate(StatementCallbackInterface statement) throws DisconnectException; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/StatementRequestInterface.java Fri May 3 03:42:14 2013 @@ -31,7 +31,7 @@ import org.apache.derby.client.am.SqlExc // Implementations of this interface should not dereference common layer Statement state, as it is passed in, // but may dereference material layer Statement state if necessary for performance. -public interface StatementRequestInterface { +interface StatementRequestInterface { public void writeExecuteImmediate(NetStatement materialStatement, String sql, Section section) throws SqlException; Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java Fri May 3 03:42:14 2013 @@ -133,16 +133,16 @@ public class Typdef implements Cloneable //-----------------------------state------------------------------------------ // double byte character set - static final short CCSIDDBC = 1; + private static final short CCSIDDBC = 1; // multi-byte character set - static final short CCSIDMBC = 2; + private static final short CCSIDMBC = 2; // single byte character set - static final short CCSIDSBC = 3; + private static final short CCSIDSBC = 3; // No CCSID - static final short NOCCSID = 0; + private static final short NOCCSID = 0; // fixed length static final short FIXEDLENGTH = 0; @@ -273,33 +273,33 @@ public class Typdef implements Cloneable /* 0x01 Empties */ null, /* 0x02 4-byte int */ - new FdocaSimpleDataArray(0x02, FdocaConstants.FDOCA_TYPE_INTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x02, NOCCSID, 0, FIXEDLENGTH), /* 0x03 null 4-byte int */ - new FdocaSimpleDataArray(0x03, FdocaConstants.FDOCA_TYPE_NINTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x03, NOCCSID, 0, FIXEDLENGTH), /* 0x04 2-byte int */ - new FdocaSimpleDataArray(0x04, FdocaConstants.FDOCA_TYPE_INTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 2, FIXEDLENGTH), + new FdocaSimpleDataArray(0x04, NOCCSID, 0, FIXEDLENGTH), /* 0x05 null 2-byte int */ - new FdocaSimpleDataArray(0x05, FdocaConstants.FDOCA_TYPE_NINTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 2, FIXEDLENGTH), + new FdocaSimpleDataArray(0x05, NOCCSID, 0, FIXEDLENGTH), /* 0x06 1-byte int */ - new FdocaSimpleDataArray(0x06, FdocaConstants.FDOCA_TYPE_INTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 1, FIXEDLENGTH), + new FdocaSimpleDataArray(0x06, NOCCSID, 0, FIXEDLENGTH), /* 0x07 null 1-byte int */ - new FdocaSimpleDataArray(0x07, FdocaConstants.FDOCA_TYPE_NINTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 1, FIXEDLENGTH), + new FdocaSimpleDataArray(0x07, NOCCSID, 0, FIXEDLENGTH), /* 0x08 16-byte bin float */ - new FdocaSimpleDataArray(0x08, FdocaConstants.FDOCA_TYPE_FLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 16, FIXEDLENGTH), + new FdocaSimpleDataArray(0x08, NOCCSID, 0, FIXEDLENGTH), /* 0x09 null 16-byte bin float */ - new FdocaSimpleDataArray(0x09, FdocaConstants.FDOCA_TYPE_NFLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 16, FIXEDLENGTH), + new FdocaSimpleDataArray(0x09, NOCCSID, 0, FIXEDLENGTH), /* 0x0A 8-byte bin float */ - new FdocaSimpleDataArray(0x0A, FdocaConstants.FDOCA_TYPE_FLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x0A, NOCCSID, 0, FIXEDLENGTH), /* 0x0B null 8-byte bin float */ - new FdocaSimpleDataArray(0x0B, FdocaConstants.FDOCA_TYPE_NFLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x0B, NOCCSID, 0, FIXEDLENGTH), /* 0x0C 4-byte bin float */ - new FdocaSimpleDataArray(0x0C, FdocaConstants.FDOCA_TYPE_FLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x0C, NOCCSID, 0, FIXEDLENGTH), /* 0x0D null 4-byte bin float */ - new FdocaSimpleDataArray(0x0D, FdocaConstants.FDOCA_TYPE_NFLOAT_IEEE, FloatingPoint.IEEE_754_FLOATING_POINT, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x0D, NOCCSID, 0, FIXEDLENGTH), /* 0x0E Fixed Decimal */ - new FdocaSimpleDataArray(0x0E, FdocaConstants.FDOCA_TYPE_DECIMAL, Decimal.PACKED_DECIMAL, NOCCSID, 0, 0, 31, DECIMALLENGTH), + new FdocaSimpleDataArray(0x0E, NOCCSID, 0, DECIMALLENGTH), /* 0x0F null Fixed Decimal */ - new FdocaSimpleDataArray(0x0F, FdocaConstants.FDOCA_TYPE_NDECIMAL, Decimal.PACKED_DECIMAL, NOCCSID, 0, 0, 31, DECIMALLENGTH), + new FdocaSimpleDataArray(0x0F, NOCCSID, 0, DECIMALLENGTH), /* 0x10 empties */ null, /* 0x11 empties */ @@ -313,125 +313,125 @@ public class Typdef implements Cloneable /* 0x15 Empties */ null, /* 0x16 Big int */ - new FdocaSimpleDataArray(0x16, FdocaConstants.FDOCA_TYPE_INTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x16, NOCCSID, 0, FIXEDLENGTH), /* 0x17 null Big int */ - new FdocaSimpleDataArray(0x17, FdocaConstants.FDOCA_TYPE_NINTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x17, NOCCSID, 0, FIXEDLENGTH), /* 0x18 Large Obj Bytes Loc */ - new FdocaSimpleDataArray(0x18, FdocaConstants.FDOCA_TYPE_FIXEDBYTES, 0x00, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x18, NOCCSID, 0, FIXEDLENGTH), /* 0x19 null Large Obj Bytes Loc */ - new FdocaSimpleDataArray(0x19, FdocaConstants.FDOCA_TYPE_NFIXEDBYTES, 0x00, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x19, NOCCSID, 0, FIXEDLENGTH), /* 0x1A Empties */ null, /* 0x1B null Large Obj Char Loc */ - new FdocaSimpleDataArray(0x1B, FdocaConstants.FDOCA_TYPE_NFIXEDBYTES, 0x00, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x1B, NOCCSID, 0, FIXEDLENGTH), /* 0x1C Large Obj Char DBCS Loc */ - new FdocaSimpleDataArray(0x1C, FdocaConstants.FDOCA_TYPE_FIXEDBYTES, 0x00, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x1C, NOCCSID, 0, FIXEDLENGTH), /* 0x1D null Large Obj Char DBCS Loc */ - new FdocaSimpleDataArray(0x1D, FdocaConstants.FDOCA_TYPE_NFIXEDBYTES, 0x00, NOCCSID, 0, 0, 4, FIXEDLENGTH), + new FdocaSimpleDataArray(0x1D, NOCCSID, 0, FIXEDLENGTH), /* 0x1E Row Identifier */ - new FdocaSimpleDataArray(0x1E, FdocaConstants.FDOCA_TYPE_VARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 40, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x1E, NOCCSID, 0, TWOBYTELENGTH), /* 0x1F null Row Identifier */ - new FdocaSimpleDataArray(0x1F, FdocaConstants.FDOCA_TYPE_NVARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 40, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x1F, NOCCSID, 0, TWOBYTELENGTH), /* 0x20 Date */ - new FdocaSimpleDataArray(0x20, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 10, FIXEDLENGTH), + new FdocaSimpleDataArray(0x20, CCSIDSBC, 1, FIXEDLENGTH), /* 0x21 null Date */ - new FdocaSimpleDataArray(0x21, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 10, FIXEDLENGTH), + new FdocaSimpleDataArray(0x21, CCSIDSBC, 1, FIXEDLENGTH), /* 0x22 Time */ - new FdocaSimpleDataArray(0x22, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x22, CCSIDSBC, 1, FIXEDLENGTH), /* 0x23 null Time */ - new FdocaSimpleDataArray(0x23, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 8, FIXEDLENGTH), + new FdocaSimpleDataArray(0x23, CCSIDSBC, 1, FIXEDLENGTH), /* 0x24 Timestamp */ - new FdocaSimpleDataArray(0x24, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 26, FIXEDLENGTH), + new FdocaSimpleDataArray(0x24, CCSIDSBC, 1, FIXEDLENGTH), /* 0x25 null Timestamp */ - new FdocaSimpleDataArray(0x25, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 26, FIXEDLENGTH), + new FdocaSimpleDataArray(0x25, CCSIDSBC, 1, FIXEDLENGTH), /* 0x26 Fixed bytes */ - new FdocaSimpleDataArray(0x26, FdocaConstants.FDOCA_TYPE_FIXEDBYTES, Cursor.BYTES, NOCCSID, 0, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x26, NOCCSID, 0, FIXEDLENGTH), /* 0x27 null Fixed bytes */ - new FdocaSimpleDataArray(0x27, FdocaConstants.FDOCA_TYPE_NFIXEDBYTES, Cursor.BYTES, NOCCSID, 0, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x27, NOCCSID, 0, FIXEDLENGTH), /* 0x28 Variable bytes */ - new FdocaSimpleDataArray(0x28, FdocaConstants.FDOCA_TYPE_VARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x28, NOCCSID, 0, TWOBYTELENGTH), /* 0x29 null Variable bytes */ - new FdocaSimpleDataArray(0x29, FdocaConstants.FDOCA_TYPE_NVARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x29, NOCCSID, 0, TWOBYTELENGTH), /* 0x2A Long var bytes */ - new FdocaSimpleDataArray(0x2A, FdocaConstants.FDOCA_TYPE_VARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x2A, NOCCSID, 0, TWOBYTELENGTH), /* 0x2B null Long var bytes */ - new FdocaSimpleDataArray(0x2B, FdocaConstants.FDOCA_TYPE_NVARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x2B, NOCCSID, 0, TWOBYTELENGTH), /* 0x2C Nullterm bytes */ - new FdocaSimpleDataArray(0x2C, FdocaConstants.FDOCA_TYPE_NTBYTES, Cursor.NULL_TERMINATED_BYTES, NOCCSID, 0, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x2C, NOCCSID, 0, FIXEDLENGTH), /* 0x2D null Nullterm bytes */ - new FdocaSimpleDataArray(0x2D, FdocaConstants.FDOCA_TYPE_NNTBYTES, Cursor.NULL_TERMINATED_STRING, NOCCSID, 0, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x2D, NOCCSID, 0, FIXEDLENGTH), /* 0x2E Nullterm SBCS */ - new FdocaSimpleDataArray(0x2E, FdocaConstants.FDOCA_TYPE_NTCHAR, Cursor.NULL_TERMINATED_STRING, CCSIDSBC, 1, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x2E, CCSIDSBC, 1, FIXEDLENGTH), /* 0x2F null Nullterm SBCS */ - new FdocaSimpleDataArray(0x2F, FdocaConstants.FDOCA_TYPE_NNTCHAR, Cursor.NULL_TERMINATED_STRING, CCSIDSBC, 1, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x2F, CCSIDSBC, 1, FIXEDLENGTH), /* 0x30 Fix char SBCS */ - new FdocaSimpleDataArray(0x30, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x30, CCSIDSBC, 1, FIXEDLENGTH), /* 0x31 null Fix char SBCS */ - new FdocaSimpleDataArray(0x31, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, Cursor.STRING, CCSIDSBC, 1, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x31, CCSIDSBC, 1, FIXEDLENGTH), /* 0x32 Var char SBCS */ - new FdocaSimpleDataArray(0x32, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x32, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x33 null Var char SBCS */ - new FdocaSimpleDataArray(0x33, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x33, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x34 Long var SBCS */ - new FdocaSimpleDataArray(0x34, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x34, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x35 null Long var SBCS */ - new FdocaSimpleDataArray(0x35, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x35, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x36 Fix char DBCS */ - new FdocaSimpleDataArray(0x36, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, 0x00, CCSIDDBC, 2, 0, 16383, FIXEDLENGTH), + new FdocaSimpleDataArray(0x36, CCSIDDBC, 2, FIXEDLENGTH), /* 0x37 null Fix char DBCS */ - new FdocaSimpleDataArray(0x37, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, 0x00, CCSIDDBC, 2, 0, 16383, FIXEDLENGTH), + new FdocaSimpleDataArray(0x37, CCSIDDBC, 2, FIXEDLENGTH), /* 0x38 Var char DBCS */ - new FdocaSimpleDataArray(0x38, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDDBC, 2, 1, 16383, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x38, CCSIDDBC, 2, TWOBYTELENGTH), /* 0x39 null Var char DBCS */ - new FdocaSimpleDataArray(0x39, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDDBC, 2, 1, 16383, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x39, CCSIDDBC, 2, TWOBYTELENGTH), /* 0x3A Long var DBCS */ - new FdocaSimpleDataArray(0x3A, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDDBC, 2, 1, 16383, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x3A, CCSIDDBC, 2, TWOBYTELENGTH), /* 0x3B null Long var DBCS */ - new FdocaSimpleDataArray(0x3B, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDDBC, 2, 1, 16383, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x3B, CCSIDDBC, 2, TWOBYTELENGTH), /* 0x3C Fix char MBCS */ - new FdocaSimpleDataArray(0x3C, FdocaConstants.FDOCA_TYPE_FIXEDCHAR, 0x00, CCSIDMBC, 1, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x3C, CCSIDMBC, 1, FIXEDLENGTH), /* 0x3D null Fix char MBCS */ - new FdocaSimpleDataArray(0x3D, FdocaConstants.FDOCA_TYPE_NFIXEDCHAR, 0x00, CCSIDMBC, 1, 0, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x3D, CCSIDMBC, 1, FIXEDLENGTH), /* 0x3E Var char MBCS */ - new FdocaSimpleDataArray(0x3E, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x3E, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x3F null Var char MBCS */ - new FdocaSimpleDataArray(0x3F, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x3F, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x40 Long var MBCS */ - new FdocaSimpleDataArray(0x40, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x40, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x41 null Long var MBCS */ - new FdocaSimpleDataArray(0x41, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x41, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x42 Nullterm MBCS */ - new FdocaSimpleDataArray(0x42, FdocaConstants.FDOCA_TYPE_NTCHAR, Cursor.NULL_TERMINATED_STRING, CCSIDMBC, 1, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x42, CCSIDMBC, 1, FIXEDLENGTH), /* 0x43 null Nullterm MBCS */ - new FdocaSimpleDataArray(0x43, FdocaConstants.FDOCA_TYPE_NNTCHAR, Cursor.NULL_TERMINATED_STRING, CCSIDMBC, 1, 1, 32767, FIXEDLENGTH), + new FdocaSimpleDataArray(0x43, CCSIDMBC, 1, FIXEDLENGTH), /* 0x44 L String bytes */ - new FdocaSimpleDataArray(0x44, FdocaConstants.FDOCA_TYPE_PSCLBYTE, Cursor.VARIABLE_SHORT_STRING, NOCCSID, 0, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x44, NOCCSID, 0, ONEBYTELENGTH), /* 0x45 null L String bytes */ - new FdocaSimpleDataArray(0x45, FdocaConstants.FDOCA_TYPE_NPSCLBYTE, Cursor.VARIABLE_SHORT_STRING, NOCCSID, 0, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x45, NOCCSID, 0, ONEBYTELENGTH), /* 0x46 L String SBCS */ - new FdocaSimpleDataArray(0x46, FdocaConstants.FDOCA_TYPE_PSCLCHAR, Cursor.VARIABLE_SHORT_STRING, CCSIDSBC, 1, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x46, CCSIDSBC, 1, ONEBYTELENGTH), /* 0x47 null L String SBCS */ - new FdocaSimpleDataArray(0x47, FdocaConstants.FDOCA_TYPE_NPSCLCHAR, Cursor.VARIABLE_SHORT_STRING, CCSIDSBC, 1, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x47, CCSIDSBC, 1, ONEBYTELENGTH), /* 0x48 L String MBCS */ - new FdocaSimpleDataArray(0x48, FdocaConstants.FDOCA_TYPE_PSCLCHAR, Cursor.VARIABLE_SHORT_STRING, CCSIDMBC, 1, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x48, CCSIDMBC, 1, ONEBYTELENGTH), /* 0x49 null L String MBCS */ - new FdocaSimpleDataArray(0x49, FdocaConstants.FDOCA_TYPE_NPSCLCHAR, Cursor.VARIABLE_SHORT_STRING, CCSIDMBC, 1, 1, 255, ONEBYTELENGTH), + new FdocaSimpleDataArray(0x49, CCSIDMBC, 1, ONEBYTELENGTH), /* 0x4A Empties */ null, /* 0x4B Empties */ null, /* 0x4C SBCS */ - new FdocaSimpleDataArray(0x4C, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x4C, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x4D null SBCS */ - new FdocaSimpleDataArray(0x4D, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDSBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x4D, CCSIDSBC, 1, TWOBYTELENGTH), /* 0x4E MBCS */ - new FdocaSimpleDataArray(0x4E, FdocaConstants.FDOCA_TYPE_VARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x4E, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x4F null MBCS */ - new FdocaSimpleDataArray(0x4F, FdocaConstants.FDOCA_TYPE_NVARCHAR, Cursor.VARIABLE_STRING, CCSIDMBC, 1, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x4F, CCSIDMBC, 1, TWOBYTELENGTH), /* 0x50 UDT */ - new FdocaSimpleDataArray(0x50, FdocaConstants.FDOCA_TYPE_VARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x50, NOCCSID, 0, TWOBYTELENGTH), /* 0x51 null UDT */ - new FdocaSimpleDataArray(0x51, FdocaConstants.FDOCA_TYPE_NVARBYTES, Cursor.VARIABLE_BYTES, NOCCSID, 0, 1, 32767, TWOBYTELENGTH), + new FdocaSimpleDataArray(0x51, NOCCSID, 0, TWOBYTELENGTH), /* 0x52 Empties */ null, /* 0x53 Empties */ @@ -649,9 +649,9 @@ public class Typdef implements Cloneable /* 0xBD Empties */ null, /* 0xBE Boolean */ - new FdocaSimpleDataArray(0xBE, FdocaConstants.FDOCA_TYPE_FIXEDBYTES, Cursor.BYTES, NOCCSID, 0, 0, 1, FIXEDLENGTH), + new FdocaSimpleDataArray(0xBE, NOCCSID, 0, FIXEDLENGTH), /* 0xBF null Boolean */ - new FdocaSimpleDataArray(0xBF, FdocaConstants.FDOCA_TYPE_NFIXEDBYTES, Cursor.BYTES, NOCCSID, 0, 0, 1, FIXEDLENGTH), + new FdocaSimpleDataArray(0xBF, NOCCSID, 0, FIXEDLENGTH), /* 0xC0 Empties */ null, /* 0xC1 Empties */ @@ -669,21 +669,21 @@ public class Typdef implements Cloneable /* 0xC7 Empties */ null, /* 0xC8 Large object bytes */ - new FdocaSimpleDataArray(0xC8, FdocaConstants.FDOCA_TYPE_LOBBYTES, 0x00, NOCCSID, 0, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xC8, NOCCSID, 0, LOBLENGTH), /* 0xC9 null Large object bytes */ - new FdocaSimpleDataArray(0xC9, FdocaConstants.FDOCA_TYPE_NLOBBYTES, 0x00, NOCCSID, 0, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xC9, NOCCSID, 0, LOBLENGTH), /* 0xCA Large object char SBCS */ - new FdocaSimpleDataArray(0xCA, FdocaConstants.FDOCA_TYPE_LOBCHAR, Cursor.SBCS_CLOB, CCSIDSBC, 1, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCA, CCSIDSBC, 1, LOBLENGTH), /* 0xCB null Large object char SBCS */ - new FdocaSimpleDataArray(0xCB, FdocaConstants.FDOCA_TYPE_NLOBCHAR, Cursor.SBCS_CLOB, CCSIDSBC, 1, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCB, CCSIDSBC, 1, LOBLENGTH), /* 0xCC Large object char DBCS */ - new FdocaSimpleDataArray(0xCC, FdocaConstants.FDOCA_TYPE_LOBCHAR, Cursor.DBCS_CLOB, CCSIDDBC, 2, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCC, CCSIDDBC, 2, LOBLENGTH), /* 0xCD null Large object char DBCS */ - new FdocaSimpleDataArray(0xCD, FdocaConstants.FDOCA_TYPE_NLOBCHAR, Cursor.DBCS_CLOB, CCSIDDBC, 2, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCD, CCSIDDBC, 2, LOBLENGTH), /* 0xCE Large object char MBCS */ - new FdocaSimpleDataArray(0xCE, FdocaConstants.FDOCA_TYPE_LOBCHAR, Cursor.MBCS_CLOB, CCSIDMBC, 1, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCE, CCSIDMBC, 1, LOBLENGTH), /* 0xCF null Large object char MBCS */ - new FdocaSimpleDataArray(0xCF, FdocaConstants.FDOCA_TYPE_NLOBCHAR, Cursor.MBCS_CLOB, CCSIDMBC, 1, 1, 8, LOBLENGTH), + new FdocaSimpleDataArray(0xCF, CCSIDMBC, 1, LOBLENGTH), }; private static final int[] protocolToJdbcTypes_ = { @@ -916,7 +916,6 @@ public class Typdef implements Cloneable private String ccsidMbcEncoding_; - protected int environment_; private boolean mddOverride_ = false; private FdocaSimpleDataArray overrideTable_[] = new FdocaSimpleDataArray[OVERRIDE_TABLE_SIZE]; @@ -927,11 +926,12 @@ public class Typdef implements Cloneable this.initialize(netAgent, 0, false, 0, false, 0, false, null); } - Typdef(NetAgent netAgent, int ccsidSbc, String typdefnam) throws DisconnectException { - this.initialize(netAgent, ccsidSbc, true, 0, false, 0, false, typdefnam); - } + Typdef(NetAgent netAgent, + int ccsidSbc, + String typdefnam, + int ccsidDbc, + int ccsidMbc) throws DisconnectException { - public Typdef(NetAgent netAgent, int ccsidSbc, String typdefnam, int ccsidDbc, int ccsidMbc) throws DisconnectException { this.initialize(netAgent, ccsidSbc, true, ccsidMbc, true, ccsidDbc, true, typdefnam); } @@ -980,12 +980,6 @@ public class Typdef implements Cloneable ccsidSbcEncoding_ = null; } - void clearCcsidSbc() { - ccsidSbc_ = 0; - ccsidSbcSet_ = false; - ccsidSbcEncoding_ = null; - } - boolean isCcsidSbcSet() { return ccsidSbcSet_; } @@ -1008,18 +1002,12 @@ public class Typdef implements Cloneable ccsidDbcEncoding_ = null; } - void clearCcsidDbc() { - ccsidDbc_ = 0; - ccsidDbcSet_ = false; - ccsidDbcEncoding_ = null; - } - boolean isCcsidDbcSet() { return ccsidDbcSet_; } // analyze exception handling some more here - String getCcsidDbcEncoding() throws DisconnectException { + private String getCcsidDbcEncoding() throws DisconnectException { if (ccsidDbcEncoding_ == null) { ccsidDbcEncoding_ = UTF8ENCODING; } @@ -1036,12 +1024,6 @@ public class Typdef implements Cloneable ccsidMbcEncoding_ = null; } - void clearCcsidMbc() { - ccsidMbc_ = 0; - ccsidMbcSet_ = false; - ccsidMbcEncoding_ = null; - } - boolean isCcsidMbcSet() { return ccsidMbcSet_; } @@ -1200,21 +1182,13 @@ public class Typdef implements Cloneable if (overrideTable_[fdocaTripletLid] == null) { overrideTable_[fdocaTripletLid] = new FdocaSimpleDataArray (protocolType, - fdocaFieldType, - fdocaTypeToRepresentationMap_[fdocaFieldType & 0x7f], ccsid, characterSize, - mode, - length, mapFdocaTypeToTypeToUseForComputingDataLength(fdocaFieldType)); } else { overrideTable_[fdocaTripletLid].update(protocolType, - fdocaFieldType, - fdocaTypeToRepresentationMap_[fdocaFieldType & 0x7f], ccsid, characterSize, - mode, - length, mapFdocaTypeToTypeToUseForComputingDataLength(fdocaFieldType)); } } Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/BasicClientConnectionPoolDataSource40.java Fri May 3 03:42:14 2013 @@ -30,7 +30,7 @@ import org.apache.derby.shared.common.i1 import org.apache.derby.shared.common.reference.MessageId; /** - * This datasource is suitable for client/server use of Derby, + * This data source is suitable for client/server use of Derby, * running on Java 8 Compact Profile 2 or higher. *

* BasicClientConnectionPoolDataSource40 is similar to @@ -39,7 +39,7 @@ import org.apache.derby.shared.common.re * * @see ClientConnectionPoolDataSource40 */ -public class BasicClientConnectionPoolDataSource40 +class BasicClientConnectionPoolDataSource40 extends BasicClientDataSource40 implements ConnectionPoolDataSource, ClientConnectionPoolDataSourceInterface { Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java Fri May 3 03:42:14 2013 @@ -311,7 +311,7 @@ public abstract class ClientBaseDataSour // @see #getUpgradedSecurityMechanism // Therefore, need to keep track if the securityMechanism has been // explicitly set - protected short securityMechanism = SECMEC_HAS_NOT_EXPLICITLY_SET; + private short securityMechanism = SECMEC_HAS_NOT_EXPLICITLY_SET; @@ -364,7 +364,7 @@ public abstract class ClientBaseDataSour * @param password password argument * @return upgraded security mechanism if possible */ - public static short getUpgradedSecurityMechanism(String password) { + private static short getUpgradedSecurityMechanism(String password) { // if password is null, in that case the only acceptable security // mechanism is USRIDONL, which is the default security mechanism. if ( password == null ) { @@ -415,7 +415,7 @@ public abstract class ClientBaseDataSour // private String traceFile; - public static String getTraceFile(Properties properties) { + static String getTraceFile(Properties properties) { return properties.getProperty(Attribute.CLIENT_TRACE_FILE); } @@ -433,7 +433,7 @@ public abstract class ClientBaseDataSour * @param properties jdbc url properties * @return value of traceDirectory property */ - public static String getTraceDirectory(Properties properties) { + static String getTraceDirectory(Properties properties) { String traceDirectoryString; traceDirectoryString = @@ -486,7 +486,7 @@ public abstract class ClientBaseDataSour // private boolean traceFileAppend = propertyDefault_traceFileAppend; - public static boolean getTraceFileAppend(Properties properties) { + static boolean getTraceFileAppend(Properties properties) { String traceFileAppendString = properties.getProperty(Attribute.CLIENT_TRACE_APPEND); return parseBoolean( @@ -524,7 +524,7 @@ public abstract class ClientBaseDataSour // If neither traceFile nor jdbc logWriter are set, then null is returned. // logWriterInUseSuffix used only for trace directories to indicate whether // log writer is use is from xads, cpds, sds, ds, driver, config, reset. - LogWriter computeDncLogWriterForNewConnection( + private LogWriter computeDncLogWriterForNewConnection( String logWriterInUseSuffix) throws SqlException { return computeDncLogWriterForNewConnection( @@ -563,7 +563,7 @@ public abstract class ClientBaseDataSour } // Compute a DNC log writer before a connection is created. - static LogWriter computeDncLogWriter( + private static LogWriter computeDncLogWriter( PrintWriter logWriter, String traceDirectory, String traceFile, @@ -606,7 +606,7 @@ public abstract class ClientBaseDataSour // overrides the traceFile, and traceDirectory settings. If neither // traceFile, nor logWriter, nor traceDirectory are set, then null is // returned. - static PrintWriter computePrintWriter( + private static PrintWriter computePrintWriter( PrintWriter logWriter, String traceDirectory, String traceFile, @@ -957,7 +957,7 @@ public abstract class ClientBaseDataSour return shutdownstr; } - protected String connectionAttributes = null; + private String connectionAttributes = null; /** * Set this property to pass in more Derby specific connection URL @@ -990,7 +990,7 @@ public abstract class ClientBaseDataSour - protected int traceLevel = propertyDefault_traceLevel; + private int traceLevel = propertyDefault_traceLevel; /** * Check if derby.client.traceLevel is provided as a JVM property. @@ -1073,7 +1073,7 @@ public abstract class ClientBaseDataSour * to the client. These need to be updated when set connection attributes * is called. */ - void updateDataSourceValues(Properties prop) + private void updateDataSourceValues(Properties prop) throws SqlException { if (prop == null) { @@ -1115,7 +1115,7 @@ public abstract class ClientBaseDataSour * @param sqle exception to handle * @throws SQLException handled exception (if any) */ - protected final void handleConnectionException(LogWriter logWriter, + private void handleConnectionException(LogWriter logWriter, SqlException sqle) throws SQLException { // See DERBY-4070 Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java (original) +++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java Fri May 3 03:42:14 2013 @@ -429,6 +429,8 @@ public class ClientDriver implements Dri */ public static ClientJDBCObjectFactory getFactory() { + // System.err.println("factoryObject="+factoryObject); + if(factoryObject!=null) return factoryObject; if (Configuration.supportsJDBC42()) { Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java Fri May 3 03:42:14 2013 @@ -343,7 +343,7 @@ public final class ProductVersionHolder public int getDrdaMaintVersion() {return drdaMaintVersion; } /** - Return the fix pack version from the maintence encoding. + Return the fix pack version from the maintenance encoding. */ public int getFixPackVersion() { return maintVersion / MAINT_ENCODING; } Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/Utf8CcsidManagerClientTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/Utf8CcsidManagerClientTest.java?rev=1478635&r1=1478634&r2=1478635&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/Utf8CcsidManagerClientTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/Utf8CcsidManagerClientTest.java Fri May 3 03:42:14 2013 @@ -48,7 +48,7 @@ public class Utf8CcsidManagerClientTest ccsidManager = new Utf8CcsidManager(); - // Set up a dummy Agent since many of the methods require one for + // Set up a dummy Agent since testInvalidCharacters require one for // generating exceptions. PrintWriter pw = new PrintWriter(new TestNullOutputStream()); agent = new NetAgent(null, new LogWriter(pw, 0));