| Modifier and Type | Class and Description |
|---|---|
static class |
Cursor.ThreadContextObjectInputStream
allow using Thread context ClassLoader to load classes
|
| Constructor and Description |
|---|
Cursor(Agent agent) |
Cursor(Agent agent,
byte[] dataBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateCharBuffer() |
boolean |
allRowsReceivedFromServer()
Return
true if all rows are received from the
server. |
protected abstract boolean |
calculateColumnOffsetsForRow_(int row,
boolean allowServerFetch)
Calculate the column offsets for a row.
|
protected abstract void |
clearLobData_() |
boolean |
currentRowPositionIsEqualToNextRowPosition() |
boolean |
dataBufferHasUnprocessedData() |
protected int |
get_INTEGER(int column) |
Array |
getArray(int column) |
InputStream |
getAsciiStream(int column) |
InputStream |
getBinaryStream(int column) |
Blob |
getBlob(int column) |
abstract Blob |
getBlobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a
Blob object. |
Reader |
getCharacterStream(int column) |
Clob |
getClob(int column) |
abstract byte[] |
getClobBytes_(int column,
int[] dataOffset) |
abstract Clob |
getClobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a
Clob object. |
protected abstract String |
getColumnLabel(int column) |
byte[] |
getDataBuffer() |
int |
getDataBufferLength() |
boolean |
getIsRowUpdated()
Get updated status for this row.
|
boolean |
getIsUpdateDeleteHole()
Get deleted status for this row.
|
int |
getLastValidBytePosition() |
protected abstract void |
getMoreData_() |
Object |
getObject(int column) |
Ref |
getRef(int column) |
InputStream |
getUnicodeStream(int column) |
void |
incrementRowsReadEvent() |
protected abstract int |
locator(int column)
Returns the locator for the specified LOB column, or
Lob.INVALID_LOCATOR if the LOB was not sent as a locator. |
void |
makeNextRowPositionCurrent() |
void |
markCurrentRowPosition() |
void |
markNextRowPosition() |
boolean |
next()
Makes the next row the current row.
|
void |
nullDataForGC() |
void |
resetDataBuffer() |
void |
setAllRowsReceivedFromServer(boolean b)
Set the value of value of allRowsReceivedFromServer_.
|
void |
setBuffer(byte[] dataBuffer) |
void |
setIsRowUpdated(boolean isRowUpdated)
Keep track of updated status for this row.
|
void |
setIsUpdataDeleteHole(int row,
boolean isRowNull) |
void |
setNumberOfColumns(int numberOfColumns) |
protected boolean |
stepNext(boolean allowServerFetch)
Makes the next row the current row.
|
protected Agent agent_
public static final int STRING
public static final int VARIABLE_STRING
public static final int VARIABLE_SHORT_STRING
public static final int NULL_TERMINATED_STRING
public static final int BYTES
public static final int VARIABLE_BYTES
public static final int VARIABLE_SHORT_BYTES
public static final int NULL_TERMINATED_BYTES
public static final int SBCS_CLOB
public static final int MBCS_CLOB
public static final int DBCS_CLOB
public byte[] dataBuffer_
public ByteArrayOutputStream dataBufferStream_
public int position_
public int lastValidBytePosition_
public boolean hasLobs_
protected int currentRowPosition_
protected int[] columnDataPosition_
protected int[] columnDataComputedLength_
protected ArrayList columnDataPositionCache_
protected ArrayList columnDataLengthCache_
protected ArrayList columnDataIsNullCache_
public ArrayList isUpdateDeleteHoleCache_
public boolean isUpdateDeleteHole_
public static final Charset ISO_8859_1
public static final Boolean ROW_IS_NULL
public static final Boolean ROW_IS_NOT_NULL
public int[] jdbcTypes_
public int columns_
public boolean[] nullable_
public String[] charsetName_
public boolean[] isNull_
public int[] fdocaLength_
public int[] ccsid_
protected final CallableLocatorProcedures locatorProcs_
public static final ThreadLocal ALLOW_THREADCONTEXT_CLASSLOADER
public Cursor(Agent agent)
public Cursor(Agent agent, byte[] dataBuffer)
public void setNumberOfColumns(int numberOfColumns)
protected boolean stepNext(boolean allowServerFetch)
throws SqlException
allowServerFetch - if false, don't fetch more data from
the server even if more data is neededtrue if current row position is validSqlException - if an error occurspublic boolean next()
throws SqlException
true if current row position is validSqlException - if an error occurspublic void setAllRowsReceivedFromServer(boolean b)
b - a boolean value indicating whether all
rows are received from the serverpublic final boolean allRowsReceivedFromServer()
true if all rows are received from the
server.true if all rows are received from the
server.public final boolean currentRowPositionIsEqualToNextRowPosition()
public final void resetDataBuffer()
public final boolean dataBufferHasUnprocessedData()
protected abstract boolean calculateColumnOffsetsForRow_(int row,
boolean allowServerFetch)
throws SqlException,
DisconnectException
row - row indexallowServerFetch - if true, allow fetching more data from
servertrue if the current row position is a
valid row position.SqlExceptionDisconnectExceptionprotected abstract void clearLobData_()
protected abstract void getMoreData_()
throws SqlException
SqlExceptionpublic final void setBuffer(byte[] dataBuffer)
public final void setIsUpdataDeleteHole(int row,
boolean isRowNull)
public final void setIsRowUpdated(boolean isRowUpdated)
isRowUpdated - true if row has been updatedgetIsRowUpdated()public final boolean getIsRowUpdated()
setIsRowUpdated(boolean)public final boolean getIsUpdateDeleteHole()
setIsUpdataDeleteHole(int, boolean)public final void markCurrentRowPosition()
public final void markNextRowPosition()
public final void makeNextRowPositionCurrent()
public final byte[] getDataBuffer()
public final int getDataBufferLength()
public final int getLastValidBytePosition()
public final void incrementRowsReadEvent()
protected final int get_INTEGER(int column)
protected abstract String getColumnLabel(int column) throws SqlException
SqlExceptionprotected abstract int locator(int column)
Lob.INVALID_LOCATOR if the LOB was not sent as a locator. The server
may send the LOB value instead of a locator if it is running an old
version which doesn't support locators, or if the database it accesses
is soft upgraded from a version that doesn't have the necessary
stored procedures for locator support.
Note that this method cannot be invoked on a LOB column that is NULL.
column - 1-based column indexLob.INVALID_LOCATOR
otherwise.public abstract Blob getBlobColumn_(int column, Agent agent, boolean toBePublished) throws SqlException
Blob object.column - 1-based column indexagent - associated agenttoBePublished - whether the Blob will be published to the userSqlException - if getting the Blob failspublic abstract Clob getClobColumn_(int column, Agent agent, boolean toBePublished) throws SqlException
Clob object.column - 1-based column indexagent - associated agenttoBePublished - whether the Clob will be published to the userSqlException - if getting the Clob failspublic abstract byte[] getClobBytes_(int column,
int[] dataOffset)
throws SqlException
SqlExceptionpublic final InputStream getBinaryStream(int column) throws SqlException
SqlExceptionpublic final InputStream getAsciiStream(int column) throws SqlException
SqlExceptionpublic final InputStream getUnicodeStream(int column) throws SqlException
SqlExceptionpublic final Reader getCharacterStream(int column) throws SqlException
SqlExceptionpublic final Blob getBlob(int column) throws SqlException
SqlExceptionpublic final Clob getClob(int column) throws SqlException
SqlExceptionpublic final Array getArray(int column) throws SqlException
SqlExceptionpublic final Ref getRef(int column) throws SqlException
SqlExceptionpublic final Object getObject(int column) throws SqlException
SqlExceptionpublic final void allocateCharBuffer()
public void nullDataForGC()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.