|
oracle eWay API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.oracleadapter.base.StatementAgentImpl
public abstract class StatementAgentImpl
Agent hosts a managed Statement object
Field Summary | |
---|---|
protected int |
concurrencyType
Current concurrency type. |
protected com.stc.connector.db.StatementEventListener |
listener
A StatementEventListener instance. |
protected static java.util.HashMap |
resultSetConcurMap
Map resultet concurrency to string. |
protected int |
resultsetDirection
Current resultset direction. |
protected static java.util.HashMap |
resultSetDirMap
Map resultset direction to string. |
protected int |
resultsetType
Current resultset type. |
protected static java.util.HashMap |
resultSetTypeMap
Map resultset type to string. |
protected com.stc.connector.db.Session |
session
A Session instance that holds the connection information. |
protected java.sql.SQLException |
sqlException
A SQLException instance used for holding error information. |
protected java.sql.Statement |
statement
A Statement instance used for SQL operations. |
protected java.lang.String |
statementClassName
StatementAgent instance class name. |
Constructor Summary | |
---|---|
protected |
StatementAgentImpl()
Default StatementAgentImpl constructor |
protected |
StatementAgentImpl(com.stc.connector.db.Session session)
StatementAgentImpl constructor |
protected |
StatementAgentImpl(com.stc.connector.db.Session session,
int resultsetType,
int concurrencyType)
StatementAgentImpl constructor |
Method Summary | |
---|---|
void |
cancel()
Cancels statement results. |
void |
clearBatch()
Clears the batch of operations. |
void |
clearWarnings()
Clear all SQLWarning objects. |
int[] |
executeBatch()
Executes a batch of SQL statements. |
int |
getFetchDirection()
Returns result set fetch direction. |
int |
getFetchSize()
Returns result set prefetch record count. |
int |
getMaxFieldSize()
Gets the maximum data size for a column. |
int |
getMaxRows()
Gets the maximum number of fetch records in a result set. |
boolean |
getMoreResults()
Checks if there are more result set. |
int |
getQueryTimeout()
Returns query timeout duration. |
com.stc.connector.appconn.db.ResultSetAgent |
getResultSet()
Returns the result set of last executed statement. |
int |
getResultSetConcurrency()
Returns result set concurrency mode. |
int |
getResultSetType()
Returns result set scroll type. |
int |
getUpdateCount()
Returns the records count of the last executed statement. |
java.sql.SQLWarning |
getWarnings()
Gets the first SQLWarning that has been reported for this object. |
boolean |
isClosed()
Returns the session open status. |
java.lang.String |
queryName()
Retrieves the name of the listener. |
static java.lang.String |
resultSetConcurToString(int concur)
Gets the symbol string corresponding to the ResultSet Concurrency enumeration. |
static java.lang.String |
resultSetDirToString(int dir)
Gets the symbol string corresponding to the ResultSet Direction enumeration. |
static java.lang.String |
resultSetTypeToString(int type)
Gets the symbol string corresponding to the ResultSet Type enumeration. |
void |
sessionClose(com.stc.connector.db.SessionEvent evt)
Processes a sessionClose event. |
void |
sessionOpen(com.stc.connector.db.SessionEvent evt)
Processes a sessionOpen event. |
void |
sessionReset(com.stc.connector.db.SessionEvent evt)
Processes a sessionReset event. |
void |
setCursorName(java.lang.String sName)
Sets result set cursor name. |
void |
setEscapeProcessing(boolean bEscape)
Sets escape syntax processing mode. |
void |
setFetchDirection(int fetchDirection)
Sets result set fetch direction. |
void |
setFetchSize(int nSize)
Sets result set prefetch record count. |
void |
setMaxFieldSize(int nSize)
Sets maximum data size for a column. |
void |
setMaxRows(int nRow)
Sets maximum number of fetch records. |
void |
setQueryTimeout(int nInterval)
Sets query timeout duration. |
java.lang.Object |
stmtInvoke(java.lang.String methodName,
java.lang.Class[] argumentClasses,
java.lang.Object[] arguments)
Invokes a method of the database Statement object of this ETD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String statementClassName
protected com.stc.connector.db.Session session
protected java.sql.Statement statement
protected java.sql.SQLException sqlException
protected com.stc.connector.db.StatementEventListener listener
protected int resultsetType
protected int concurrencyType
protected int resultsetDirection
protected static java.util.HashMap resultSetTypeMap
protected static java.util.HashMap resultSetDirMap
protected static java.util.HashMap resultSetConcurMap
Constructor Detail |
---|
protected StatementAgentImpl()
protected StatementAgentImpl(com.stc.connector.db.Session session)
session
- a Session instance for allocating necessary resources
for this StatementAgentImpl.protected StatementAgentImpl(com.stc.connector.db.Session session, int resultsetType, int concurrencyType)
session
- a Session instance for allocating necessary resources
for this StatementAgentImpl.resultsetType
- resultset type; TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE,
TYPE_SCROLL_SENSITIVEconcurrencyType
- concurrency type; CONCUR_READ_ONLY, CONCUR_UPDATABLEMethod Detail |
---|
public static java.lang.String resultSetTypeToString(int type)
ResultSet
Type enumeration.
type
- result set type.
public static java.lang.String resultSetDirToString(int dir)
ResultSet
Direction enumeration.
dir
- result set direction.
public static java.lang.String resultSetConcurToString(int concur)
ResultSet
Concurrency enumeration.
concur
- concurrency type.
public boolean isClosed()
isClosed
in interface com.stc.connector.appconn.db.StatementAgent
public java.lang.String queryName()
queryName
in interface com.stc.connector.appconn.db.StatementAgent
queryName
in interface com.stc.connector.db.SessionEventListener
public void sessionOpen(com.stc.connector.db.SessionEvent evt)
sessionOpen
in interface com.stc.connector.db.SessionEventListener
evt
- a Session event which signals the connection is open.public void sessionClose(com.stc.connector.db.SessionEvent evt)
sessionClose
in interface com.stc.connector.db.SessionEventListener
evt
- a Session event which signals the connection is close.public void sessionReset(com.stc.connector.db.SessionEvent evt)
sessionReset
in interface com.stc.connector.db.SessionEventListener
evt
- a Session event which signals the connection is reset.public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setEscapeProcessing(boolean bEscape) throws java.sql.SQLException
setEscapeProcessing
in interface com.stc.connector.appconn.db.StatementAgent
bEscape
- true to enable escape scanning; false otherwise.
java.sql.SQLException
- when SQL problems occur.public void setCursorName(java.lang.String sName) throws java.sql.SQLException
setCursorName
in interface com.stc.connector.appconn.db.StatementAgent
sName
- a cursor name.
java.sql.SQLException
- when SQL problems occur.public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setQueryTimeout(int nInterval) throws java.sql.SQLException
setQueryTimeout
in interface com.stc.connector.appconn.db.StatementAgent
nInterval
- the query timeout limit in second.
java.sql.SQLException
- when SQL problems occur.public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setFetchDirection(int fetchDirection) throws java.sql.SQLException
setFetchDirection
in interface com.stc.connector.appconn.db.StatementAgent
fetchDirection
- the fetch direction hint: FETCH_FORWARD,
FETCH_REVERSE or FETCH_UNKNOWN.
java.sql.SQLException
- when SQL problems occur.public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setFetchSize(int nSize) throws java.sql.SQLException
setFetchSize
in interface com.stc.connector.appconn.db.StatementAgent
nSize
- number of rows to be fetched at a time
java.sql.SQLException
- when SQL problems occur.public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setMaxRows(int nRow) throws java.sql.SQLException
setMaxRows
in interface com.stc.connector.appconn.db.StatementAgent
nRow
- the maximum number of rows in a result set. zero
means no limit.
java.sql.SQLException
- when SQL problems occur.public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void setMaxFieldSize(int nSize) throws java.sql.SQLException
setMaxFieldSize
in interface com.stc.connector.appconn.db.StatementAgent
nSize
- the maximum column size limit in bytes; zero
means no limit.
java.sql.SQLException
- when SQL problems occur.public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public com.stc.connector.appconn.db.ResultSetAgent getResultSet() throws java.sql.SQLException
getResultSet
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void clearBatch() throws java.sql.SQLException
clearBatch
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public void cancel() throws java.sql.SQLException
cancel
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur. when SQL problems occur.public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface com.stc.connector.appconn.db.StatementAgent
java.sql.SQLException
- when SQL problems occur.public java.lang.Object stmtInvoke(java.lang.String methodName, java.lang.Class[] argumentClasses, java.lang.Object[] arguments) throws java.lang.Exception
Statement
object of this ETD.
stmtInvoke
in interface com.stc.connector.appconn.db.StatementAgent
methodName
- the name of the methodargumentClasses
- Class
array for types of formal arguments for method,
in the declared order. Can be null
if there are no
formal arguments. However, cannot invoke constructor here.arguments
- Object
array of formal arguments for method in the
declared order. Can be null
if there are no formal
arguments. However, cannot invoke constructor here.
Object
instance resulting from the method invocation. Can be
null
if nothing is returned (void
return declaration).
java.lang.Exception
- whatever exception the invoked method throws.
|
oracle eWay API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |