Package org.apache.derby.impl.drda
Class DRDAResultSet
- java.lang.Object
-
- org.apache.derby.impl.drda.DRDAResultSet
-
class DRDAResultSet extends java.lang.ObjectDRDAResultSet holds result set information
-
-
Field Summary
Fields Modifier and Type Field Description protected intblksizeprotected intconcurType(package private) booleanexplicitlyClosedprivate java.util.ArrayList<java.lang.Object>extDtaObjectsList of Blobs and Clobs.private booleangotPrctypprotected booleanhasdataprotected intmaxblkextprotected intnbrrowprotected static intNOT_OPENEDprotected int[]outovr_drdaTypeprotected intoutovroptprotected ConsistencyTokenpkgcnstknprotected booleanqryblkrstprotected intqryclsimpstatic intQRYCLSIMP_DEFAULTprivate intqryprctypprotected booleanqryrelscrprotected booleanqryrfrtblprotected longqryrownbrprotected intqryrowsetprotected booleanqryrowsnsprotected booleanqryrtndtaprotected intqryscrornprotected longrowCountprivate java.sql.ResultSetrsprivate int[]rsDRDATypesprivate java.util.ArrayList<java.lang.Integer>rsExtPositionsprotected int[]rsLensprotected byte[]rslsetflgprivate int[]rsPrecisionprivate int[]rsScaleprotected intrtnextdtaprotected intscrollTypeprivate byte[]splitQRYDTA(package private) intstateprotected static intSUSPENDEDprotected intwithHoldCursor
-
Constructor Summary
Constructors Constructor Description DRDAResultSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddExtDtaObject(java.lang.Object o, int jdbcIndex)Add extDtaObjectprotected voidclearExtDtaObjects()Clear externalized lob objects in current result setprotected voidclose()This method closes the JDBC objects and frees up all references held by this object.protected voidCLSQRY()Explicitly close the result set by CLSQRY needed to check for double close.protected java.util.ArrayList<java.lang.Object>getExtDtaObjects()Get the extData Objectsprotected intgetQryprctyp()protected java.sql.ResultSetgetResultSet()java.lang.StringgetResultSetCursorName()Get the cursor name for the ResultSetprotected intgetRsDRDAType(int index)get resultset/out parameter DRDATypeprotected int[]getRsDRDATypes()protected intgetRsLen(int index)get resultset DRDALenprotected intgetRsPrecision(int index)get resultset /out parameter precisionprotected intgetRsScale(int index)get resultset /out parameter scalebyte[]getSplitQRYDTA()private java.lang.StringgetStateString(int i)protected booleanhasLobColumns()Check to see if the result set for this statement has at least one column that is BLOB/CLOB.protected booleanisClosed()is ResultSet closedprotected booleanisExtDtaValueNullable(int index)Is lob object nullableprotected voidreset()This method resets the state of this DRDAResultset object so that it can be re-used.protected voidsetOPNQRYOptions(int blksize, int qryblkctl, int maxblkext, int outovropt, int qryrowset, int qryclsimpl)Sets the OPNQRYOptions.protected voidsetPkgcnstkn(ConsistencyToken pkgcnstkn)set consistency token for this resultSetprotected voidsetQryprctyp(int qryprctyp)(package private) voidsetResultSet(java.sql.ResultSet value)Set result set and initialize type array.protected voidsetRsDRDAType(int index, int type)set resultset/out parameter DRDATypeprotected voidsetRsPrecision(int index, int precision)set resultset/out parameter precisionprotected voidsetRsScale(int index, int scale)set resultset/out parameter scalevoidsetSplitQRYDTA(byte[] data)protected voidsuspend()Set state to SUSPENDED (result set is opened)protected java.lang.StringtoDebugString(java.lang.String indent)protected booleanwasExplicitlyClosed()
-
-
-
Field Detail
-
NOT_OPENED
protected static final int NOT_OPENED
- See Also:
- Constant Field Values
-
SUSPENDED
protected static final int SUSPENDED
- See Also:
- Constant Field Values
-
QRYCLSIMP_DEFAULT
public static final int QRYCLSIMP_DEFAULT
- See Also:
- Constant Field Values
-
explicitlyClosed
boolean explicitlyClosed
-
state
int state
-
hasdata
protected boolean hasdata
-
rsLens
protected int[] rsLens
-
rsDRDATypes
private int[] rsDRDATypes
-
rsPrecision
private int[] rsPrecision
-
rsScale
private int[] rsScale
-
outovr_drdaType
protected int[] outovr_drdaType
-
withHoldCursor
protected int withHoldCursor
-
scrollType
protected int scrollType
-
concurType
protected int concurType
-
rowCount
protected long rowCount
-
rs
private java.sql.ResultSet rs
-
blksize
protected int blksize
-
maxblkext
protected int maxblkext
-
outovropt
protected int outovropt
-
qryclsimp
protected int qryclsimp
-
qryrelscr
protected boolean qryrelscr
-
qryrownbr
protected long qryrownbr
-
qryrfrtbl
protected boolean qryrfrtbl
-
qryscrorn
protected int qryscrorn
-
qryrowsns
protected boolean qryrowsns
-
qryblkrst
protected boolean qryblkrst
-
qryrtndta
protected boolean qryrtndta
-
qryrowset
protected int qryrowset
-
qryprctyp
private int qryprctyp
-
gotPrctyp
private boolean gotPrctyp
-
rtnextdta
protected int rtnextdta
-
nbrrow
protected int nbrrow
-
rslsetflg
protected byte[] rslsetflg
-
extDtaObjects
private java.util.ArrayList<java.lang.Object> extDtaObjects
List of Blobs and Clobs. Return values to send with extdta objects.
-
rsExtPositions
private java.util.ArrayList<java.lang.Integer> rsExtPositions
-
pkgcnstkn
protected ConsistencyToken pkgcnstkn
-
splitQRYDTA
private byte[] splitQRYDTA
-
-
Method Detail
-
setResultSet
void setResultSet(java.sql.ResultSet value) throws java.sql.SQLExceptionSet result set and initialize type array.- Parameters:
value-- Throws:
java.sql.SQLException
-
setPkgcnstkn
protected void setPkgcnstkn(ConsistencyToken pkgcnstkn)
set consistency token for this resultSet
-
getResultSet
protected java.sql.ResultSet getResultSet()
- Returns:
- the underlying java.sql.ResultSet
-
setSplitQRYDTA
public void setSplitQRYDTA(byte[] data)
-
getSplitQRYDTA
public byte[] getSplitQRYDTA()
-
getRsDRDATypes
protected int[] getRsDRDATypes()
- Returns:
- ResultSet DRDA DataTypes
-
setRsPrecision
protected void setRsPrecision(int index, int precision)set resultset/out parameter precision- Parameters:
index- - starting with 1precision-
-
getRsPrecision
protected int getRsPrecision(int index)
get resultset /out parameter precision- Parameters:
index- -starting with 1- Returns:
- precision of column
-
setRsScale
protected void setRsScale(int index, int scale)set resultset/out parameter scale- Parameters:
index- - starting with 1scale-
-
getRsScale
protected int getRsScale(int index)
get resultset /out parameter scale- Parameters:
index- -starting with 1- Returns:
- scale of column
-
setRsDRDAType
protected void setRsDRDAType(int index, int type)set resultset/out parameter DRDAType- Parameters:
index- - starting with 1type-
-
getRsDRDAType
protected int getRsDRDAType(int index)
get resultset/out parameter DRDAType- Parameters:
index- - starting with 1- Returns:
- DRDA Type of column
-
getRsLen
protected int getRsLen(int index)
get resultset DRDALen- Parameters:
index- - starting with 1- Returns:
- length of column value
-
addExtDtaObject
protected void addExtDtaObject(java.lang.Object o, int jdbcIndex)Add extDtaObject- Parameters:
o- - object to add
-
clearExtDtaObjects
protected void clearExtDtaObjects()
Clear externalized lob objects in current result set
-
isExtDtaValueNullable
protected boolean isExtDtaValueNullable(int index)
Is lob object nullable- Parameters:
index- - offset starting with 0- Returns:
- true if object is nullable
-
getExtDtaObjects
protected java.util.ArrayList<java.lang.Object> getExtDtaObjects()
Get the extData Objects- Returns:
- ArrayList with extdta
-
close
protected void close() throws java.sql.SQLExceptionThis method closes the JDBC objects and frees up all references held by this object.- Throws:
java.sql.SQLException
-
reset
protected void reset()
This method resets the state of this DRDAResultset object so that it can be re-used. This method should reset all variables of this class.
-
CLSQRY
protected void CLSQRY()
Explicitly close the result set by CLSQRY needed to check for double close.
-
wasExplicitlyClosed
protected boolean wasExplicitlyClosed()
-
hasLobColumns
protected boolean hasLobColumns() throws java.sql.SQLExceptionCheck to see if the result set for this statement has at least one column that is BLOB/CLOB.- Returns:
- True if the result has at least one blob/clob column; false otherwise.
- Throws:
java.sql.SQLException
-
getResultSetCursorName
public java.lang.String getResultSetCursorName() throws java.sql.SQLExceptionGet the cursor name for the ResultSet- Throws:
java.sql.SQLException
-
getQryprctyp
protected int getQryprctyp() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setQryprctyp
protected void setQryprctyp(int qryprctyp)
-
isClosed
protected boolean isClosed()
is ResultSet closed- Returns:
- whether the resultSet is closed
-
suspend
protected void suspend()
Set state to SUSPENDED (result set is opened)
-
toDebugString
protected java.lang.String toDebugString(java.lang.String indent)
-
getStateString
private java.lang.String getStateString(int i)
-
setOPNQRYOptions
protected void setOPNQRYOptions(int blksize, int qryblkctl, int maxblkext, int outovropt, int qryrowset, int qryclsimpl)Sets the OPNQRYOptions. For more information on the meaning of these values consult the DRDA Technical Standard document.- Parameters:
blksize- Query block Sizeqryblkctl- Use to set the query protocol typemaxblkext- Maximum number of extra blocksoutovropt- Output override optionqryrowset- Query row setqryclsimpl- Implicit query close setting
-
-