|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.client.am.Cursor
org.apache.derby.client.net.NetCursor
public class NetCursor
| Field Summary | |
|---|---|
(package private) boolean |
blocking_
|
(package private) java.util.ArrayList<byte[]> |
extdtaData_
Queue to hold EXTDTA data that hasn't been correlated to its column number. |
(package private) java.util.HashMap<java.lang.Integer,java.lang.Integer> |
extdtaPositions_
|
(package private) boolean[] |
isGraphic_
|
(package private) int |
maximumRowSize_
|
(package private) NetAgent |
netAgent_
|
(package private) NetResultSet |
netResultSet_
|
(package private) int |
numMddOverrides_
|
private boolean |
qryclsimpEnabled_
Flag indicating whether the result set on the server is implicitly closed when end-of-data is received. |
(package private) Typdef |
qrydscTypdef_
|
(package private) boolean |
rtnextrow_
|
(package private) int |
targetSqlamForTypdef_
|
(package private) int[] |
typeToUseForComputingDataLength_
|
| Fields inherited from class org.apache.derby.client.am.Cursor |
|---|
agent_, BYTES, ccsid_, charsetName_, columnDataComputedLength_, columnDataIsNullCache_, columnDataLengthCache_, columnDataPosition_, columnDataPositionCache_, columns_, currentRowPosition_, dataBuffer_, dataBufferStream_, DBCS_CLOB, fdocaLength_, hasLobs_, isNull_, jdbcTypes_, lastValidBytePosition_, MBCS_CLOB, NULL_TERMINATED_BYTES, NULL_TERMINATED_STRING, nullable_, position_, SBCS_CLOB, STRING, VARIABLE_BYTES, VARIABLE_SHORT_BYTES, VARIABLE_SHORT_STRING, VARIABLE_STRING |
| Constructor Summary | |
|---|---|
NetCursor(NetAgent netAgent)
|
|
NetCursor(NetAgent netAgent,
int qryprctyp)
|
|
| Method Summary | |
|---|---|
private void |
adjustColumnOffsetsForColumnsPreviouslyCalculated(int index)
Adjust column offsets after fetching the next part of a split row. |
private int[] |
allocateColumnDataComputedLengthArray(int row)
|
private boolean[] |
allocateColumnDataIsNullArray(int row)
|
private int[] |
allocateColumnDataPositionArray(int row)
|
(package private) void |
allocateColumnOffsetAndLengthArrays()
|
protected boolean |
calculateColumnOffsetsForRow_(int rowIndex,
boolean allowServerFetch)
Calculate the column offsets for a row. |
(package private) void |
calculateLobColumnPositionsForRow()
|
private void |
checkAndThrowReceivedEndqryrm()
|
private void |
checkAndThrowReceivedEndqryrm(int lastValidBytePositionBeforeFetch)
|
private void |
checkForSplitRowAndComplete(int length)
Check if the data we want crosses a row split, and fetch more data if necessary. |
private void |
checkForSplitRowAndComplete(int length,
int index)
Check if the data we want crosses a row split, and fetch more data if necessary. |
protected void |
clearLobData_()
|
private int |
completeSplitRow(int index)
Fetch more data for a row that has been split up. |
protected byte[] |
findExtdtaData(int column)
|
Blob |
getBlobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a Blob object. |
Clob |
getClobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a Clob object. |
protected int |
getDecimalLength(int index)
|
protected void |
getMoreData_()
|
(package private) boolean |
getQryclsimpEnabled()
Check whether QRYCLSIMP is enabled on this cursor. |
(package private) void |
initializeColumnInfoArrays(Typdef typdef,
int columnCount,
int targetSqlamForTypdef)
|
(package private) boolean |
isNonTrivialDataLob(int index)
|
protected int |
locator(int column)
Get locator for LOB of the designated column Note that this method cannot be invoked on a LOB column that is NULL. |
void |
nullDataForGC()
|
private NetSqlca[] |
parseSQLCAGRP(Typdef typdef)
|
(package private) NetSqlca[] |
parseSQLCARD(Typdef typdef)
|
private void |
parseSQLCAXGRP(Typdef typdef,
NetSqlca netSqlca)
|
private NetSqlca |
parseSQLDCGRP()
|
private NetSqlca |
parseSQLDCROW()
|
(package private) void |
parseSQLDCTOKS()
|
private void |
parseSQLDCXGRP()
|
private NetSqlca[] |
parseSQLDIAGCI()
|
private void |
parseSQLDIAGCN()
|
private NetSqlca[] |
parseSQLDIAGGRP()
|
private void |
parseSQLDIAGSTT()
|
private java.lang.String |
parseVCS(Typdef typdefInEffect)
|
private byte[] |
readFdocaBytes(int length)
|
private int |
readFdocaInt()
|
private int |
readFdocaOneByte()
|
private int |
readFdocaOneByte(int index)
|
private java.lang.String |
readFdocaString(int length,
java.lang.String encoding)
|
private int |
readFdocaTwoByteLength()
|
private int |
readFdocaTwoByteLength(int index)
|
private void |
resetCurrentRowPosition()
|
(package private) void |
scanDataBufferForEndOfData()
Scan the data buffer to see if end of data (SQL state 02000) has been received. |
void |
setAllRowsReceivedFromServer(boolean b)
Set the value of value of allRowsReceivedFromServer_. |
(package private) void |
setQryclsimpEnabled(boolean flag)
Set a flag indicating whether QRYCLSIMP is enabled. |
private void |
shiftPartialRowToBeginning()
|
private int |
skipFdocaBytes(int length)
|
private int |
skipFdocaBytes(int length,
int index)
|
| Methods inherited from class org.apache.derby.client.am.Cursor |
|---|
allocateCharBuffer, allRowsReceivedFromServer, currentRowPositionIsEqualToNextRowPosition, dataBufferHasUnprocessedData, get_INTEGER, getArray, getAsciiStream, getBinaryStream, getBlob, getCharacterStream, getClob, getIsRowUpdated, getIsUpdateDeleteHole, getObject, getRef, getUnicodeStream, incrementRowsReadEvent, makeNextRowPositionCurrent, markNextRowPosition, next, resetDataBuffer, setIsRowUpdated, setIsUpdataDeleteHole, setNumberOfColumns, stepNext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
NetResultSet netResultSet_
NetAgent netAgent_
Typdef qrydscTypdef_
int targetSqlamForTypdef_
int numMddOverrides_
int maximumRowSize_
boolean blocking_
int[] typeToUseForComputingDataLength_
boolean[] isGraphic_
java.util.HashMap<java.lang.Integer,java.lang.Integer> extdtaPositions_
java.util.ArrayList<byte[]> extdtaData_
boolean rtnextrow_
private boolean qryclsimpEnabled_
| Constructor Detail |
|---|
NetCursor(NetAgent netAgent)
NetCursor(NetAgent netAgent,
int qryprctyp)
| Method Detail |
|---|
protected boolean calculateColumnOffsetsForRow_(int rowIndex,
boolean allowServerFetch)
throws SqlException,
DisconnectException
Pseudo-code:
calculateColumnOffsetsForRow_ in class CursorrowIndex - row indexallowServerFetch - if true, allow fetching more data from
server
true if the current row position is a
valid row position.
SqlException
DisconnectException
void scanDataBufferForEndOfData()
throws SqlException
SqlException
private int readFdocaInt()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int readFdocaOneByte()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int readFdocaOneByte(int index)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private byte[] readFdocaBytes(int length)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int readFdocaTwoByteLength()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int readFdocaTwoByteLength(int index)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int skipFdocaBytes(int length)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private int skipFdocaBytes(int length,
int index)
throws DisconnectException,
SqlException
DisconnectException
SqlExceptionprivate void shiftPartialRowToBeginning()
private void adjustColumnOffsetsForColumnsPreviouslyCalculated(int index)
index - the index of the column that was split, or -1 when not
fetching column dataprivate void resetCurrentRowPosition()
void calculateLobColumnPositionsForRow()
boolean isNonTrivialDataLob(int index)
protected void clearLobData_()
clearLobData_ in class Cursor
NetSqlca[] parseSQLCARD(Typdef typdef)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private NetSqlca[] parseSQLCAGRP(Typdef typdef)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private void parseSQLCAXGRP(Typdef typdef,
NetSqlca netSqlca)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private NetSqlca[] parseSQLDIAGGRP()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private void parseSQLDIAGSTT()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private NetSqlca[] parseSQLDIAGCI()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private void parseSQLDIAGCN()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private NetSqlca parseSQLDCGRP()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private NetSqlca parseSQLDCROW()
throws DisconnectException,
SqlException
DisconnectException
SqlException
void parseSQLDCTOKS()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private void parseSQLDCXGRP()
throws DisconnectException,
SqlException
DisconnectException
SqlException
private java.lang.String parseVCS(Typdef typdefInEffect)
throws DisconnectException,
SqlException
DisconnectException
SqlException
private java.lang.String readFdocaString(int length,
java.lang.String encoding)
throws DisconnectException,
SqlException
DisconnectException
SqlExceptionvoid allocateColumnOffsetAndLengthArrays()
protected byte[] findExtdtaData(int column)
protected int locator(int column)
Note that this method cannot be invoked on a LOB column that is NULL.
locator in class Cursorcolumn - column number, starts at 1
Lob.INVALID_LOCATOR if LOB
value was sent instead of locator
public Blob getBlobColumn_(int column,
Agent agent,
boolean toBePublished)
throws SqlException
CursorBlob object.
getBlobColumn_ in class Cursorcolumn - 1-based column indexagent - associated agenttoBePublished - whether the Blob will be published to the user
SqlException - if getting the Blob failsCursor.getBlobColumn_(int, org.apache.derby.client.am.Agent, boolean)
public Clob getClobColumn_(int column,
Agent agent,
boolean toBePublished)
throws SqlException
CursorClob object.
getClobColumn_ in class Cursorcolumn - 1-based column indexagent - associated agenttoBePublished - whether the Clob will be published to the user
SqlException - if getting the Clob failsCursor.getClobColumn_(int, org.apache.derby.client.am.Agent, boolean)
void initializeColumnInfoArrays(Typdef typdef,
int columnCount,
int targetSqlamForTypdef)
throws DisconnectException
DisconnectException
protected void getMoreData_()
throws SqlException
getMoreData_ in class CursorSqlExceptionpublic void nullDataForGC()
nullDataForGC in class Cursor
private void checkForSplitRowAndComplete(int length,
int index)
throws SqlException
length - the length in bytes of the data neededindex - the index of the column to be fetched, or -1 when not
fetching column data
SqlException
private void checkForSplitRowAndComplete(int length)
throws SqlException
checkForSplitRowAndComplete(int, int) for that.
length - the length in bytes of the data needed
SqlException
private void checkAndThrowReceivedEndqryrm()
throws SqlException
SqlException
private void checkAndThrowReceivedEndqryrm(int lastValidBytePositionBeforeFetch)
throws SqlException
SqlException
private int completeSplitRow(int index)
throws DisconnectException,
SqlException
index - the index of the column that was split, or -1 when not
fetching column data
lastValidBytePosition_ before more data
was fetched
DisconnectException
SqlExceptionprivate int[] allocateColumnDataPositionArray(int row)
private int[] allocateColumnDataComputedLengthArray(int row)
private boolean[] allocateColumnDataIsNullArray(int row)
protected int getDecimalLength(int index)
public final void setAllRowsReceivedFromServer(boolean b)
setAllRowsReceivedFromServer in class Cursorb - a boolean value indicating whether all
rows are received from the serverfinal void setQryclsimpEnabled(boolean flag)
flag - true if QRYCLSIMP is enabledfinal boolean getQryclsimpEnabled()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||