|
Sun Adapter for DB2 Universal Database | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.db2adapter.base.StatementAgentImpl com.stc.connector.db2adapter.base.TableResultSetImpl
public class TableResultSetImpl
ResultSet to map selected records of table in the database.
Field Summary |
---|
Fields inherited from class com.stc.connector.db2adapter.base.StatementAgentImpl |
---|
concurrencyType, listener, resultSetConcurMap, resultsetDirection, resultSetDirMap, resultsetType, resultSetTypeMap, session, sqlException, statement, statementClassName |
Constructor Summary | |
---|---|
TableResultSetImpl(com.stc.connector.db.Session session)
TableResultSetImpl constructor. |
|
TableResultSetImpl(com.stc.connector.db.Session session,
int iScroll,
int iConcur)
TableResultSetImpl constructor. |
Method Summary | |
---|---|
boolean |
absolute(int row)
Moves the cursor to the specified row of the result set. |
void |
afterLast()
Moves the cursor after the last row of the result set. |
void |
beforeFirst()
Moves the cursor before the first row of the result set. |
void |
cancelRowUpdates()
Cancels any updates made to this row. |
void |
clearWarnings()
Clears any warnings reported on this object. |
void |
closeResultSet()
Immediately releases ResultSet object's resources, close the cursor. |
int |
delete(java.lang.String sWhere)
Delete table records according to the where condition if any. |
void |
deleteRow()
Deletes the contents of the current row from the database. |
int |
executeUpdate(java.lang.String sqlStatement)
|
int |
findColumn(java.lang.String index)
Returns the column index for the named column in the result set. |
boolean |
first()
Moves the cursor to the first row of the result set. |
java.io.InputStream |
getAsciiStream(int index)
Retrieves the value of the specified column vlaue as a stream of ASCII characters. |
java.io.InputStream |
getAsciiStream(java.lang.String columnName)
Retrieves the value of the specified column as a stream of ASCII characters. |
java.io.InputStream |
getBinaryStream(int index)
Retrieves the value of the specified column as a stream of uninterpreted bytes. |
java.io.InputStream |
getBinaryStream(java.lang.String columnName)
Retrieves the value of the specified column as a stream of uninterpreted bytes. |
java.io.Reader |
getCharacterStream(int index)
Retrieves the value of the specified column as a Reader object. |
java.io.Reader |
getCharacterStream(java.lang.String columnName)
Retrieves the value of the specified column as a Reader object. |
int |
getRow()
Retrieves the current row number in the result set. |
com.stc.connector.appconn.db.ResultSetAgent |
getRSAgent()
Gets the ResultSetAgent that holds the resultset. |
void |
insert()
Prepares a SQL statement for insert. |
void |
insertRow()
Inserts the contents of the current row into the database. |
boolean |
isAfterLast()
Determines whether the cursor is after the last row of the result set. |
boolean |
isBeforeFirst()
Determines whether the cursor is before the first row of the result set. |
boolean |
isFirst()
Determines whether the cursor is on the first row of the result set. |
boolean |
isLast()
Determines whether the cursor is on the last row of the result set. |
boolean |
last()
Moves the cursor to the last row of the result set. |
void |
moveToCurrentRow()
Moves the current position to the current row. |
void |
moveToInsertRow()
Moves the current position to a new insert row. |
boolean |
next()
Moves the cursor to the next row of the result set. |
boolean |
previous()
Moves the cursor to the previous row of the result set. |
void |
refreshRow()
Refreshes the current row with its most recent value from the database. |
boolean |
relative(int rows)
Moves the cursor to the specified row relative to current row of the result set. |
boolean |
rowDeleted()
Checks if the current row has been deleted. |
boolean |
rowInserted()
Checks if the current row has been inserted. |
boolean |
rowUpdated()
Checks if the current row has been updated. |
void |
select(java.lang.String sWhere)
Select table records according to the where condition if any. |
void |
sessionClose(com.stc.connector.db.SessionEvent evt)
Processes sessionClose event. |
void |
sessionReset(com.stc.connector.db.SessionEvent evt)
Processes sessionReset event. |
void |
setColumns(java.lang.String[] columns)
Specifies the desired columns of the table. |
void |
setTable(java.lang.String table)
Sets the name of the table that is being processed. |
void |
update(java.lang.String sWhere)
Update table records according to the where condition if any. |
void |
updateRow()
Updates the contents of the current row into the database. |
boolean |
wasNull()
Checks if the last data retrieved is NULL. |
Methods inherited from class com.stc.connector.db2adapter.base.StatementAgentImpl |
---|
cancel, clearBatch, executeBatch, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, isClosed, queryName, resultSetConcurToString, resultSetDirToString, resultSetTypeToString, sessionOpen, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, stmtInvoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.stc.connector.appconn.db.StatementAgent |
---|
cancel, clearBatch, executeBatch, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, isClosed, queryName, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, stmtInvoke |
Constructor Detail |
---|
public TableResultSetImpl(com.stc.connector.db.Session session)
session
- a Session instance for accessing connection and
creating necessary resources.public TableResultSetImpl(com.stc.connector.db.Session session, int iScroll, int iConcur)
session
- a Session instance for accessing connection and
creating necessary resources.iScroll
- resultset type; TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVEiConcur
- concurrency type; CONCUR_READ_ONLY, CONCUR_UPDATABLEMethod Detail |
---|
public void select(java.lang.String sWhere) throws java.sql.SQLException
select
in interface com.stc.connector.appconn.db.TableResultSet
sWhere
- the where clause
java.sql.SQLException
- when failing to execute the query.public int delete(java.lang.String sWhere) throws java.sql.SQLException
delete
in interface com.stc.connector.appconn.db.TableResultSet
sWhere
- the where clause
java.sql.SQLException
- when failing to execute the delete operation.public void update(java.lang.String sWhere) throws java.sql.SQLException
update
in interface com.stc.connector.appconn.db.TableResultSet
sWhere
- the where clause
java.sql.SQLException
- when failing to execute the delete operation.public boolean next() throws java.sql.SQLException
next
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean previous() throws java.sql.SQLException
previous
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean absolute(int row) throws java.sql.SQLException
absolute
in interface com.stc.connector.appconn.db.TableResultSet
row
- the row index.
java.sql.SQLException
- when SQL problems occur.public boolean relative(int rows) throws java.sql.SQLException
relative
in interface com.stc.connector.appconn.db.TableResultSet
rows
- number of rows relative to the currentone.
java.sql.SQLException
- when SQL problems occur.public boolean first() throws java.sql.SQLException
first
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean isFirst() throws java.sql.SQLException
isFirst
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean last() throws java.sql.SQLException
last
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean isLast() throws java.sql.SQLException
isLast
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void beforeFirst() throws java.sql.SQLException
beforeFirst
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean isBeforeFirst() throws java.sql.SQLException
isBeforeFirst
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void afterLast() throws java.sql.SQLException
afterLast
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean isAfterLast() throws java.sql.SQLException
isAfterLast
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public int findColumn(java.lang.String index) throws java.sql.SQLException
findColumn
in interface com.stc.connector.appconn.db.TableResultSet
index
- the column name.
java.sql.SQLException
- when SQL problems occur.public java.io.InputStream getAsciiStream(int index) throws java.sql.SQLException
getAsciiStream
in interface com.stc.connector.appconn.db.TableResultSet
index
- the column index.
java.sql.SQLException
- when SQL problems occur.public java.io.InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException
getAsciiStream
in interface com.stc.connector.appconn.db.TableResultSet
columnName
- the column name.
java.sql.SQLException
- when SQL problems occur.public java.io.InputStream getBinaryStream(int index) throws java.sql.SQLException
getBinaryStream
in interface com.stc.connector.appconn.db.TableResultSet
index
- the column index.
java.sql.SQLException
- when SQL problems occur.public java.io.InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException
getBinaryStream
in interface com.stc.connector.appconn.db.TableResultSet
columnName
- the column name.
java.sql.SQLException
- when SQL problems occur.public java.io.Reader getCharacterStream(int index) throws java.sql.SQLException
getCharacterStream
in interface com.stc.connector.appconn.db.TableResultSet
index
- the column index.
java.sql.SQLException
- when SQL problems occur.public java.io.Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException
getCharacterStream
in interface com.stc.connector.appconn.db.TableResultSet
columnName
- the column name.
java.sql.SQLException
- when SQL problems occur.public void refreshRow() throws java.sql.SQLException
refreshRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void insertRow() throws java.sql.SQLException
insertRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void updateRow() throws java.sql.SQLException
updateRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void deleteRow() throws java.sql.SQLException
deleteRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void moveToInsertRow() throws java.sql.SQLException
moveToInsertRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void moveToCurrentRow() throws java.sql.SQLException
moveToCurrentRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void cancelRowUpdates() throws java.sql.SQLException
cancelRowUpdates
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean rowInserted() throws java.sql.SQLException
rowInserted
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean rowUpdated() throws java.sql.SQLException
rowUpdated
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean rowDeleted() throws java.sql.SQLException
rowDeleted
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public boolean wasNull() throws java.sql.SQLException
wasNull
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void closeResultSet() throws java.sql.SQLException
closeResultSet
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface com.stc.connector.appconn.db.StatementAgent
clearWarnings
in interface com.stc.connector.appconn.db.TableResultSet
clearWarnings
in class StatementAgentImpl
java.sql.SQLException
- when SQL problems occur.public int getRow() throws java.sql.SQLException
getRow
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when SQL problems occur.public void setTable(java.lang.String table)
setTable
in interface com.stc.connector.appconn.db.TableResultSet
table
- the name of the tablepublic void setColumns(java.lang.String[] columns)
setColumns
in interface com.stc.connector.appconn.db.TableResultSet
columns
- an arrary of column names.public com.stc.connector.appconn.db.ResultSetAgent getRSAgent()
getRSAgent
in interface com.stc.connector.appconn.db.TableResultSet
public void sessionClose(com.stc.connector.db.SessionEvent evt)
sessionClose
in interface com.stc.connector.db.SessionEventListener
sessionClose
in class StatementAgentImpl
evt
- a close session eventpublic void sessionReset(com.stc.connector.db.SessionEvent evt)
sessionReset
in interface com.stc.connector.db.SessionEventListener
sessionReset
in class StatementAgentImpl
evt
- a close session eventpublic void insert() throws java.sql.SQLException
insert
in interface com.stc.connector.appconn.db.TableResultSet
java.sql.SQLException
- when failing to prepare the insert operation.public int executeUpdate(java.lang.String sqlStatement) throws java.sql.SQLException
java.sql.SQLException
|
Sun Adapter for DB2 Universal Database | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |