public class Cursor extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES |
int[] |
ccsid_ |
Charset[] |
charset_ |
protected int[] |
columnDataComputedLength_ |
protected ArrayList<boolean[]> |
columnDataIsNullCache_ |
protected ArrayList<int[]> |
columnDataLengthCache_ |
protected int[] |
columnDataPosition_ |
protected ArrayList<int[]> |
columnDataPositionCache_ |
int |
columns_ |
protected int |
currentRowPosition_ |
io.netty.buffer.ByteBuf |
dataBuffer_ |
int[] |
fdocaLength_ |
boolean |
hasLobs_ |
boolean[] |
isNull_ |
int[] |
jdbcTypes_ |
int |
lastValidBytePosition_ |
static int |
NULL_TERMINATED_BYTES |
static int |
NULL_TERMINATED_STRING |
boolean[] |
nullable_ |
static int |
STRING |
static int |
VARIABLE_SHORT_STRING |
static int |
VARIABLE_STRING |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateCharBuffer() |
boolean |
allRowsReceivedFromServer()
Return
true if all rows are received from the
server. |
protected boolean |
calculateColumnOffsetsForRow_(int rowIndex,
boolean allowServerFetch)
Calculate the column offsets for a row.
|
protected boolean |
calculateColumnOffsetsForRow() |
protected void |
clearLobData_() |
protected int |
get_INTEGER(int column) |
BigDecimal |
getBigDecimal(int column) |
Blob |
getBlob(int column) |
byte[] |
getBytes(int column) |
Clob |
getClob(int column) |
LocalDate |
getDate(int column) |
protected int |
getDecimalLength(int index) |
double |
getDouble(int column) |
float |
getFloat(int column) |
int |
getInt(int column) |
boolean |
getIsRowUpdated()
Get updated status for this row.
|
boolean |
getIsUpdateDeleteHole()
Get deleted status for this row.
|
long |
getLong(int column) |
protected void |
getMoreData_() |
Object |
getObject(int column) |
DB2RowId |
getRowID(int column) |
short |
getShort(int column) |
String |
getString(int column) |
LocalTime |
getTime(int column) |
Timestamp |
getTimestamp(int column,
Calendar cal) |
void |
incrementRowsReadEvent() |
protected int |
locator(int column)
Get locator for LOB of the designated column
|
protected void |
makeNextRowPositionCurrent() |
protected 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 |
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.
|
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 NULL_TERMINATED_BYTES
public io.netty.buffer.ByteBuf dataBuffer_
public int lastValidBytePosition_
public boolean hasLobs_
protected int currentRowPosition_
protected int[] columnDataPosition_
protected int[] columnDataComputedLength_
protected ArrayList<int[]> columnDataPositionCache_
protected ArrayList<int[]> columnDataLengthCache_
protected ArrayList<boolean[]> columnDataIsNullCache_
public int[] jdbcTypes_
public int columns_
public boolean[] nullable_
public Charset[] charset_
public boolean[] isNull_
public int[] fdocaLength_
public int[] ccsid_
public void setNumberOfColumns(int numberOfColumns)
protected boolean stepNext(boolean allowServerFetch)
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()
true if current row position is validpublic final boolean allRowsReceivedFromServer()
true if all rows are received from the
server.true if all rows are received from the
server.public final void resetDataBuffer()
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)protected final void markNextRowPosition()
protected final void makeNextRowPositionCurrent()
public final void incrementRowsReadEvent()
protected final int get_INTEGER(int column)
public final short getShort(int column)
throws SQLException
SQLExceptionpublic final int getInt(int column)
throws SQLException
SQLExceptionpublic final long getLong(int column)
throws SQLException
SQLExceptionpublic final float getFloat(int column)
throws SQLException
SQLExceptionpublic final double getDouble(int column)
throws SQLException
SQLExceptionpublic final BigDecimal getBigDecimal(int column) throws SQLException
SQLExceptionpublic final LocalDate getDate(int column)
public final LocalTime getTime(int column)
public final String getString(int column)
public final byte[] getBytes(int column)
public final DB2RowId getRowID(int column)
public final Blob getBlob(int column)
public final Clob getClob(int column)
public final Object getObject(int column)
public final void allocateCharBuffer()
protected boolean calculateColumnOffsetsForRow_(int rowIndex,
boolean allowServerFetch)
Pseudo-code:
rowIndex - row indexallowServerFetch - if true, allow fetching more data from
servertrue if the current row position is a
valid row position.protected void clearLobData_()
protected int locator(int column)
Note that this method cannot be invoked on a LOB column that is NULL.
column - column number, starts at 1Lob.INVALID_LOCATOR if LOB
value was sent instead of locatorprotected void getMoreData_()
public void nullDataForGC()
protected int getDecimalLength(int index)
public final void setAllRowsReceivedFromServer(boolean b)
b - a boolean value indicating whether all
rows are received from the serverprotected boolean calculateColumnOffsetsForRow()
Copyright © 2021. All rights reserved.