|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nqadmin.swingSet.datasources.SSRowSetAdapter
public class SSRowSetAdapter
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.
| 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. |
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 |
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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SSRowSetAdapter()
| Method Detail |
|---|
public boolean getBoolean(int columnIndex)
throws java.sql.SQLException
getBoolean in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public int getInt(int columnIndex)
throws java.sql.SQLException
getInt in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public long getLong(int columnIndex)
throws java.sql.SQLException
getLong in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public float getFloat(int columnIndex)
throws java.sql.SQLException
getFloat in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public double getDouble(int columnIndex)
throws java.sql.SQLException
getDouble in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public java.lang.String getString(int columnIndex)
throws java.sql.SQLException
getString in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public java.sql.Date getDate(int columnIndex)
throws java.sql.SQLException
getDate in interface SSRowSetcolumnIndex - - column number . first column is 1, second column is 2....
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public byte[] getBytes(int columnIndex)
throws java.sql.SQLException
getBytes in interface SSRowSetcolumnIndex - - index number of the column
throws - an SQLException - if a database access error occurs
java.sql.SQLException
public void updateBoolean(int columnIndex,
boolean x)
throws java.sql.SQLException
updateBoolean in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateInt(int columnIndex,
int x)
throws java.sql.SQLException
updateInt in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateLong(int columnIndex,
long x)
throws java.sql.SQLException
updateLong in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateFloat(int columnIndex,
float x)
throws java.sql.SQLException
updateFloat in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateDouble(int columnIndex,
double x)
throws java.sql.SQLException
updateDouble in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateString(int columnIndex,
java.lang.String x)
throws java.sql.SQLException
updateString in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateDate(int columnIndex,
java.sql.Date x)
throws java.sql.SQLException
updateDate in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......x - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateBytes(int columnIndex,
byte[] x)
throws java.sql.SQLException
updateBytes in interface SSRowSetcolumnIndex - - the index number of the columnx - - the new column value
throws - an SQLException - if a database access error occurs
java.sql.SQLException
public void updateNull(int columnIndex)
throws java.sql.SQLException
updateNull in interface SSRowSetcolumnIndex - - index number of the column. first column is 1, second column is 2......
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public boolean getBoolean(java.lang.String columnName)
throws java.sql.SQLException
getBoolean in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public int getInt(java.lang.String columnName)
throws java.sql.SQLException
getInt in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public long getLong(java.lang.String columnName)
throws java.sql.SQLException
getLong in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public float getFloat(java.lang.String columnName)
throws java.sql.SQLException
getFloat in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public double getDouble(java.lang.String columnName)
throws java.sql.SQLException
getDouble in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public java.lang.String getString(java.lang.String columnName)
throws java.sql.SQLException
getString in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public java.sql.Date getDate(java.lang.String columnName)
throws java.sql.SQLException
getDate in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public byte[] getBytes(java.lang.String columnName)
throws java.sql.SQLException
getBytes in interface SSRowSetcolumnName - - the SQL name of the column
throws - an SQLException - if a database access error occurs
java.sql.SQLException
public void updateBoolean(java.lang.String columnName,
boolean x)
throws java.sql.SQLException
updateBoolean in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateInt(java.lang.String columnName,
int x)
throws java.sql.SQLException
updateInt in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateLong(java.lang.String columnName,
long x)
throws java.sql.SQLException
updateLong in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateFloat(java.lang.String columnName,
float x)
throws java.sql.SQLException
updateFloat in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateDouble(java.lang.String columnName,
double x)
throws java.sql.SQLException
updateDouble in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateString(java.lang.String columnName,
java.lang.String x)
throws java.sql.SQLException
updateString in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateDate(java.lang.String columnName,
java.sql.Date x)
throws java.sql.SQLException
updateDate in interface SSRowSetcolumnName - - name of the columnx - - new column value
throws - an SQL exception if an access error occurs.
java.sql.SQLException
public void updateBytes(java.lang.String columnName,
byte[] x)
throws java.sql.SQLException
updateBytes in interface SSRowSetcolumnName - - the name of the columnx - - the new column value
throws - an SQLException - if a database access error occurs
java.sql.SQLException
public void updateNull(java.lang.String columnName)
throws java.sql.SQLException
updateNull in interface SSRowSetcolumnName - - name of the column
throws - an SQL exception if an access error occurs.
java.sql.SQLExceptionpublic void addRowSetListener(javax.sql.RowSetListener listener)
addRowSetListener in interface SSRowSetlistener - - 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 nullpublic void removeRowSetListener(javax.sql.RowSetListener listener)
removeRowSetListener in interface SSRowSetlistener - - a RowSetListener object that is on the list of listeners for this RowSet object
public java.lang.String getColumnName(int columnIndex)
throws java.sql.SQLException
getColumnName in interface SSRowSetcolumnIndex - - column number first column is 1, second column is 2 .....
java.sql.SQLException - - if the object does not contain columnIndex or a access
error occurs
public int getColumnIndex(java.lang.String columnName)
throws java.sql.SQLException
getColumnIndex in interface SSRowSetcolumnName - - name of the column
java.sql.SQLException - - if a data access error
public int getColumnType(java.lang.String columnName)
throws java.sql.SQLException
getColumnType in interface SSRowSetcolumnName - - name of the column
java.sql.SQLException - - if a data access error occurs
public int getColumnType(int columnIndex)
throws java.sql.SQLException
getColumnType in interface SSRowSetcolumnIndex - - column number first column is 1, second column is 2 .....
java.sql.SQLException - - if a data access error occurs
public int getRow()
throws java.sql.SQLException
getRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public int getColumnCount()
throws java.sql.SQLException
getColumnCount in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean next()
throws java.sql.SQLException
next in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean previous()
throws java.sql.SQLException
previous in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean last()
throws java.sql.SQLException
last in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean first()
throws java.sql.SQLException
first in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean isFirst()
throws java.sql.SQLException
isFirst in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public boolean isLast()
throws java.sql.SQLException
isLast in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public void beforeFirst()
throws java.sql.SQLException
beforeFirst in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
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.
absolute in interface SSRowSetrow - - the number of the row to which the cursor should move.
java.sql.SQLException - - if a database access error occurs
public void updateRow()
throws java.sql.SQLException
updateRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs or if this method is called when
the cursor is on the insert row
public void moveToCurrentRow()
throws java.sql.SQLException
moveToCurrentRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public void moveToInsertRow()
throws java.sql.SQLException
moveToInsertRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs
public void insertRow()
throws java.sql.SQLException
insertRow in interface SSRowSetjava.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
public void deleteRow()
throws java.sql.SQLException
deleteRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs or if this method is called
when the cursor is on the insert row
public void cancelRowUpdates()
throws java.sql.SQLException
cancelRowUpdates in interface SSRowSetjava.sql.SQLException - - if a data access error occurs or if this method is called when
the cursor is on the insert row
public void refreshRow()
throws java.sql.SQLException
refreshRow in interface SSRowSetjava.sql.SQLException - - if a data access error occurs or if this method is called
when the cursor is on the insert row
public void execute()
throws java.sql.SQLException
execute in interface SSRowSetjava.sql.SQLException - - if a data access error occurs or any of the properties necessary
for making a connection have not been set
public boolean rowDeleted()
throws java.sql.SQLException
rowDeleted in interface SSRowSetjava.sql.SQLException - - if a database access error occurs
public boolean rowInserted()
throws java.sql.SQLException
rowInserted in interface SSRowSetjava.sql.SQLException - - if a database access error occurs
public boolean rowUpdated()
throws java.sql.SQLException
rowUpdated in interface SSRowSetjava.sql.SQLException - - if a database access error occurs
public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface SSRowSetjava.sql.SQLException - - if a database access error occurs
public java.lang.Object getObject(java.lang.String columnName)
throws java.sql.SQLException
getObject in interface SSRowSetcolumnName - - the SQL name of the column
java.sql.SQLException - - if a database access error occurs
public java.lang.Object getObject(int columnIndex)
throws java.sql.SQLException
getObject in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...
java.sql.SQLException - - if a database access error occurs
public void updateObject(java.lang.String columnName,
java.lang.Object x)
throws java.sql.SQLException
updateObject in interface SSRowSetcolumnName - - the name of the columnx - - the new column value
java.sql.SQLException - - if a database access error occurs
public void updateObject(int columnIndex,
java.lang.Object x)
throws java.sql.SQLException
updateObject in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...x - - the new column value
java.sql.SQLException - - if a database access error occurs
public java.sql.Time getTime(int columnIndex)
throws java.sql.SQLException
getTime in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...
java.sql.SQLException - - if a database access error occurs
public java.sql.Time getTime(java.lang.String columnName)
throws java.sql.SQLException
getTime in interface SSRowSetcolumnName - - the SQL name of the column
java.sql.SQLException - - if a database access error occurs
public java.sql.Timestamp getTimestamp(int columnIndex)
throws java.sql.SQLException
getTimestamp in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...
java.sql.SQLException - - if a database access error occurs
public java.sql.Timestamp getTimestamp(java.lang.String columnName)
throws java.sql.SQLException
getTimestamp in interface SSRowSetcolumnName - - the SQL name of the column
java.sql.SQLException - - if a database access error occurs
public void updateTime(int columnIndex,
java.sql.Time x)
throws java.sql.SQLException
updateTime in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...x - - the new column value
java.sql.SQLException - - if a database access error occurs
public void updateTime(java.lang.String columnName,
java.sql.Time x)
throws java.sql.SQLException
updateTime in interface SSRowSetcolumnName - - the SQL name of the columnx - - the new column value
java.sql.SQLException - - if a database access error occurs
public void updateTimestamp(int columnIndex,
java.sql.Timestamp x)
throws java.sql.SQLException
updateTimestamp in interface SSRowSetcolumnIndex - - the first column is 1, the second is 2, ...x - - the new column value
java.sql.SQLException - - if a database access error occurs
public void updateTimestamp(java.lang.String columnName,
java.sql.Timestamp x)
throws java.sql.SQLException
updateTimestamp in interface SSRowSetcolumnName - - the SQL name of the columnx - - the new column value
java.sql.SQLException - - if a database access error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||