public abstract class Cursor
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Agent |
agent_ |
private boolean |
allRowsReceivedFromServer_ |
static int |
BYTES |
int[] |
ccsid_ |
(package private) char[] |
charBuffer_ |
java.lang.String[] |
charsetName_ |
protected int[] |
columnDataComputedLength_ |
protected java.util.ArrayList<boolean[]> |
columnDataIsNullCache_ |
protected java.util.ArrayList<int[]> |
columnDataLengthCache_ |
protected int[] |
columnDataPosition_ |
protected java.util.ArrayList<int[]> |
columnDataPositionCache_ |
int |
columns_ |
protected int |
currentRowPosition_ |
byte[] |
dataBuffer_ |
java.io.ByteArrayOutputStream |
dataBufferStream_ |
static int |
DBCS_CLOB |
int[] |
fdocaLength_ |
boolean |
hasLobs_ |
boolean[] |
isNull_ |
private boolean |
isRowUpdated_ |
(package private) boolean |
isUpdateDeleteHole_ |
(package private) java.util.ArrayList<java.lang.Boolean> |
isUpdateDeleteHoleCache_ |
int[] |
jdbcTypes_ |
int |
lastValidBytePosition_ |
(package private) int |
maxFieldSize_ |
static int |
MBCS_CLOB |
private int |
nextRowPosition_ |
static int |
NULL_TERMINATED_BYTES |
static int |
NULL_TERMINATED_STRING |
boolean[] |
nullable_ |
int |
position_ |
(package private) java.util.Calendar |
recyclableCalendar_ |
(package private) static java.lang.Boolean |
ROW_IS_NOT_NULL |
(package private) static java.lang.Boolean |
ROW_IS_NULL |
(package private) long |
rowsRead_ |
static int |
SBCS_CLOB |
static int |
STRING |
static int |
VARIABLE_BYTES |
static int |
VARIABLE_SHORT_BYTES |
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 abstract boolean |
calculateColumnOffsetsForRow_(int row,
boolean allowServerFetch)
Calculate the column offsets for a row.
|
protected abstract void |
clearLobData_() |
private ColumnTypeConversionException |
coercionError(java.lang.String targetType,
int sourceColumn) |
boolean |
currentRowPositionIsEqualToNextRowPosition() |
boolean |
dataBufferHasUnprocessedData() |
private long |
get_BIGINT(int column) |
private boolean |
get_BOOLEAN(int column) |
private byte[] |
get_CHAR_FOR_BIT_DATA(int column) |
private java.math.BigDecimal |
get_DECIMAL(int column) |
private double |
get_DOUBLE(int column) |
private float |
get_FLOAT(int column) |
protected int |
get_INTEGER(int column) |
private short |
get_SMALLINT(int column) |
private java.lang.Object |
get_UDT(int column) |
private byte[] |
get_VARCHAR_FOR_BIT_DATA(int column) |
java.sql.Array |
getArray(int column) |
java.io.InputStream |
getAsciiStream(int column) |
(package private) java.math.BigDecimal |
getBigDecimal(int column) |
java.io.InputStream |
getBinaryStream(int column) |
java.sql.Blob |
getBlob(int column) |
abstract Blob |
getBlobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a
Blob object. |
(package private) boolean |
getBoolean(int column) |
(package private) byte |
getByte(int column) |
(package private) byte[] |
getBytes(int column) |
private java.lang.String |
getCHAR(int column) |
java.io.Reader |
getCharacterStream(int column) |
java.sql.Clob |
getClob(int column) |
abstract Clob |
getClobColumn_(int column,
Agent agent,
boolean toBePublished)
Returns a
Clob object. |
private int |
getColumnPrecision(int column) |
private int |
getColumnScale(int column) |
(package private) java.sql.Date |
getDate(int column,
java.util.Calendar cal) |
private java.sql.Date |
getDATE(int column,
java.util.Calendar cal) |
private java.sql.Date |
getDateFromTIMESTAMP(int column,
java.util.Calendar cal) |
(package private) double |
getDouble(int column) |
private double |
getDoubleFromDECIMAL(int column) |
(package private) float |
getFloat(int column) |
(package private) int |
getInt(int column) |
boolean |
getIsRowUpdated()
Get updated status for this row.
|
boolean |
getIsUpdateDeleteHole()
Get deleted status for this row.
|
(package private) CallableLocatorProcedures |
getLocatorProcedures()
Returns a reference to the locator procedures.
|
(package private) long |
getLong(int column) |
private long |
getLongFromDECIMAL(int column,
java.lang.String targetType) |
protected abstract void |
getMoreData_() |
java.lang.Object |
getObject(int column) |
private java.util.Calendar |
getRecyclableCalendar()
Instantiate an instance of Calendar that can be re-used for getting
Time, Timestamp, and Date values from this cursor.
|
java.sql.Ref |
getRef(int column) |
(package private) short |
getShort(int column) |
(package private) java.lang.String |
getString(int column) |
private java.lang.String |
getStringFromDATE(int column) |
private java.lang.String |
getStringFromTIME(int column) |
private java.lang.String |
getStringFromTIMESTAMP(int column) |
private java.lang.String |
getStringWithoutConvert(int position,
int actualLength) |
(package private) java.sql.Time |
getTime(int column,
java.util.Calendar cal) |
private java.sql.Time |
getTIME(int column,
java.util.Calendar cal) |
private java.sql.Time |
getTimeFromTIMESTAMP(int column,
java.util.Calendar cal) |
(package private) java.sql.Timestamp |
getTimestamp(int column,
java.util.Calendar cal) |
private java.sql.Timestamp |
getTIMESTAMP(int column,
java.util.Calendar cal) |
private java.sql.Timestamp |
getTimestampFromDATE(int column,
java.util.Calendar cal) |
private java.sql.Timestamp |
getTimestampFromTIME(int column,
java.util.Calendar cal) |
java.io.InputStream |
getUnicodeStream(int column) |
private java.lang.String |
getVARCHAR(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 |
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.
|
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 java.io.ByteArrayOutputStream dataBufferStream_
public int position_
public int lastValidBytePosition_
public boolean hasLobs_
protected int currentRowPosition_
private int nextRowPosition_
protected int[] columnDataPosition_
protected int[] columnDataComputedLength_
private boolean allRowsReceivedFromServer_
long rowsRead_
int maxFieldSize_
protected java.util.ArrayList<int[]> columnDataPositionCache_
protected java.util.ArrayList<int[]> columnDataLengthCache_
protected java.util.ArrayList<boolean[]> columnDataIsNullCache_
java.util.ArrayList<java.lang.Boolean> isUpdateDeleteHoleCache_
boolean isUpdateDeleteHole_
private boolean isRowUpdated_
static final java.lang.Boolean ROW_IS_NULL
static final java.lang.Boolean ROW_IS_NOT_NULL
java.util.Calendar recyclableCalendar_
public int[] jdbcTypes_
public int columns_
public boolean[] nullable_
public java.lang.String[] charsetName_
public boolean[] isNull_
public int[] fdocaLength_
public int[] ccsid_
char[] charBuffer_
public Cursor(Agent agent)
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 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 markNextRowPosition()
public final void makeNextRowPositionCurrent()
public final void incrementRowsReadEvent()
private final boolean get_BOOLEAN(int column)
private final short get_SMALLINT(int column)
protected final int get_INTEGER(int column)
private final long get_BIGINT(int column)
private final float get_FLOAT(int column)
private final double get_DOUBLE(int column)
private final java.math.BigDecimal get_DECIMAL(int column)
throws SqlException
SqlExceptionprivate final double getDoubleFromDECIMAL(int column)
throws SqlException
SqlExceptionprivate final long getLongFromDECIMAL(int column,
java.lang.String targetType)
throws SqlException
SqlExceptionprivate final java.lang.String getVARCHAR(int column)
throws SqlException
SqlExceptionprivate final java.lang.String getCHAR(int column)
throws SqlException
SqlExceptionprivate final java.sql.Date getDATE(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Time getTIME(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Timestamp getTIMESTAMP(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Timestamp getTimestampFromDATE(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Timestamp getTimestampFromTIME(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Date getDateFromTIMESTAMP(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.sql.Time getTimeFromTIMESTAMP(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionprivate final java.lang.String getStringFromDATE(int column)
throws SqlException
SqlExceptionprivate final java.lang.String getStringFromTIME(int column)
throws SqlException
SqlExceptionprivate final java.lang.String getStringFromTIMESTAMP(int column)
throws SqlException
SqlExceptionprivate final byte[] get_CHAR_FOR_BIT_DATA(int column)
throws SqlException
SqlExceptionprivate final byte[] get_VARCHAR_FOR_BIT_DATA(int column)
throws SqlException
SqlExceptionprivate final java.lang.Object get_UDT(int column)
throws SqlException
SqlExceptionprivate java.util.Calendar getRecyclableCalendar()
CallableLocatorProcedures getLocatorProcedures()
These procedures are used to operate on large objects referenced on the server by locators.
protected 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 failsfinal boolean getBoolean(int column)
throws SqlException
SqlExceptionfinal byte getByte(int column)
throws SqlException
SqlExceptionfinal short getShort(int column)
throws SqlException
SqlExceptionfinal int getInt(int column)
throws SqlException
SqlExceptionfinal long getLong(int column)
throws SqlException
SqlExceptionfinal float getFloat(int column)
throws SqlException
SqlExceptionfinal double getDouble(int column)
throws SqlException
SqlExceptionfinal java.math.BigDecimal getBigDecimal(int column)
throws SqlException
SqlExceptionfinal java.sql.Date getDate(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionfinal java.sql.Time getTime(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionfinal java.sql.Timestamp getTimestamp(int column,
java.util.Calendar cal)
throws SqlException
SqlExceptionfinal java.lang.String getString(int column)
throws SqlException
SqlExceptionfinal byte[] getBytes(int column)
throws SqlException
SqlExceptionpublic final java.io.InputStream getBinaryStream(int column)
throws SqlException
SqlExceptionpublic final java.io.InputStream getAsciiStream(int column)
throws SqlException
SqlExceptionpublic final java.io.InputStream getUnicodeStream(int column)
throws SqlException
SqlExceptionpublic final java.io.Reader getCharacterStream(int column)
throws SqlException
SqlExceptionpublic final java.sql.Blob getBlob(int column)
throws SqlException
SqlExceptionpublic final java.sql.Clob getClob(int column)
throws SqlException
SqlExceptionpublic final java.sql.Array getArray(int column)
throws SqlException
SqlExceptionpublic final java.sql.Ref getRef(int column)
throws SqlException
SqlExceptionpublic final java.lang.Object getObject(int column)
throws SqlException
SqlExceptionpublic final void allocateCharBuffer()
private final java.lang.String getStringWithoutConvert(int position,
int actualLength)
private ColumnTypeConversionException coercionError(java.lang.String targetType, int sourceColumn)
public void nullDataForGC()
private final int getColumnPrecision(int column)
private final int getColumnScale(int column)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.