com.stc.connector.appconn.db
Interface TableResultSet

All Superinterfaces:
StatementAgent

public interface TableResultSet
extends StatementAgent

ResultSet to map selected records of table in the database.


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 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 value 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 un-interpreted bytes.
 java.io.InputStream getBinaryStream(java.lang.String columnName)
          Retrieves the value of the specified column as a stream of un-interpreted 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.
 ResultSetAgent getRSAgent()
          Gets the ResultSetAgent that holds the result set.
 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 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 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
 

Method Detail

absolute

public boolean absolute(int row)
                 throws java.sql.SQLException
Moves the cursor to the specified row of the result set.

Parameters:
row - the row index.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

afterLast

public void afterLast()
               throws java.sql.SQLException
Moves the cursor after the last row of the result set.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

beforeFirst

public void beforeFirst()
                 throws java.sql.SQLException
Moves the cursor before the first row of the result set.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

cancelRowUpdates

public void cancelRowUpdates()
                      throws java.sql.SQLException
Cancels any updates made to this row.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
Clears any warnings reported on this object.

Parameters:
None.
Specified by:
clearWarnings in interface StatementAgent
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

closeResultSet

public void closeResultSet()
                    throws java.sql.SQLException
Immediately releases ResultSet object's resources, close the cursor.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

delete

public int delete(java.lang.String sWhere)
           throws java.sql.SQLException
Delete table records according to the where condition if any.

Parameters:
sWhere - the where clause
Returns:
the number of records are being deleted.
Throws:
java.sql.SQLException - when SQL problems occur.

deleteRow

public void deleteRow()
               throws java.sql.SQLException
Deletes the contents of the current row from the database.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

findColumn

public int findColumn(java.lang.String index)
               throws java.sql.SQLException
Returns the column index for the named column in the result set.

Parameters:
index - the column name.
Returns:
the column index for the named column.
Throws:
java.sql.SQLException - when SQL problems occur.

first

public boolean first()
              throws java.sql.SQLException
Moves the cursor to the first row of the result set.

Parameters:
None.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

getAsciiStream

public java.io.InputStream getAsciiStream(int index)
                                   throws java.sql.SQLException
Retrieves the value of the specified column value as a stream of ASCII characters.

Parameters:
index - the column index.
Returns:
the ASCII stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getAsciiStream

public java.io.InputStream getAsciiStream(java.lang.String columnName)
                                   throws java.sql.SQLException
Retrieves the value of the specified column as a stream of ASCII characters.

Parameters:
columnName - the column name.
Returns:
the ASCII stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getBinaryStream

public java.io.InputStream getBinaryStream(int index)
                                    throws java.sql.SQLException
Retrieves the value of the specified column as a stream of un-interpreted bytes.

Parameters:
index - the column index.
Returns:
the Binary stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getBinaryStream

public java.io.InputStream getBinaryStream(java.lang.String columnName)
                                    throws java.sql.SQLException
Retrieves the value of the specified column as a stream of un-interpreted bytes.

Parameters:
columnName - the column name.
Returns:
the Binary stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getCharacterStream

public java.io.Reader getCharacterStream(int index)
                                  throws java.sql.SQLException
Retrieves the value of the specified column as a Reader object.

Parameters:
index - the column index.
Returns:
the Character stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getCharacterStream

public java.io.Reader getCharacterStream(java.lang.String columnName)
                                  throws java.sql.SQLException
Retrieves the value of the specified column as a Reader object.

Parameters:
columnName - the column name.
Returns:
the Character stream value of the specified column.
Throws:
java.sql.SQLException - when SQL problems occur.

getRow

public int getRow()
           throws java.sql.SQLException
Retrieves the current row number in the result set.

Parameters:
None.
Returns:
the current row number.
Throws:
java.sql.SQLException - when SQL problems occur.

getRSAgent

public ResultSetAgent getRSAgent()
Gets the ResultSetAgent that holds the result set.

Parameters:
None.
Returns:
a ResultSetAgent.
Throws:
None.

insert

public void insert()
            throws java.sql.SQLException
Prepares a SQL statement for insert. After this method is called, users will call setXXX() methods before calling executeInsert().

Parameters:
None.
Returns:
a ResultSetAgent.
Throws:
java.sql.SQLException - when failing to prepare the insert operation.

insertRow

public void insertRow()
               throws java.sql.SQLException
Inserts the contents of the current row into the database.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

isAfterLast

public boolean isAfterLast()
                    throws java.sql.SQLException
Determines whether the cursor is after the last row of the result set.

Parameters:
None.
Returns:
true if the cursor is after the last row; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

isBeforeFirst

public boolean isBeforeFirst()
                      throws java.sql.SQLException
Determines whether the cursor is before the first row of the result set.

Parameters:
None.
Returns:
true if the cursor is before the first row; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

isFirst

public boolean isFirst()
                throws java.sql.SQLException
Determines whether the cursor is on the first row of the result set.

Parameters:
None.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

isLast

public boolean isLast()
               throws java.sql.SQLException
Determines whether the cursor is on the last row of the result set.

Parameters:
None.
Returns:
true if the cursor is in the last row; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

last

public boolean last()
             throws java.sql.SQLException
Moves the cursor to the last row of the result set.

Parameters:
None.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

moveToCurrentRow

public void moveToCurrentRow()
                      throws java.sql.SQLException
Moves the current position to the current row. It is used after you insert a row.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

moveToInsertRow

public void moveToInsertRow()
                     throws java.sql.SQLException
Moves the current position to a new insert row.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

next

public boolean next()
             throws java.sql.SQLException
Moves the cursor to the next row of the result set.

Parameters:
None.
Returns:
true if successful; false if there is no more row.
Throws:
java.sql.SQLException - when SQL problems occur.

previous

public boolean previous()
                 throws java.sql.SQLException
Moves the cursor to the previous row of the result set.

Parameters:
None.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

refreshRow

public void refreshRow()
                throws java.sql.SQLException
Refreshes the current row with its most recent value from the database.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

relative

public boolean relative(int rows)
                 throws java.sql.SQLException
Moves the cursor to the specified row relative to current row of the result set.

Parameters:
rows - number of rows relative to the current one.
Returns:
true if successful; false otherwise.
Throws:
java.sql.SQLException - when SQL problems occur.

rowDeleted

public boolean rowDeleted()
                   throws java.sql.SQLException
Checks if the current row has been deleted.

Parameters:
None.
Returns:
true if the current row has been deleted.
Throws:
java.sql.SQLException - when SQL problems occur.

rowInserted

public boolean rowInserted()
                    throws java.sql.SQLException
Checks if the current row has been inserted.

Parameters:
None.
Returns:
true if the current row has been inserted.
Throws:
java.sql.SQLException - when SQL problems occur.

rowUpdated

public boolean rowUpdated()
                   throws java.sql.SQLException
Checks if the current row has been updated.

Parameters:
None.
Returns:
true if the current row has been updated.
Throws:
java.sql.SQLException - when SQL problems occur.

select

public void select(java.lang.String sWhere)
            throws java.sql.SQLException
Select table records according to the where condition if any.

Parameters:
sWhere - the where clause
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

setColumns

public void setColumns(java.lang.String[] columns)
Specifies the desired columns of the table.

Parameters:
columns - an array of column names.
Throws:
None.
Returns:
void - None.

setTable

public void setTable(java.lang.String table)
Sets the name of the table that is being processed.

Parameters:
table - the name of the table.
Throws:
None.
Returns:
void - None.

update

public void update(java.lang.String sWhere)
            throws java.sql.SQLException
Update table records according to the where condition if any.

Parameters:
sWhere - the where clause
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

updateRow

public void updateRow()
               throws java.sql.SQLException
Updates the contents of the current row into the database.

Parameters:
None.
Returns:
void - None.
Throws:
java.sql.SQLException - when SQL problems occur.

wasNull

public boolean wasNull()
                throws java.sql.SQLException
Checks if the last data retrieved is NULL.

Parameters:
None.
Returns:
true if the last data retrieved is NULL.
Throws:
java.sql.SQLException - when SQL problems occur.


Copyright 2004 by SeeBeyond Technology Corporation. All Rights Reserved.