|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.drda.DRDAStatement
DRDAStatement stores information about the statement being executed
Field Summary | |
protected int |
blksize
|
protected int |
byteOrder
|
protected int |
ccsidDBC
|
protected java.lang.String |
ccsidDBCEncoding
|
protected int |
ccsidMBC
|
protected java.lang.String |
ccsidMBCEncoding
|
protected int |
ccsidSBC
|
protected java.lang.String |
ccsidSBCEncoding
|
protected java.util.Vector |
cliParamDrdaTypes
|
protected java.util.ArrayList |
cliParamExtPositions
|
protected java.util.Vector |
cliParamLens
|
protected int |
concurType
|
private DRDAResultSet |
currentDrdaRs
|
protected java.lang.String |
cursorName
|
protected Database |
database
|
(package private) boolean |
explicitlyPrepared
|
protected boolean |
isCall
|
protected int |
isolationLevel
|
protected int |
maxblkext
|
protected int |
maxrslcnt
|
protected int |
nbrrow
|
(package private) boolean |
needsToSendParamData
|
protected static int |
NOT_OUTPUT_PARAM
|
private int |
numResultSets
|
protected int |
outovropt
|
protected boolean |
outputExpected
|
private int[] |
outputTypes
|
protected java.lang.String |
pkgcnstknStr
|
protected java.lang.String |
pkgid
|
private java.lang.String |
pkgnamcsn
|
protected java.lang.String |
procName
|
protected java.sql.PreparedStatement |
ps
|
protected int |
qryclsimp
|
private int |
qryprctyp
|
protected boolean |
qryrfrtbl
|
protected int |
qryrowset
|
private java.util.ArrayList |
resultSetKeyList
|
private java.util.Hashtable |
resultSetTable
|
protected long |
rowCount
|
protected byte[] |
rslsetflg
|
protected int |
scrollType
|
protected java.lang.String |
sectionNumber
|
private java.sql.Statement |
stmt
|
protected java.lang.String |
typDefNam
|
protected int |
withHoldCursor
|
Constructor Summary | |
protected |
DRDAStatement(Database database)
DRDAStatement constructor |
Method Summary | |
protected void |
addExtDtaObject(java.lang.Object o,
int jdbcIndex)
Add extDtaObject |
protected java.lang.String |
addResultSet(java.sql.ResultSet value)
Add a new resultSet to this statement. |
protected java.lang.String |
calculateResultSetPkgcnstknStr(int rsNum)
For a single result set, just echo the consistency token that the client sent us. |
protected void |
clearExtDtaObjects()
Clear externalized lob objects in current result set |
protected void |
close()
Clean up statements and resultSet |
protected void |
CLSQRY()
Explicitly close the result set by CLSQRY needed to check for double close. |
protected boolean |
execute()
Executes the prepared statement and populates the resultSetTable. |
protected java.sql.PreparedStatement |
explicitPrepare(java.lang.String sqlStmt)
|
private java.lang.String |
extractPkgcnstknStr(java.lang.String pkgnamcsn)
|
protected void |
finishParams()
clear out type data for parameters. |
protected int |
getBlksize()
|
protected int |
getConcurType()
|
private DRDAResultSet |
getDrdaResultSet(int rsNum)
|
private DRDAResultSet |
getDrdaResultSet(java.lang.String consistToken)
|
protected java.util.ArrayList |
getExtDtaObjects()
Get the extData Objects |
protected int |
getNumParams()
get the number of parameters for this statement |
protected int |
getNumResultSets()
|
protected int |
getNumRsCols()
get the number of result set columns for the current resultSet |
protected int[] |
getOutovr_drdaType()
|
protected static int |
getOutputParameterTypeFromClassName(java.lang.String objectName)
Given an object class name get the paramameter type if the parameter mode is unknown. |
(package private) int |
getOutputParamType(int paramNum)
get type for output parameter. |
protected int |
getParamDRDAType(int index)
get parameter DRDAType |
protected int |
getParamLen(int index)
returns drda length of parameter as sent by client. |
protected int |
getParamPrecision(int index)
get parameter precision or DB2 max (31) |
protected int |
getParamScale(int index)
get parameter scale or DB2 max (31) |
protected java.lang.String |
getPkgnamcsn()
Get pkgnamcsn |
protected java.sql.PreparedStatement |
getPreparedStatement()
Get prepared statement |
protected int |
getQryclsimp()
|
protected void |
getQryclsimp(int value)
|
protected int |
getQryprctyp()
|
protected long |
getQryrownbr()
|
protected int |
getQryrowset()
|
protected boolean |
getQryrtndta()
|
protected int |
getQryscrorn()
|
protected java.sql.ResultSet |
getResultSet()
Get result set |
private java.sql.ResultSet |
getResultSet(int rsNum)
Just get the resultset. |
java.lang.String |
getResultSetCursorName(int rsNum)
|
protected java.lang.String |
getResultSetPkgcnstknStr(int rsNum)
|
protected int |
getRsDRDAType(int index)
get resultset/out parameter DRDAType |
protected int[] |
getRsDRDATypes()
|
protected int |
getRsLen(int index)
get resultset/out parameter DRDALen |
protected int[] |
getRsLens()
|
protected int |
getRsPrecision(int index)
get resultset /out paramter precision |
protected int |
getRsScale(int index)
get resultset /out paramter scale |
protected int |
getScrollType()
|
protected java.sql.Statement |
getStatement()
Get the statement |
private int |
getStaticPackageIsolation(java.lang.String pkgid)
get the isolation level for a static package. |
protected boolean |
hasdata()
|
protected boolean |
hasOutputParams()
|
protected void |
initialize()
Initialize for reuse |
private boolean |
isCallableSQL(java.lang.String sql)
|
protected boolean |
isCallableStatement()
|
private boolean |
isDynamicPkgid(java.lang.String pkgid)
|
protected boolean |
isExtDtaValueNullable(int index)
|
(package private) boolean |
isOutputParam(int paramNum)
is parameter an ouput parameter |
boolean |
isProcedure()
return whether this is a procedure |
private void |
parsePkgidToFindHoldability()
|
protected java.sql.PreparedStatement |
prepare(java.lang.String sqlStmt)
Create a prepared statement |
void |
registerAllOutParams()
|
void |
registerOutParam(int paramNum)
|
protected void |
rsClose()
Close the current resultSet |
protected boolean |
rsIsClosed()
is Statement closed |
protected void |
rsSuspend()
Set state to SUSPENDED (result set is opened) |
protected void |
setConcurType(int scrollType)
|
protected void |
setCurrentDrdaResultSet(int rsNum)
Set currentDrdaResultSet |
protected void |
setCurrentDrdaResultSet(java.lang.String pkgnamcsn)
Set currentDrdaResultSet |
protected void |
setDatabase(Database database)
Set database |
protected void |
setExtDtaObjects(java.util.ArrayList a)
Set the extData Objects |
protected void |
setHasdata(boolean hasdata)
|
protected void |
setOPNQRYOptions(int blksize,
int qryblkctl,
int maxblkext,
int outovropt,
int qryrowset,
int qryclsimpl)
Set query options sent on OPNQRY |
protected void |
setOutovr_drdaType(int[] outovr_drdaType)
|
protected void |
setParamDRDAType(int index,
byte type)
set param DRDAType |
protected void |
setParamLen(int index,
int value)
save parameter len sent by client |
protected void |
setPkgnamcsn(java.lang.String pkgnamcsn)
Set the pkgid sec num for this statement and the consistency token that will be used for the first resultSet. |
protected void |
setQryprctyp(int qryprctyp)
|
protected void |
setQryrownbr(long qryrownbr)
|
protected void |
setQryrtndta(boolean qryrtndta)
|
protected void |
setQryscrorn(int qryscrorn)
|
protected void |
setQueryOptions(int blksize,
boolean qryrelscr,
long qryrownbr,
boolean qryfrtbl,
int nbrrow,
int maxblkext,
int qryscrorn,
boolean qryrowsns,
boolean qryblkrst,
boolean qryrtndta,
int qryrowset,
int rtnextdta)
|
protected void |
setResultSet(java.sql.ResultSet value)
Set result set |
protected void |
setRsDefaultOptions()
Set result set options to default for statement |
protected void |
setRsDefaultOptions(DRDAResultSet drs)
Set resultSet defaults to match the statement defaults sent on EXCSQLSTT This might be overridden on OPNQRY or CNTQRY |
protected void |
setRsDRDAType(int index,
int type)
set result DRDAType |
protected void |
setRsDRDATypes(int[] value)
Set ResultSet DRDA DataTypes |
protected void |
setRsLen(int index,
int value)
set resultset column data length |
protected void |
setRsLens(int[] value)
Set ResultSet DRDA DataTypes Lengths |
protected void |
setRsPrecision(int index,
int precision)
set resultset/out parameter precision |
protected void |
setRsScale(int index,
int scale)
set resultset/out parameter scale |
protected void |
setScrollType(int scrollType)
|
protected void |
setStatement(java.sql.Connection conn)
Set statement |
protected void |
setTypDefValues()
set TypDef values |
private void |
setupCallableStatementParams(java.sql.CallableStatement cs)
|
protected java.lang.String |
toDebugString(java.lang.String indent)
|
protected boolean |
wasExplicitlyClosed()
|
protected boolean |
wasExplicitlyPrepared()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String typDefNam
protected int byteOrder
protected int ccsidSBC
protected int ccsidDBC
protected int ccsidMBC
protected java.lang.String ccsidSBCEncoding
protected java.lang.String ccsidDBCEncoding
protected java.lang.String ccsidMBCEncoding
protected Database database
private java.lang.String pkgnamcsn
protected java.lang.String pkgcnstknStr
protected java.lang.String pkgid
protected java.lang.String sectionNumber
protected int withHoldCursor
protected int isolationLevel
protected java.lang.String cursorName
protected int scrollType
protected int concurType
protected long rowCount
protected byte[] rslsetflg
protected int maxrslcnt
protected java.sql.PreparedStatement ps
protected boolean isCall
protected java.lang.String procName
private int[] outputTypes
protected static int NOT_OUTPUT_PARAM
protected boolean outputExpected
private java.sql.Statement stmt
private DRDAResultSet currentDrdaRs
private java.util.Hashtable resultSetTable
private java.util.ArrayList resultSetKeyList
private int numResultSets
protected java.util.Vector cliParamDrdaTypes
protected java.util.Vector cliParamLens
protected java.util.ArrayList cliParamExtPositions
protected int nbrrow
protected int qryrowset
protected int blksize
protected int maxblkext
protected int outovropt
protected int qryclsimp
protected boolean qryrfrtbl
private int qryprctyp
boolean needsToSendParamData
boolean explicitlyPrepared
Constructor Detail |
protected DRDAStatement(Database database)
database
- Method Detail |
protected void setTypDefValues()
protected void setDatabase(Database database)
database
- protected void setStatement(java.sql.Connection conn) throws java.sql.SQLException
conn
- Connection
java.sql.SQLException
protected java.sql.Statement getStatement() throws java.sql.SQLException
java.sql.SQLException
protected void setRsDefaultOptions(DRDAResultSet drs)
protected void setRsDefaultOptions()
protected java.util.ArrayList getExtDtaObjects()
protected void setExtDtaObjects(java.util.ArrayList a)
protected void addExtDtaObject(java.lang.Object o, int jdbcIndex)
o
- - object to addjdbcIndex
- - jdbc index for parameterprotected void clearExtDtaObjects()
protected boolean isExtDtaValueNullable(int index)
protected void setOPNQRYOptions(int blksize, int qryblkctl, int maxblkext, int outovropt, int qryrowset, int qryclsimpl)
protected void setQueryOptions(int blksize, boolean qryrelscr, long qryrownbr, boolean qryfrtbl, int nbrrow, int maxblkext, int qryscrorn, boolean qryrowsns, boolean qryblkrst, boolean qryrtndta, int qryrowset, int rtnextdta)
protected void setQryprctyp(int qryprctyp)
protected int getQryprctyp() throws java.sql.SQLException
java.sql.SQLException
protected void setQryrownbr(long qryrownbr)
protected long getQryrownbr()
protected int getQryrowset()
protected int getBlksize()
protected void setQryrtndta(boolean qryrtndta)
protected boolean getQryrtndta()
protected void setQryscrorn(int qryscrorn)
protected int getQryscrorn()
protected void getQryclsimp(int value)
protected int getQryclsimp()
protected void setScrollType(int scrollType)
protected int getScrollType()
protected void setConcurType(int scrollType)
protected int getConcurType()
protected void setOutovr_drdaType(int[] outovr_drdaType)
protected int[] getOutovr_drdaType()
protected boolean hasdata()
protected void setHasdata(boolean hasdata)
protected void initialize()
protected java.sql.PreparedStatement explicitPrepare(java.lang.String sqlStmt) throws java.sql.SQLException
java.sql.SQLException
protected boolean wasExplicitlyPrepared()
protected java.sql.PreparedStatement prepare(java.lang.String sqlStmt) throws java.sql.SQLException
sqlStmt
- - SQL statement
java.sql.SQLException
protected java.sql.PreparedStatement getPreparedStatement()
protected boolean execute() throws java.sql.SQLException
java.sql.SQLException
protected void finishParams()
protected void setPkgnamcsn(java.lang.String pkgnamcsn)
pkgnamcsn
- package id section number and token from the clientprivate int getStaticPackageIsolation(java.lang.String pkgid)
pkgid
- - Package identifier string (e.g. SYSSTAT)
protected java.lang.String getPkgnamcsn()
protected java.sql.ResultSet getResultSet()
private java.sql.ResultSet getResultSet(int rsNum)
protected void setResultSet(java.sql.ResultSet value) throws java.sql.SQLException
value
-
java.sql.SQLException
protected void setCurrentDrdaResultSet(int rsNum)
rsNum
- The result set number starting with 0protected void setCurrentDrdaResultSet(java.lang.String pkgnamcsn)
private DRDAResultSet getDrdaResultSet(java.lang.String consistToken)
private DRDAResultSet getDrdaResultSet(int rsNum)
private java.lang.String extractPkgcnstknStr(java.lang.String pkgnamcsn)
protected java.lang.String addResultSet(java.sql.ResultSet value) throws java.sql.SQLException
value
- - ResultSet to add
java.sql.SQLException
protected int getNumResultSets()
protected java.lang.String getResultSetPkgcnstknStr(int rsNum)
rsNum
- result set starting with 0
protected void setRsDRDATypes(int[] value)
protected int[] getRsDRDATypes()
protected void setRsLens(int[] value)
protected int[] getRsLens()
protected void rsClose() throws java.sql.SQLException
java.sql.SQLException
protected void CLSQRY()
protected boolean wasExplicitlyClosed()
protected void close() throws java.sql.SQLException
java.sql.SQLException
protected boolean rsIsClosed()
protected void rsSuspend()
protected void setRsPrecision(int index, int precision)
index
- - starting with 1precision
- protected int getRsPrecision(int index)
index
- -starting with 1
protected void setRsScale(int index, int scale)
index
- - starting with 1scale
- protected int getRsScale(int index)
index
- -starting with 1
protected void setRsDRDAType(int index, int type)
index
- - starting with 1type
- protected int getParamDRDAType(int index)
index
- - starting with 1
protected void setParamDRDAType(int index, byte type)
index
- - starting with 1type
- protected int getParamLen(int index)
index
-
protected int getParamPrecision(int index) throws java.sql.SQLException
index
- parameter index starting with 1
java.sql.SQLException
protected int getParamScale(int index) throws java.sql.SQLException
index
- parameter index starting with 1
java.sql.SQLException
protected void setParamLen(int index, int value)
index
- parameter index starting with 1value
- length of data valueprotected int getNumParams()
protected int getNumRsCols()
protected int getRsDRDAType(int index)
index
- - starting with 1
protected int getRsLen(int index)
index
- starting with 1
protected void setRsLen(int index, int value)
index
- starting with 1public boolean isProcedure()
public java.lang.String getResultSetCursorName(int rsNum) throws java.sql.SQLException
rsNum
- - result set # starting with 0
java.sql.SQLException
protected java.lang.String toDebugString(java.lang.String indent)
protected java.lang.String calculateResultSetPkgcnstknStr(int rsNum)
rsNum
- - result set # starting with 0
protected boolean isCallableStatement()
private boolean isCallableSQL(java.lang.String sql)
private void setupCallableStatementParams(java.sql.CallableStatement cs) throws java.sql.SQLException
java.sql.SQLException
protected static int getOutputParameterTypeFromClassName(java.lang.String objectName)
objectName
- Class name of object being evaluated.
indicating if this an output parameter
public void registerAllOutParams() throws java.sql.SQLException
java.sql.SQLException
public void registerOutParam(int paramNum) throws java.sql.SQLException
java.sql.SQLException
protected boolean hasOutputParams()
boolean isOutputParam(int paramNum)
paramNum
- parameter number starting with 1.
return true if this is an output parameter.int getOutputParamType(int paramNum)
paramNum
- - parameter number starting with 1
private boolean isDynamicPkgid(java.lang.String pkgid)
private void parsePkgidToFindHoldability()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |