|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
DataItems that implement the RowsetAcess interface represent a set of rows resulting from a query against a database. The RowsetAccess interface contains methods to get metadata (number of columns, plus column names and datatypes), to read the rows, to extract column values, to update rows, to validate changes and send changes to the database, and to obtain a DbAccess object for the associated database.
| Method Summary | |
boolean |
canDelete()
Determine if deleting rows is allowed |
boolean |
canInsert()
Determine if inserting rows is allowed |
boolean |
canUpdate()
Returns true if modifying the items in all columns in the existing rows is allowed, false otherwise. |
boolean |
canUpdate(int columnNumber)
Returns true if modifying the items in the specified column is allowed, false otherwise. |
boolean |
canUpdate(java.lang.String columnName)
Returns true if modifying the items in the specified column is allowed, false otherwise. |
void |
deleteRow()
Delete the current row. |
void |
flush()
Flush all changes to the underlying database. |
int |
getColumnCount()
Returns the number of columns in the rowset. |
java.lang.String |
getColumnDatatypeName(int columnIndex)
Given the one based column index, returns the column's data source specific type name. |
int |
getColumnDatatypeNumber(int columnIndex)
Given the one based columnIndex, returns the data type for the column using the encoding specified by java.sql.Types |
java.lang.Object |
getColumnItem(int columnIndex)
Given the one based column index, returns an Object which can be used to obtain the current value of the specified column. |
java.lang.Object |
getColumnItem(java.lang.String columnName)
Given the name of the column, returns an Object which can be used to obtain the current value of the column. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column indicated by columnIndex if a name is available. |
DbAccess |
getDb()
Get the RowsetAccess item's database |
int |
getHighWaterMark()
Return the total number of rows known to the producer so far. |
boolean |
hasMoreRows()
Return true if there may be more rows to fetch. |
void |
lockRow()
Lock the current row. |
void |
newRow()
Create a new, empty row and set the row cursor to this row. |
boolean |
next()
Advances the row cursor to the next row. |
void |
setColumnValue(int columnIndex,
java.lang.Object object)
Given the one-based index of a column, set the value of the column in the current row. |
void |
setColumnValue(java.lang.String columnName,
java.lang.Object object)
Given the name of a column, set the value of the column in the current row. |
| Method Detail |
public int getColumnCount()
public java.lang.String getColumnName(int columnIndex)
throws java.lang.IndexOutOfBoundsException
columnIndex - a one-based index of a rowset column
public int getColumnDatatypeNumber(int columnIndex)
throws java.lang.IndexOutOfBoundsException
columnIndex - a one-based index of a rowset column
public java.lang.String getColumnDatatypeName(int columnIndex)
throws java.lang.IndexOutOfBoundsException
columnIndex - a one-based index of a rowset column
public boolean next()
throws java.sql.SQLException,
RowsetValidationException
public int getHighWaterMark()
public boolean hasMoreRows()
public java.lang.Object getColumnItem(int columnIndex)
throws java.lang.IndexOutOfBoundsException,
java.sql.SQLException
columnIndex - the index of the column desired
public java.lang.Object getColumnItem(java.lang.String columnName)
throws ColumnNotFoundException,
DuplicateColumnException,
java.sql.SQLException
columnName - the name of the column desired
public void newRow()
throws java.sql.SQLException,
RowsetValidationException
public void setColumnValue(int columnIndex,
java.lang.Object object)
throws java.lang.IndexOutOfBoundsException,
java.sql.SQLException,
RowsetValidationException
columnIndex - one-based column numberobject - new value for the column
public void setColumnValue(java.lang.String columnName,
java.lang.Object object)
throws ColumnNotFoundException,
DuplicateColumnException,
java.sql.SQLException,
RowsetValidationException
columnName - the name of the columnobject - new value for column
public void deleteRow()
throws java.sql.SQLException,
RowsetValidationException
public void flush()
throws java.sql.SQLException,
RowsetValidationException
public void lockRow()
throws java.sql.SQLException,
RowsetValidationException
public boolean canInsert()
public boolean canUpdate()
public boolean canUpdate(java.lang.String columnName)
throws ColumnNotFoundException,
DuplicateColumnException
public boolean canUpdate(int columnNumber)
throws java.lang.IndexOutOfBoundsException
public boolean canDelete()
public DbAccess getDb()
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||