|
Sun Adapter for Oracle Applications API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stc.connector.oracleadapter.base.StatementAgentImpl
com.stc.connector.oracleadapter.base.PreparedStatementAgentImpl
public class PreparedStatementAgentImpl
Agent hosts PreparedStatement interface
Constructor Summary | |
---|---|
PreparedStatementAgentImpl()
Default constructor. |
|
PreparedStatementAgentImpl(com.stc.connector.db.Session session)
PreparedStatementAgent constructor. |
|
PreparedStatementAgentImpl(com.stc.connector.db.Session session,
int iScroll,
int iConcur)
PreparedStatementAgent constructor. |
|
PreparedStatementAgentImpl(com.stc.connector.db.Session session,
java.lang.String sSql)
PreparedStatementAgent constructor. |
|
PreparedStatementAgentImpl(com.stc.connector.db.Session session,
java.lang.String sSql,
int iScroll,
int iConcur)
PreparedStatementAgent constructor. |
Method Summary | |
---|---|
void |
addBatch()
Adds a set of parameters to the list of commands to be sent as a batch. |
void |
clearParameters()
Clears the value of all parameters. |
java.lang.String |
curRSetSig()
Calculates the Result Set Column signature. |
void |
enableResultSetsAndUpdateCounts()
Enables both Results Sets and Update Counts to be received after an execute call. |
void |
enableResultSetsOnly()
Enables only Result Sets to be received after an execute call. |
void |
enableUpdateCountsOnly()
Enables only Update Counts to be received after an execute call. |
boolean |
execute()
Executes the prepared SQL statement. |
com.stc.connector.appconn.db.ResultSetAgent |
executeQuery()
Executes the prepared SQL query and returns a ResultSetAgent that contains the generated result set |
int |
executeUpdate()
Executes the prepared SQL statement and returns the number of rows that were affected |
com.stc.connector.appconn.db.ResultSetAgent |
getCurRSetAgent()
Sets the current ResultSetAgent object. |
java.lang.String |
getPreparedStmt()
Returns the Prepared statement. |
java.lang.String |
getQueryString()
|
com.stc.connector.appconn.db.PreparedStatementResultSet[] |
getRSAgentList()
Gets the PreparedStatementResultSet list. |
java.lang.String[] |
getRSAgentSigs()
Gets ResultSetAgent signatures. |
int |
getUpdateCount()
Returns the records count of the last executed statement. |
boolean |
matchResultSetSignature(int ord)
Matches a particular Result Set's Column sigature with the current one and if so, points the current Result Set Agent to it. |
boolean |
resultsAvailable()
Determines whether results (Update Counts and/or Result Sets) are available after an execute. |
void |
sessionOpen(com.stc.connector.db.SessionEvent evt)
Processes a SessionOpen event. |
void |
setArray(int index,
java.sql.Array a)
Sets the Array value of indexed parameter. |
void |
setAsciiStream(int index,
java.io.InputStream is,
int length)
Sets the character value of indexed parameter with an input stream and specified length. |
void |
setBigDecimal(int index,
java.math.BigDecimal dec)
Sets the decimal value of indexed parameter. |
void |
setBinaryStream(int index,
java.io.InputStream is,
int length)
Sets the binary value of indexed parameter with an input stream and specified length. |
void |
setBlob(int index,
java.sql.Blob blob)
Sets the Blob value of indexed parameter. |
void |
setBoolean(int index,
boolean b)
Sets the boolean value of indexed parameter. |
void |
setByte(int index,
byte byt)
Sets the byte value of indexed parameter. |
void |
setBytes(int index,
byte[] bytes)
Sets the byte array value of indexed parameter. |
void |
setCharacterStream(int index,
java.io.Reader rd,
int length)
Sets the character value of indexed parameter with a reader stream and specified length. |
void |
setClob(int index,
java.sql.Clob clob)
Sets the Clob value of indexed parameter. |
void |
setCurRSetAgent(com.stc.connector.appconn.db.ResultSetAgent rsAgent)
Sets the current ResultSetAgent object. |
void |
setDate(int index,
java.sql.Date date)
Sets the date value of indexed parameter. |
void |
setDate(int index,
java.sql.Date date,
java.util.Calendar cal)
Sets the date value of indexed parameter with time zone from calendar. |
void |
setDouble(int index,
double d)
Sets the double value of indexed parameter. |
void |
setFloat(int index,
float f)
Sets the float value of indexed parameter. |
void |
setInt(int index,
int i)
Sets the integer value of indexed parameter. |
void |
setLong(int index,
long l)
Sets the long value of indexed parameter. |
void |
setNull(int index,
int type)
Nullifies value of the indexed parameter. |
void |
setNull(int index,
int type,
java.lang.String tname)
Nullifies value of indexed parameter. |
void |
setObject(int index,
java.lang.Object ob)
Sets value of indexed parameter with an object. |
void |
setObject(int index,
java.lang.Object ob,
int iType)
Sets value of indexed parameter with data type conversion. |
void |
setObject(int index,
java.lang.Object ob,
int iType,
int iScale)
Sets value of indexed parameter with data type conversion and specified scale. |
void |
setRef(int index,
java.sql.Ref ref)
Sets the Ref value of indexed parameter. |
void |
setRSAgentList(com.stc.connector.appconn.db.PreparedStatementResultSet[] rsAgentList)
Sets PreparedStatementResultSet list. |
void |
setRSAgentSigs(java.lang.String[] rsAgentSigs)
Sets ResultSetAgent signatures. |
void |
setShort(int index,
short si)
Sets the short value of indexed parameter. |
void |
setString(int index,
java.lang.String s)
Sets the string value of indexed parameter. |
void |
setTime(int index,
java.sql.Time t)
Sets the time value of indexed parameter. |
void |
setTime(int index,
java.sql.Time t,
java.util.Calendar cal)
Sets the time value of indexed parameter with time zone from calendar. |
void |
setTimestamp(int index,
java.sql.Timestamp ts)
Sets the timestamp value of indexed parameter. |
void |
setTimestamp(int index,
java.sql.Timestamp ts,
java.util.Calendar cal)
Sets the timestamp value of indexed parameter with time zone from calendar. |
Methods inherited from class com.stc.connector.oracleadapter.base.StatementAgentImpl |
---|
cancel, clearBatch, clearWarnings, executeBatch, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getWarnings, isClosed, queryName, resultSetConcurToString, resultSetDirToString, resultSetTypeToString, sessionClose, sessionReset, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, stmtInvoke |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.stc.connector.appconn.db.StatementAgent |
---|
cancel, clearBatch, clearWarnings, executeBatch, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getWarnings, isClosed, queryName, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, stmtInvoke |
Constructor Detail |
---|
public PreparedStatementAgentImpl()
public PreparedStatementAgentImpl(com.stc.connector.db.Session session)
session
- a Session object used to hold connection information.public PreparedStatementAgentImpl(com.stc.connector.db.Session session, int iScroll, int iConcur)
session
- a Session object used to hold connection information.iScroll
- resultset type; TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE.iConcur
- concurrency type; CONCUR_READ_ONLY, CONCUR_UPDATABLE.public PreparedStatementAgentImpl(com.stc.connector.db.Session session, java.lang.String sSql)
session
- a Session object used to hold connection information.sSql
- a SQL statement for the prepared statement.public PreparedStatementAgentImpl(com.stc.connector.db.Session session, java.lang.String sSql, int iScroll, int iConcur)
session
- a Session object used to hold connection information.sSql
- a SQL statement for the prepared statement.iScroll
- resultset type; TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVEiConcur
- concurrency type; CONCUR_READ_ONLY, CONCUR_UPDATABLE.Method Detail |
---|
public void setCurRSetAgent(com.stc.connector.appconn.db.ResultSetAgent rsAgent)
ResultSetAgent
object.
rsAgent
- the most recent ResultSetAgent
returned from a
execute()
.public com.stc.connector.appconn.db.ResultSetAgent getCurRSetAgent()
ResultSetAgent
object.
ResultSetAgent
returned from a
execute()
.public java.lang.String curRSetSig() throws java.sql.SQLException
java.sql.SQLException
- when there are SQL problemspublic void enableResultSetsOnly()
enableResultSetsOnly
in interface com.stc.connector.appconn.db.PreparedStatementAgent
public void enableUpdateCountsOnly()
enableUpdateCountsOnly
in interface com.stc.connector.appconn.db.PreparedStatementAgent
public void enableResultSetsAndUpdateCounts()
enableResultSetsAndUpdateCounts
in interface com.stc.connector.appconn.db.PreparedStatementAgent
public boolean matchResultSetSignature(int ord) throws java.sql.SQLException
matchResultSetSignature
in interface com.stc.connector.appconn.db.PreparedStatementAgent
ord
- the ordinal position of the particular Result Set.
java.sql.SQLException
- when SQL problems occur. when SQL problems occur.public boolean resultsAvailable() throws java.sql.SQLException
resultsAvailable
in interface com.stc.connector.appconn.db.PreparedStatementAgent
true
if Update Counts and/or Result Sets are available.
java.sql.SQLException
- when SQL problems occur. when SQL problems occur.public void sessionOpen(com.stc.connector.db.SessionEvent evt)
sessionOpen
in interface com.stc.connector.db.SessionEventListener
sessionOpen
in class StatementAgentImpl
evt
- a Session event which signals the connection is open.public void setNull(int index, int type) throws java.sql.SQLException
setNull
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.type
- the JDBC type code defined by java.sql.Types.
java.sql.SQLException
- when SQL problems occur.public void setNull(int index, int type, java.lang.String tname) throws java.sql.SQLException
setNull
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.type
- the JDBC type code defined by java.sql.Types.tname
- the fully qualified name of the parameter being set.
java.sql.SQLException
- when SQL problems occur.public void setObject(int index, java.lang.Object ob) throws java.sql.SQLException
setObject
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ob
- a Java object that holds the paramter value.
java.sql.SQLException
- when SQL problems occur.public void setObject(int index, java.lang.Object ob, int iType) throws java.sql.SQLException
setObject
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ob
- a Java object that holds the paramter value.iType
- the JDBC type code defined by java.sql.Types.
java.sql.SQLException
- when SQL problems occur.public void setObject(int index, java.lang.Object ob, int iType, int iScale) throws java.sql.SQLException
setObject
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ob
- a Java object that holds the paramter value.iType
- the JDBC type code defined by java.sql.Types.iScale
- the desired number of digits to the right of the decimal point.
java.sql.SQLException
- when SQL problems occur.public void setBoolean(int index, boolean b) throws java.sql.SQLException
setBoolean
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.b
- a boolean parameter value.
java.sql.SQLException
- when SQL problems occur.public void setByte(int index, byte byt) throws java.sql.SQLException
setByte
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.byt
- a byte parameter value.
java.sql.SQLException
- when SQL problems occur.public void setShort(int index, short si) throws java.sql.SQLException
setShort
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.si
- a short parameter value.
java.sql.SQLException
- when SQL problems occur.public void setInt(int index, int i) throws java.sql.SQLException
setInt
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.i
- an integer parameter value.
java.sql.SQLException
- when SQL problems occur.public void setLong(int index, long l) throws java.sql.SQLException
setLong
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.l
- a long parameter value.
java.sql.SQLException
- when SQL problems occur.public void setFloat(int index, float f) throws java.sql.SQLException
setFloat
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.f
- a float parameter value.
java.sql.SQLException
- when SQL problems occur.public void setDouble(int index, double d) throws java.sql.SQLException
setDouble
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.d
- a double parameter value.
java.sql.SQLException
- when SQL problems occur.public void setBigDecimal(int index, java.math.BigDecimal dec) throws java.sql.SQLException
setBigDecimal
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.dec
- a BigDecimal parameter value.
java.sql.SQLException
- when SQL problems occur.public void setDate(int index, java.sql.Date date) throws java.sql.SQLException
setDate
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.date
- a Date parameter value.
java.sql.SQLException
- when SQL problems occur.public void setDate(int index, java.sql.Date date, java.util.Calendar cal) throws java.sql.SQLException
setDate
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.date
- a Date parameter value.cal
- the Calendar object used to construct the Date object
java.sql.SQLException
- when SQL problems occur.public void setTime(int index, java.sql.Time t) throws java.sql.SQLException
setTime
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.t
- a Time parameter value.
java.sql.SQLException
- when SQL problems occur.public void setTime(int index, java.sql.Time t, java.util.Calendar cal) throws java.sql.SQLException
setTime
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.t
- a Time parameter value.cal
- the Calendar object used to construct the Time object.
java.sql.SQLException
- when SQL problems occur.public void setTimestamp(int index, java.sql.Timestamp ts) throws java.sql.SQLException
setTimestamp
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ts
- a Timestamp parameter value.
java.sql.SQLException
- when SQL problems occur.public void setTimestamp(int index, java.sql.Timestamp ts, java.util.Calendar cal) throws java.sql.SQLException
setTimestamp
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ts
- a Timestamp parameter value.cal
- the Calendar object used to construct the Time object.
java.sql.SQLException
- when SQL problems occur.public void setString(int index, java.lang.String s) throws java.sql.SQLException
setString
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.s
- a String parameter value.
java.sql.SQLException
- when SQL problems occur.public void setBytes(int index, byte[] bytes) throws java.sql.SQLException
setBytes
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.bytes
- a byte array parameter value.
java.sql.SQLException
- when SQL problems occur.public void setAsciiStream(int index, java.io.InputStream is, int length) throws java.sql.SQLException
setAsciiStream
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.is
- an Ascii stream parameter value.length
- the number of bytes to be read from the stream.
java.sql.SQLException
- when SQL problems occur.public void setBinaryStream(int index, java.io.InputStream is, int length) throws java.sql.SQLException
setBinaryStream
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.is
- an Binary stream parameter value.length
- the number of bytes to be read from the stream.
java.sql.SQLException
- when SQL problems occur.public void setCharacterStream(int index, java.io.Reader rd, int length) throws java.sql.SQLException
setCharacterStream
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.rd
- a Reader parameter value.length
- the number of characters to be read from the stream.
java.sql.SQLException
- when SQL problems occur.public void setArray(int index, java.sql.Array a) throws java.sql.SQLException
setArray
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.a
- an Array parameter value.
java.sql.SQLException
- when SQL problems occur.public void setBlob(int index, java.sql.Blob blob) throws java.sql.SQLException
setBlob
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.blob
- a Blob parameter value.
java.sql.SQLException
- when SQL problems occur.public void setClob(int index, java.sql.Clob clob) throws java.sql.SQLException
setClob
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.clob
- a Clob parameter value.
java.sql.SQLException
- when SQL problems occur.public void setRef(int index, java.sql.Ref ref) throws java.sql.SQLException
setRef
in interface com.stc.connector.appconn.db.PreparedStatementAgent
index
- the position of the parameter. It starts from 1.ref
- a Ref parameter value.
java.sql.SQLException
- when SQL problems occur.public void clearParameters() throws java.sql.SQLException
clearParameters
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public void addBatch() throws java.sql.SQLException
addBatch
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public boolean execute() throws java.sql.SQLException
execute
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public com.stc.connector.appconn.db.ResultSetAgent executeQuery() throws java.sql.SQLException
executeQuery
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface com.stc.connector.appconn.db.PreparedStatementAgent
getUpdateCount
in interface com.stc.connector.appconn.db.StatementAgent
getUpdateCount
in class StatementAgentImpl
java.sql.SQLException
- when SQL problems occur.public java.lang.String getPreparedStmt() throws java.sql.SQLException
getPreparedStmt
in interface com.stc.connector.appconn.db.PreparedStatementAgent
java.sql.SQLException
- when SQL problems occur.public void setRSAgentSigs(java.lang.String[] rsAgentSigs)
setRSAgentSigs
in interface com.stc.connector.appconn.db.PreparedStatementAgent
rsAgentSigs
- an array of signatures in string.public void setRSAgentList(com.stc.connector.appconn.db.PreparedStatementResultSet[] rsAgentList)
setRSAgentList
in interface com.stc.connector.appconn.db.PreparedStatementAgent
rsAgentList
- an array of PreparedStatementResultSet instances.public com.stc.connector.appconn.db.PreparedStatementResultSet[] getRSAgentList()
getRSAgentList
in interface com.stc.connector.appconn.db.PreparedStatementAgent
public java.lang.String[] getRSAgentSigs()
getRSAgentSigs
in interface com.stc.connector.appconn.db.PreparedStatementAgent
public java.lang.String getQueryString()
|
Sun Adapter for Oracle Applications API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |