|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A table is zero or more rows. Each row consists of one or more columns.
| Method Summary | |
void |
beforeFirst()
Reset the table to before the first row. |
int |
getColumnCount()
Returns the number of columns in the table. |
String |
getColumnName(int column)
Get the name of a column. |
int |
getMaxResultSize(int column)
Return the maximum number of characters String values in the specified column will have. |
Object |
getObject(int column)
Get the value of a column in the current row as a Java object. |
Object[] |
getRow()
Get the current row as an array of Objects. |
long |
getRowCount()
Get count of number of rows, if known. |
int |
getSQLType(int column)
Return the SQL type of the specified column. |
boolean |
isConstant()
Determine if this table is constant. |
boolean |
next()
The table 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 |
optimize()
Prepare the table for use. |
void |
registerWith(Object o)
Some functions (most notably IndirectValue) needs to register themselves before optimize() can be called. |
String |
toString(boolean with_brackets)
Return human readable description of table. |
| Method Detail |
public void registerWith(Object o)
throws SQLException
o - object to register withSQLException - if an error occurs
public void optimize()
throws SQLException
SQLException - if an error occurspublic String toString(boolean with_brackets)
with_brackets - bracket the expression
public boolean isConstant()
throws SQLException
Determine if this table is constant.
This method can only be called after optimize().
SQLException - if an error occurs
public long getRowCount()
throws SQLException
Get count of number of rows, if known. This method is best called immediately after a call to beforeFirst(); however, it still might return -1 in that case too.
This method can only be called after optimize().
SQLException - if an error occurs
public int getColumnCount()
throws SQLException
Returns the number of columns in the table. The returned value must be greater than zero.
This method can only be called after optimize().
SQLException - if an error occurs
public String getColumnName(int column)
throws SQLException
Get the name of a column.
This method can only be called after optimize().
column - column number (starting from zero)SQLException - if an error occurs
public int getSQLType(int column)
throws SQLException
Return the SQL type of the specified column.
This method can only be called after optimize().
column - column number (starting from zero)SQLException - if an error occurs
public int getMaxResultSize(int column)
throws SQLException
Return the maximum number of characters String values in the specified column will have. If the column is not of String type or if the maximum length is not known, -1 should be returned.
This method can only be called after optimize().
column - column number (starting from zero)SQLException - if an error occurs
public void beforeFirst()
throws SQLException
Reset the table to before the first row. After a call to this method, next() should advance to the first row in the table.
This method can only be called after optimize().
SQLException - if an error occurs
public boolean next()
throws SQLException,
EndOfTable
The table 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.
This method can only be called after optimize().
SQLException - if an error occursEndOfTable - if the table is advanced beyond that last row
public Object[] getRow()
throws SQLException,
EndOfTable
Get the current row as an array of Objects.
This method can only be called after optimize().
SQLException - if an error occursEndOfTable - if the table is advanced beyond that last row
public Object getObject(int column)
throws SQLException,
EndOfTable
Get the value of a column in the current row as a Java object. This method will throw an exception if the current row is not valid.
This method can only be called after optimize().
column - column number (starting from zero)SQLException - if an error occursEndOfTable - if the table is advanced beyond that last row
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||