com.nqadmin.swingSet.datasources
Class SSRowSetAdapter

java.lang.Object
  extended by com.nqadmin.swingSet.datasources.SSRowSetAdapter
All Implemented Interfaces:
SSRowSet, java.io.Serializable
Direct Known Subclasses:
SSJdbcRowSetImpl

public class SSRowSetAdapter
extends java.lang.Object
implements SSRowSet

SSRowSetAdapter.java

SwingSet - Open Toolkit For Making Swing Controls Database-Aware

 Abstract class that provides empty implementations of all the methods for the
 SSRowSet interface.

 This class is provided for convenience. so that users wishing to write their
 own SSRowSet implementations can just extend the abstract class and override
 the desired methods.

Version:
$Revision: 1.10 $
Author:
$Author: prasanth $
See Also:
Serialized Form

Constructor Summary
SSRowSetAdapter()
           
 
Method Summary
 boolean absolute(int row)
           Moves the cursor to the given row number in this ResultSet object.
 void addRowSetListener(javax.sql.RowSetListener listener)
          The listener will be notified whenever an event occurs on this RowSet object.
 void beforeFirst()
          Moves the cursor to the front of this ResultSet object, just before the first row.
 void cancelRowUpdates()
          Cancels the updates made to the current row in this ResultSet object.
 void deleteRow()
          Deletes the current row from this ResultSet object and from the underlying database.
 void execute()
          Fills this RowSet object with data.
 boolean first()
          Moves the cursor to the first row in this ResultSet object.
 java.sql.Array getArray(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as an SQL array.
 java.sql.Array getArray(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as an SQL array in the Java programming language.
 boolean getBoolean(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a boolean in the Java programming language.
 boolean getBoolean(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a boolean in the Java programming language.
 byte[] getBytes(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
 byte[] getBytes(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
 int getColumnCount()
          Returns the number of columns in this ResultSet object
 int getColumnIndex(java.lang.String columnName)
          Get the designated column's index
 java.lang.String getColumnName(int columnIndex)
          Maps the given column name to its column index
 int getColumnType(int columnIndex)
          Retrieves the designated column's type
 int getColumnType(java.lang.String columnName)
          Retrieves the designated column's type
 java.sql.Date getDate(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a Date in the Java programming language.
 java.sql.Date getDate(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a Date in the Java programming language.
 double getDouble(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a double in the Java programming language.
 double getDouble(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a double in the Java programming language.
 float getFloat(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a float in the Java programming language.
 float getFloat(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a float in the Java programming language.
 int getInt(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a int in the Java programming language.
 int getInt(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a int in the Java programming language.
 long getLong(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a long in the Java programming language.
 long getLong(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a long in the Java programming language.
 java.sql.ResultSetMetaData getMetaData()
          Retrieves the number, types and properties of underlying ResultSet object's columns.
 java.lang.Object getObject(int columnIndex)
          Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 java.lang.Object getObject(java.lang.String columnName)
          Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.
 int getRow()
          Retrieves the current row number.
 java.lang.String getString(int columnIndex)
          Retrieves the value of the designated column in the current row of this DataSet object as a String in the Java programming language.
 java.lang.String getString(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this DataSet object as a String in the Java programming language.
 java.sql.Time getTime(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 java.sql.Time getTime(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.
 java.sql.Timestamp getTimestamp(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.
 java.sql.Timestamp getTimestamp(java.lang.String columnName)
          Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.
 void insertRow()
          Inserts the contents of the insert row into this ResultSet object and into the database.
 boolean isFirst()
          Retrieves whether the cursor is on the first row of this ResultSet object.
 boolean isLast()
          Retrieves whether the cursor is on the last row of this ResultSet object.
 boolean last()
          Moves the cursor to the last row in this ResultSet object.
 void moveToCurrentRow()
          Moves the cursor to the remembered cursor position, usually the current row.
 void moveToInsertRow()
          Moves the cursor to the insert row.
 boolean next()
          Moves the cursor down one row from its current position.
 boolean previous()
          Moves the cursor to the previous row in this ResultSet object.
 void refreshRow()
          Refreshes the current row with its most recent value in the database.
 void removeRowSetListener(javax.sql.RowSetListener listener)
          Removes the designated object from this RowSet object's list of listeners.
 boolean rowDeleted()
          Retrieves whether a row has been deleted.
 boolean rowInserted()
          Retrieves whether the current row has had an insertion.
 boolean rowUpdated()
          Retrieves whether the current row has been updated.
 void updateArray(int columnIndex, java.sql.Array x)
          Updates the designated column with an array value.
 void updateArray(java.lang.String columnName, java.sql.Array x)
          Updates the designated column with an array value.
 void updateBoolean(int columnIndex, boolean x)
          Updates the designated column with a boolean value.
 void updateBoolean(java.lang.String columnName, boolean x)
          Updates the designated column with a boolean value.
 void updateBytes(int columnIndex, byte[] x)
          Updates the designated column with a byte array value.
 void updateBytes(java.lang.String columnName, byte[] x)
          Updates the designated column with a byte array value.
 void updateDate(int columnIndex, java.sql.Date x)
          Updates the designated column with a Date value.
 void updateDate(java.lang.String columnName, java.sql.Date x)
          Updates the designated column with a Date value.
 void updateDouble(int columnIndex, double x)
          Updates the designated column with a double value.
 void updateDouble(java.lang.String columnName, double x)
          Updates the designated column with a double value.
 void updateFloat(int columnIndex, float x)
          Updates the designated column with a float value.
 void updateFloat(java.lang.String columnName, float x)
          Updates the designated column with a float value.
 void updateInt(int columnIndex, int x)
          Updates the designated column with a int value.
 void updateInt(java.lang.String columnName, int x)
          Updates the designated column with a int value.
 void updateLong(int columnIndex, long x)
          Updates the designated column with a long value.
 void updateLong(java.lang.String columnName, long x)
          Updates the designated column with a long value.
 void updateNull(int columnIndex)
          Updates the designated column with a null value.
 void updateNull(java.lang.String columnName)
          Updates the designated column with a null value.
 void updateObject(int columnIndex, java.lang.Object x)
          Updates the designated column with an Object value.
 void updateObject(java.lang.String columnName, java.lang.Object x)
          Updates the designated column with an Object value.
 void updateRow()
          Updates the underlying database with the new contents of the current row of this ResultSet object.
 void updateString(int columnIndex, java.lang.String x)
          Updates the designated column with a String value.
 void updateString(java.lang.String columnName, java.lang.String x)
          Updates the designated column with a String value.
 void updateTime(int columnIndex, java.sql.Time x)
          Updates the designated column with a java.sql.Time value.
 void updateTime(java.lang.String columnName, java.sql.Time x)
          Updates the designated column with a java.sql.Time value.
 void updateTimestamp(int columnIndex, java.sql.Timestamp x)
          Updates the designated column with a java.sql.Timestamp value.
 void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x)
          Updates the designated column with a java.sql.Timestamp value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSRowSetAdapter

public SSRowSetAdapter()
Method Detail

getBoolean

public boolean getBoolean(int columnIndex)
                   throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a boolean in the Java programming language.

Specified by:
getBoolean in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then a false is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getArray

public java.sql.Array getArray(int columnIndex)
                        throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as an SQL array.

Specified by:
getArray in interface SSRowSet
Parameters:
columnIndex - - column number
Returns:
returns SQL Array stored in the current row of the DataSet.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getInt

public int getInt(int columnIndex)
           throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a int in the Java programming language.

Specified by:
getInt in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getLong

public long getLong(int columnIndex)
             throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a long in the Java programming language.

Specified by:
getLong in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getFloat

public float getFloat(int columnIndex)
               throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a float in the Java programming language.

Specified by:
getFloat in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getDouble

public double getDouble(int columnIndex)
                 throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a double in the Java programming language.

Specified by:
getDouble in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getString

public java.lang.String getString(int columnIndex)
                           throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a String in the Java programming language.

Specified by:
getString in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then a null is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getDate

public java.sql.Date getDate(int columnIndex)
                      throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a Date in the Java programming language.

Specified by:
getDate in interface SSRowSet
Parameters:
columnIndex - - column number . first column is 1, second column is 2....
Returns:
returns the column value of the current row, if the value is null then null is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getBytes

public byte[] getBytes(int columnIndex)
                throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.

Specified by:
getBytes in interface SSRowSet
Parameters:
columnIndex - - index number of the column
Returns:
returns the column value; if the value is SQL NULL, the value returned is null
Throws:
throws - an SQLException - if a database access error occurs
java.sql.SQLException

updateBoolean

public void updateBoolean(int columnIndex,
                          boolean x)
                   throws java.sql.SQLException
Updates the designated column with a boolean value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateBoolean in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateArray

public void updateArray(int columnIndex,
                        java.sql.Array x)
                 throws java.sql.SQLException
Updates the designated column with an array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateArray in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateInt

public void updateInt(int columnIndex,
                      int x)
               throws java.sql.SQLException
Updates the designated column with a int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateInt in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateLong

public void updateLong(int columnIndex,
                       long x)
                throws java.sql.SQLException
Updates the designated column with a long value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateLong in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateFloat

public void updateFloat(int columnIndex,
                        float x)
                 throws java.sql.SQLException
Updates the designated column with a float value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateFloat in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateDouble

public void updateDouble(int columnIndex,
                         double x)
                  throws java.sql.SQLException
Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateDouble in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateString

public void updateString(int columnIndex,
                         java.lang.String x)
                  throws java.sql.SQLException
Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateString in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateDate

public void updateDate(int columnIndex,
                       java.sql.Date x)
                throws java.sql.SQLException
Updates the designated column with a Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateDate in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateBytes

public void updateBytes(int columnIndex,
                        byte[] x)
                 throws java.sql.SQLException
Updates the designated column with a byte array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateBytes in interface SSRowSet
Parameters:
columnIndex - - the index number of the column
x - - the new column value
Throws:
throws - an SQLException - if a database access error occurs
java.sql.SQLException

updateNull

public void updateNull(int columnIndex)
                throws java.sql.SQLException
Updates the designated column with a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateNull in interface SSRowSet
Parameters:
columnIndex - - index number of the column. first column is 1, second column is 2......
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getBoolean

public boolean getBoolean(java.lang.String columnName)
                   throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a boolean in the Java programming language.

Specified by:
getBoolean in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then a false is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getArray

public java.sql.Array getArray(java.lang.String columnName)
                        throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as an SQL array in the Java programming language.

Specified by:
getArray in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getInt

public int getInt(java.lang.String columnName)
           throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a int in the Java programming language.

Specified by:
getInt in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getLong

public long getLong(java.lang.String columnName)
             throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a long in the Java programming language.

Specified by:
getLong in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getFloat

public float getFloat(java.lang.String columnName)
               throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a float in the Java programming language.

Specified by:
getFloat in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getDouble

public double getDouble(java.lang.String columnName)
                 throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a double in the Java programming language.

Specified by:
getDouble in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then 0 is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getString

public java.lang.String getString(java.lang.String columnName)
                           throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a String in the Java programming language.

Specified by:
getString in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then a null is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getDate

public java.sql.Date getDate(java.lang.String columnName)
                      throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this DataSet object as a Date in the Java programming language.

Specified by:
getDate in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the column value of the current row, if the value is null then a null is returned.
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

getBytes

public byte[] getBytes(java.lang.String columnName)
                throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.

Specified by:
getBytes in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
Returns:
returns the column value; if the value is SQL NULL, the value returned is null
Throws:
throws - an SQLException - if a database access error occurs
java.sql.SQLException

updateBoolean

public void updateBoolean(java.lang.String columnName,
                          boolean x)
                   throws java.sql.SQLException
Updates the designated column with a boolean value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateBoolean in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateArray

public void updateArray(java.lang.String columnName,
                        java.sql.Array x)
                 throws java.sql.SQLException
Updates the designated column with an array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateArray in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateInt

public void updateInt(java.lang.String columnName,
                      int x)
               throws java.sql.SQLException
Updates the designated column with a int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateInt in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateLong

public void updateLong(java.lang.String columnName,
                       long x)
                throws java.sql.SQLException
Updates the designated column with a long value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateLong in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateFloat

public void updateFloat(java.lang.String columnName,
                        float x)
                 throws java.sql.SQLException
Updates the designated column with a float value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateFloat in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateDouble

public void updateDouble(java.lang.String columnName,
                         double x)
                  throws java.sql.SQLException
Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateDouble in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateString

public void updateString(java.lang.String columnName,
                         java.lang.String x)
                  throws java.sql.SQLException
Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateString in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateDate

public void updateDate(java.lang.String columnName,
                       java.sql.Date x)
                throws java.sql.SQLException
Updates the designated column with a Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateDate in interface SSRowSet
Parameters:
columnName - - name of the column
x - - new column value
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

updateBytes

public void updateBytes(java.lang.String columnName,
                        byte[] x)
                 throws java.sql.SQLException
Updates the designated column with a byte array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateBytes in interface SSRowSet
Parameters:
columnName - - the name of the column
x - - the new column value
Throws:
throws - an SQLException - if a database access error occurs
java.sql.SQLException

updateNull

public void updateNull(java.lang.String columnName)
                throws java.sql.SQLException
Updates the designated column with a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying data source; instead the updateRow or insertRow methods are called to update the underlying data source.

Specified by:
updateNull in interface SSRowSet
Parameters:
columnName - - name of the column
Throws:
throws - an SQL exception if an access error occurs.
java.sql.SQLException

addRowSetListener

public void addRowSetListener(javax.sql.RowSetListener listener)
The listener will be notified whenever an event occurs on this RowSet object. Note: if the RowSetListener object is null, this method silently discards the null value and does not add a null reference to the set of listeners. Note: if the listener is already set, and the new RowSetListerner instance is added to the set of listeners already registered to receive event notifications from this RowSet

Specified by:
addRowSetListener in interface SSRowSet
Parameters:
listener - - an object that has implemented the javax.sql.RowSetListener interface and wants to be notified of any events that occur on this RowSet object; May be null

removeRowSetListener

public void removeRowSetListener(javax.sql.RowSetListener listener)
Removes the designated object from this RowSet object's list of listeners. If the given argument is not a registered listener, this method does nothing. Note: if the RowSetListener object is null, this method silently discards the null value

Specified by:
removeRowSetListener in interface SSRowSet
Parameters:
listener - - a RowSetListener object that is on the list of listeners for this RowSet object

getColumnName

public java.lang.String getColumnName(int columnIndex)
                               throws java.sql.SQLException
Maps the given column name to its column index

Specified by:
getColumnName in interface SSRowSet
Parameters:
columnIndex - - column number first column is 1, second column is 2 .....
Returns:
the column name of the given column index
Throws:
java.sql.SQLException - - if the object does not contain columnIndex or a access error occurs

getColumnIndex

public int getColumnIndex(java.lang.String columnName)
                   throws java.sql.SQLException
Get the designated column's index

Specified by:
getColumnIndex in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
returns the corresponding column index.
Throws:
java.sql.SQLException - - if a data access error

getColumnType

public int getColumnType(java.lang.String columnName)
                  throws java.sql.SQLException
Retrieves the designated column's type

Specified by:
getColumnType in interface SSRowSet
Parameters:
columnName - - name of the column
Returns:
SQL type from java.sql.Types
Throws:
java.sql.SQLException - - if a data access error occurs

getColumnType

public int getColumnType(int columnIndex)
                  throws java.sql.SQLException
Retrieves the designated column's type

Specified by:
getColumnType in interface SSRowSet
Parameters:
columnIndex - - column number first column is 1, second column is 2 .....
Returns:
SQL type from java.sql.Types
Throws:
java.sql.SQLException - - if a data access error occurs

getRow

public int getRow()
           throws java.sql.SQLException
Retrieves the current row number. The first row is number 1, the second number 2, and so on.

Specified by:
getRow in interface SSRowSet
Returns:
the current row number; 0 if there is no current row
Throws:
java.sql.SQLException - - if a data access error occurs

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Returns the number of columns in this ResultSet object

Specified by:
getColumnCount in interface SSRowSet
Returns:
the number of columns
Throws:
java.sql.SQLException - - if a data access error occurs

next

public boolean next()
             throws java.sql.SQLException
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on. If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Specified by:
next in interface SSRowSet
Returns:
true if the new current row is valid; false if there are no more rows
Throws:
java.sql.SQLException - - if a data access error occurs

previous

public boolean previous()
                 throws java.sql.SQLException
Moves the cursor to the previous row in this ResultSet object.

Specified by:
previous in interface SSRowSet
Returns:
true if the cursor is on a valid row; false if it is off the result set
Throws:
java.sql.SQLException - - if a data access error occurs

last

public boolean last()
             throws java.sql.SQLException
Moves the cursor to the last row in this ResultSet object.

Specified by:
last in interface SSRowSet
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
java.sql.SQLException - - if a data access error occurs

first

public boolean first()
              throws java.sql.SQLException
Moves the cursor to the first row in this ResultSet object.

Specified by:
first in interface SSRowSet
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
java.sql.SQLException - - if a data access error occurs

isFirst

public boolean isFirst()
                throws java.sql.SQLException
Retrieves whether the cursor is on the first row of this ResultSet object.

Specified by:
isFirst in interface SSRowSet
Returns:
true if the cursor is on the first row; false otherwise
Throws:
java.sql.SQLException - - if a data access error occurs

isLast

public boolean isLast()
               throws java.sql.SQLException
Retrieves whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.

Specified by:
isLast in interface SSRowSet
Returns:
true if the cursor is on the last row; false otherwise
Throws:
java.sql.SQLException - - if a data access error occurs

beforeFirst

public void beforeFirst()
                 throws java.sql.SQLException
Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.

Specified by:
beforeFirst in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs

absolute

public boolean absolute(int row)
                 throws java.sql.SQLException
 Moves the cursor to the given row number in this ResultSet object.
      If the row number is positive, the cursor moves to the given row number with
 respect to the beginning of the result set. The first row is row 1, the second is
 row 2, and so on.
      If the given row number is negative, the cursor moves to an absolute row position
 with respect to the end of the result set. For example, calling the method absolute(-1)
 positions the cursor on the last row; calling the method absolute(-2) moves the cursor
 to the next-to-last row, and so on.
 An attempt to position the cursor beyond the first/last row in the result set leaves
 the cursor before the first row or after the last row.

Specified by:
absolute in interface SSRowSet
Parameters:
row - - the number of the row to which the cursor should move.
Returns:
true if the cursor is on the result set; false otherwise
Throws:
java.sql.SQLException - - if a database access error occurs

updateRow

public void updateRow()
               throws java.sql.SQLException
Updates the underlying database with the new contents of the current row of this ResultSet object. This method cannot be called when the cursor is on the insert row.

Specified by:
updateRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs or if this method is called when the cursor is on the insert row

moveToCurrentRow

public void moveToCurrentRow()
                      throws java.sql.SQLException
Moves the cursor to the remembered cursor position, usually the current row. This method has no effect if the cursor is not on the insert row.

Specified by:
moveToCurrentRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs

moveToInsertRow

public void moveToInsertRow()
                     throws java.sql.SQLException
Moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updater methods prior to inserting the row into the result set. Only the updater, getter, and insertRow methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow. An updater method must be called before a getter method can be called on a column value.

Specified by:
moveToInsertRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs

insertRow

public void insertRow()
               throws java.sql.SQLException
Inserts the contents of the insert row into this ResultSet object and into the database. The cursor must be on the insert row when this method is called.

Specified by:
insertRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs,if this method is called when the cursor is not on the insert row, or if not all of non-nullable columns in the insert row have been given a value

deleteRow

public void deleteRow()
               throws java.sql.SQLException
Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row.

Specified by:
deleteRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs or if this method is called when the cursor is on the insert row

cancelRowUpdates

public void cancelRowUpdates()
                      throws java.sql.SQLException
Cancels the updates made to the current row in this ResultSet object. This method may be called after calling an updater method(s) and before calling the method updateRow to roll back the updates made to a row. If no updates have been made or updateRow has already been called, this method has no effect

Specified by:
cancelRowUpdates in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs or if this method is called when the cursor is on the insert row

refreshRow

public void refreshRow()
                throws java.sql.SQLException
Refreshes the current row with its most recent value in the database. This method cannot be called when the cursor is on the insert row. The refreshRow method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one. All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow is called after calling an updater method, but before calling the method updateRow, then the updates made to the row are lost. Calling the method refreshRow frequently will likely slow performance

Specified by:
refreshRow in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs or if this method is called when the cursor is on the insert row

execute

public void execute()
             throws java.sql.SQLException
Fills this RowSet object with data. If the required properties have not been set, an exception is thrown. If this method is successful, the current contents of the rowset are discarded. If there are outstanding updates, they are ignored.

Specified by:
execute in interface SSRowSet
Throws:
java.sql.SQLException - - if a data access error occurs or any of the properties necessary for making a connection have not been set

rowDeleted

public boolean rowDeleted()
                   throws java.sql.SQLException
Retrieves whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not this ResultSet object can detect deletions.

Specified by:
rowDeleted in interface SSRowSet
Returns:
true if a row was deleted and deletions are detected; false otherwise
Throws:
java.sql.SQLException - - if a database access error occurs

rowInserted

public boolean rowInserted()
                    throws java.sql.SQLException
Retrieves whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts.

Specified by:
rowInserted in interface SSRowSet
Returns:
true if a row has had an insertion and insertions are detected; false otherwise
Throws:
java.sql.SQLException - - if a database access error occurs

rowUpdated

public boolean rowUpdated()
                   throws java.sql.SQLException
Retrieves whether the current row has been updated. The value returned depends on whether or not the result set can detect updates.

Specified by:
rowUpdated in interface SSRowSet
Returns:
true if both (1) the row has been visibly updated by the owner or another and (2) updates are detected
Throws:
java.sql.SQLException - - if a database access error occurs

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Retrieves the number, types and properties of underlying ResultSet object's columns.

Specified by:
getMetaData in interface SSRowSet
Returns:
the description of this ResultSet object's columns
Throws:
java.sql.SQLException - - if a database access error occurs

getObject

public java.lang.Object getObject(java.lang.String columnName)
                           throws java.sql.SQLException
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type , following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null. This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Specified by:
getObject in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
Returns:
a java.lang.Object holding the column value
Throws:
java.sql.SQLException - - if a database access error occurs

getObject

public java.lang.Object getObject(int columnIndex)
                           throws java.sql.SQLException
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type , following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null. This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Specified by:
getObject in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
Returns:
a java.lang.Object holding the column value
Throws:
java.sql.SQLException - - if a database access error occurs

updateObject

public void updateObject(java.lang.String columnName,
                         java.lang.Object x)
                  throws java.sql.SQLException
Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateObject in interface SSRowSet
Parameters:
columnName - - the name of the column
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs

updateObject

public void updateObject(int columnIndex,
                         java.lang.Object x)
                  throws java.sql.SQLException
Updates the designated column with an Object value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateObject in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs

getTime

public java.sql.Time getTime(int columnIndex)
                      throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.

Specified by:
getTime in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - - if a database access error occurs

getTime

public java.sql.Time getTime(java.lang.String columnName)
                      throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.

Specified by:
getTime in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - - if a database access error occurs

getTimestamp

public java.sql.Timestamp getTimestamp(int columnIndex)
                                throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.

Specified by:
getTimestamp in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - - if a database access error occurs

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String columnName)
                                throws java.sql.SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object.

Specified by:
getTimestamp in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - - if a database access error occurs

updateTime

public void updateTime(int columnIndex,
                       java.sql.Time x)
                throws java.sql.SQLException
Updates the designated column with a java.sql.Time value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateTime in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs

updateTime

public void updateTime(java.lang.String columnName,
                       java.sql.Time x)
                throws java.sql.SQLException
Updates the designated column with a java.sql.Time value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateTime in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs

updateTimestamp

public void updateTimestamp(int columnIndex,
                            java.sql.Timestamp x)
                     throws java.sql.SQLException
Updates the designated column with a java.sql.Timestamp value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateTimestamp in interface SSRowSet
Parameters:
columnIndex - - the first column is 1, the second is 2, ...
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs

updateTimestamp

public void updateTimestamp(java.lang.String columnName,
                            java.sql.Timestamp x)
                     throws java.sql.SQLException
Updates the designated column with a java.sql.Timestamp value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.

Specified by:
updateTimestamp in interface SSRowSet
Parameters:
columnName - - the SQL name of the column
x - - the new column value
Throws:
java.sql.SQLException - - if a database access error occurs