|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Base interface for DatabaseTable and DatabaseIndex. This interface is not intended to be implemented directly.
DatabaseManager| Method Summary | |
void |
afterLast()
Moves the table cursor to a position after the last row in the table. |
void |
beforeFirst()
Moves the table cursor to a position before the first row in the table. |
void |
close()
In some cases, it is desirable to immediately release a DatabaseTable's database and other resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release. |
void |
commitUpdates()
ModSQL will always call this method after performing a series of updateObject() calls on a particular row. |
void |
deleteRow()
Delete the current row from the table and the underlying database. |
Object |
getObject(int column)
Get the value of a column in the current row as a Java object. |
long |
getRowCount()
This method is expected to return the total number of rows in the database. |
Object |
getRowId()
Get database specific rowid value. |
boolean |
isAfterLast()
Determine if the table cursor is positioned after the last row in the table. |
boolean |
isBeforeFirst()
Determine if the table cursor is positioned before the first row in the table. |
boolean |
next()
A DatabaseTable is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc. |
void |
updateObject(int column,
Object x)
Update a column with an Object value. |
| Method Detail |
public void close()
throws DatabaseException
In some cases, it is desirable to immediately release a DatabaseTable's database and other resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.
Note: A DatabaseTable is automatically closed by the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A DatabaseTable is also automatically closed when it is garbage collected.
DatabaseException - if a database-access error occurs
public long getRowCount()
throws DatabaseException
DatabaseException - if a database-access error occurs
public boolean next()
throws DatabaseException
DatabaseException - if a database-access error occurs
public boolean isBeforeFirst()
throws DatabaseException
DatabaseException - if a database-access error occurs
public boolean isAfterLast()
throws DatabaseException
DatabaseException - if a database-access error occurs
public void beforeFirst()
throws DatabaseException
DatabaseException - if a database-access error occurs
public void afterLast()
throws DatabaseException
DatabaseException - if a database-access error occurs
public Object getRowId()
throws DatabaseException
DatabaseException - if a database-access error occurs
public Object getObject(int column)
throws DatabaseException
Get the value of a column in the current row as a Java object.
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 specified in the JDBC spec.
This method may also be used to read datatabase specific abstract data types.
column - the first column is 1, the second is 2, ...DatabaseException - if a database-access error occurs
public void updateObject(int column,
Object x)
throws DatabaseException
Update a column with an Object value.
The updateObject() method is used to update column values in the current row, or a newly inserted row.
column - the first column is 1, the second is 2, ...x - the new column valueDatabaseException - if a database-access error occurs
public void commitUpdates()
throws DatabaseException
DatabaseException - if a database-access error occurs
public void deleteRow()
throws DatabaseException
DatabaseException - if a database-access error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||