Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.driver.DriverResultSet Class Reference

Collaboration diagram for org.objectweb.cjdbc.driver.DriverResultSet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

boolean next () throws java.sql.SQLException
boolean prev () throws SQLException
boolean isBeforeFirst () throws SQLException
boolean isAfterLast () throws SQLException
boolean isFirst () throws SQLException
boolean isLast () throws SQLException
void beforeFirst () throws SQLException
void afterLast () throws SQLException
boolean first () throws SQLException
boolean last () throws SQLException
int getRow () throws SQLException
boolean absolute (int row) throws SQLException
boolean relative (int rows) throws SQLException
boolean previous () throws SQLException
void setFetchDirection (int direction) throws SQLException
int getFetchDirection () throws SQLException
void setFetchSize (int rows) throws SQLException
int getFetchSize () throws SQLException
String getString (int columnIndex) throws SQLException
boolean getBoolean (int columnIndex) throws SQLException
short getShort (int columnIndex) throws SQLException
int getInt (int columnIndex) throws SQLException
long getLong (int columnIndex) throws SQLException
float getFloat (int columnIndex) throws SQLException
double getDouble (int columnIndex) throws SQLException
BigDecimal getBigDecimal (int columnIndex, int scale) throws SQLException
byte[] getBytes (int columnIndex) throws SQLException
java.sql.Date getDate (int columnIndex) throws SQLException
Time getTime (int columnIndex) throws SQLException
Timestamp getTimestamp (int columnIndex) throws SQLException
InputStream getAsciiStream (int columnIndex) throws SQLException
InputStream getUnicodeStream (int columnIndex) throws SQLException
InputStream getBinaryStream (int columnIndex) throws SQLException
String getString (String columnName) throws SQLException
boolean getBoolean (String columnName) throws SQLException
byte getByte (String columnName) throws SQLException
short getShort (String columnName) throws SQLException
int getInt (String columnName) throws SQLException
long getLong (String columnName) throws SQLException
float getFloat (String columnName) throws SQLException
double getDouble (String columnName) throws SQLException
BigDecimal getBigDecimal (String columnName, int scale) throws SQLException
byte[] getBytes (String columnName) throws SQLException
java.sql.Date getDate (String columnName) throws SQLException
Time getTime (String columnName) throws SQLException
Timestamp getTimestamp (String columnName) throws SQLException
InputStream getAsciiStream (String columnName) throws SQLException
InputStream getUnicodeStream (String columnName) throws SQLException
InputStream getBinaryStream (String columnName) throws SQLException
java.sql.SQLWarning getWarnings () throws SQLException
void clearWarnings () throws SQLException
String getCursorName () throws SQLException
Object getObject (int columnIndex) throws SQLException
Object getObject (String columnName) throws SQLException
java.io.Reader getCharacterStream (int columnIndex) throws SQLException
java.io.Reader getCharacterStream (String columnName) throws SQLException
BigDecimal getBigDecimal (int columnIndex) throws SQLException
BigDecimal getBigDecimal (String columnName) throws SQLException
Object getObject (int i, java.util.Map map) throws SQLException
java.sql.Ref getRef (int i) throws SQLException
java.sql.Blob getBlob (int columnIndex) throws SQLException
java.sql.Clob getClob (int columnIndex) throws SQLException
java.sql.Array getArray (int columnIndex) throws SQLException
Object getObject (String colName, java.util.Map map) throws SQLException
java.sql.Ref getRef (String colName) throws SQLException
java.sql.Blob getBlob (String colName) throws SQLException
java.sql.Clob getClob (String colName) throws SQLException
java.sql.Array getArray (String colName) throws SQLException
java.sql.Date getDate (int columnIndex, Calendar cal) throws SQLException
java.sql.Date getDate (String columnName, Calendar cal) throws SQLException
java.sql.Time getTime (int columnIndex, Calendar cal) throws SQLException
java.sql.Time getTime (String columnName, Calendar cal) throws SQLException
java.sql.Timestamp getTimestamp (int columnIndex, Calendar cal) throws SQLException
java.sql.Timestamp getTimestamp (String columnName, Calendar cal) throws SQLException
boolean rowUpdated () throws SQLException
boolean rowInserted () throws SQLException
boolean rowDeleted () throws SQLException
void updateNull (int columnIndex) throws SQLException
void updateBoolean (int columnIndex, boolean x) throws SQLException
void updateByte (int columnIndex, byte x) throws SQLException
void updateShort (int columnIndex, short x) throws SQLException
void updateInt (int columnIndex, int x) throws SQLException
void updateLong (int columnIndex, long x) throws SQLException
void updateFloat (int columnIndex, float x) throws SQLException
void updateDouble (int columnIndex, double x) throws SQLException
void updateBigDecimal (int columnIndex, BigDecimal x) throws SQLException
void updateString (int columnIndex, String x) throws SQLException
void updateBytes (int columnIndex, byte x[]) throws SQLException
void updateDate (int columnIndex, java.sql.Date x) throws SQLException
void updateTime (int columnIndex, java.sql.Time x) throws SQLException
void updateTimestamp (int columnIndex, java.sql.Timestamp x) throws SQLException
void updateAsciiStream (int columnIndex, java.io.InputStream x, int length) throws SQLException
void updateBinaryStream (int columnIndex, java.io.InputStream x, int length) throws SQLException
void updateCharacterStream (int columnIndex, java.io.Reader x, int length) throws SQLException
void updateObject (int columnIndex, Object x, int scale) throws SQLException
void updateObject (int columnIndex, Object x) throws SQLException
void updateNull (String columnName) throws SQLException
void updateBoolean (String columnName, boolean x) throws SQLException
void updateByte (String columnName, byte x) throws SQLException
void updateShort (String columnName, short x) throws SQLException
void updateInt (String columnName, int x) throws SQLException
void updateLong (String columnName, long x) throws SQLException
void updateFloat (String columnName, float x) throws SQLException
void updateDouble (String columnName, double x) throws SQLException
void updateBigDecimal (String columnName, BigDecimal x) throws SQLException
void updateString (String columnName, String x) throws SQLException
void updateBytes (String columnName, byte x[]) throws SQLException
void updateDate (String columnName, java.sql.Date x) throws SQLException
void updateTime (String columnName, java.sql.Time x) throws SQLException
void updateTimestamp (String columnName, java.sql.Timestamp x) throws SQLException
void updateAsciiStream (String columnName, java.io.InputStream x, int length) throws SQLException
void updateBinaryStream (String columnName, java.io.InputStream x, int length) throws SQLException
void updateCharacterStream (String columnName, java.io.Reader reader, int length) throws SQLException
void updateObject (String columnName, Object x, int scale) throws SQLException
void updateObject (String columnName, Object x) throws SQLException
void insertRow () throws SQLException
void updateRow () throws SQLException
void deleteRow () throws SQLException
void refreshRow () throws SQLException
void cancelRowUpdates () throws SQLException
void moveToInsertRow () throws SQLException
void moveToCurrentRow () throws SQLException
int getType () throws SQLException
int getConcurrency () throws SQLException
void close () throws SQLException
boolean wasNull () throws SQLException
java.sql.Statement getStatement () throws SQLException
java.sql.ResultSetMetaData getMetaData () throws SQLException
int findColumn (String columnName) throws SQLException
 DriverResultSet (Field[] fields, ArrayList resultData)
 DriverResultSet (Field[] fields, ArrayList resultData, boolean crsHasMoreData, String cursorName)
java.net.URL getURL (int columnIndex) throws SQLException
java.net.URL getURL (String columnName) throws SQLException
void updateRef (int columnIndex, java.sql.Ref x) throws SQLException
void updateRef (String columnName, java.sql.Ref x) throws SQLException
void updateBlob (int columnIndex, java.sql.Blob x) throws SQLException
void updateBlob (String columnName, java.sql.Blob x) throws SQLException
void updateClob (int columnIndex, java.sql.Clob x) throws SQLException
void updateClob (String columnName, java.sql.Clob x) throws SQLException
void updateArray (int columnIndex, java.sql.Array x) throws SQLException
void updateArray (String columnName, java.sql.Array x) throws SQLException
byte getByte (int columnIndex) throws SQLException
String toString ()

Protected Member Functions

void setData (ArrayList newData)
void setHasMoreData (boolean hasMore)
void setStatement (Statement stmt) throws SQLException

Protected Attributes

int currentRow = -1
int nbOfRows = -1
int nbOfColumns = -1
ArrayList data
int fetchDirection = FETCH_FORWARD
int fetchSize = 0
Field[] fields
boolean wasNullFlag = false
transient Hashtable columnNameToIndex = null
transient Hashtable fullColumnNameToIndex = null
int resultSetType = 0
int resultSetConcurrency = 0
SQLWarning warnings = null
transient Statement owningStatement

Detailed Description

A ResultSet provides access to a table of data generated by executing a Statement. The table rows are retrieved in sequence. Within a row its column values can be accessed in any order.

A ResultSet maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The 'next' method moves the cursor to the next row.

The getXXX methods retrieve column values for the current row. You can retrieve values either using the index number of the column, or by using the name of the column. In general using the column index will be more efficient. Columns are numbered from 1.

For maximum portability, ResultSet columns within each row should be read in left-to-right order and each column should be read only once.

For the getXXX methods, the JDBC driver attempts to convert the underlying data to the specified Java type and returns a suitable Java value. See the JDBC specification for allowable mappings from SQL types to Java types with the ResultSet getXXX methods.

Column names used as input to getXXX methods are case insenstive. When performing a getXXX using a column name, if several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL Query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names were used there is no way for the programmer to guarentee that they actually refer to the intended columns.

A ResultSet 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.

The number, types and properties of a ResultSet's columns are provided by the ResultSetMetaData object returned by the getMetaData method.

See also:
java.sql.ResultSetMetaData

java.sql.ResultSet

Author:
Mark Matthews <mmatthew@worldserver.com>

Emmanuel Cecchet

Alexander Laamanen

Nicolas Modrzyk

Jean-Bernard van Zuylen

Version:
1.0

Definition at line 97 of file DriverResultSet.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet Field[]  fields,
ArrayList  resultData
 

Creates a new DriverResultSet.

Parameters:
fields an array of Field objects (basically, the ResultSet meta data)
resultData array of the actual data (data[row][column])

Definition at line 3104 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.DriverResultSet.nbOfColumns, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

03105   {
03106     currentRow = -1;
03107     this.fields = fields;
03108     data = resultData;
03109     if (data == null)
03110       nbOfRows = 0;
03111     else
03112       nbOfRows = data.size();
03113     nbOfColumns = fields.length;
03114     isClosed = false;
03115   }

org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet Field[]  fields,
ArrayList  resultData,
boolean  crsHasMoreData,
String  cursorName
 

Creates a new DriverResultSet object from information we get back from a ControllerResultSet.

Parameters:
fields an array of Field objects (basically, the ResultSet meta data)
resultData array of the actual data (data[row][column])
crsHasMoreData true if remote ControllerResultSet has more data to fetch
cursorName cursor name for a streamable ResultSet

Definition at line 3128 of file DriverResultSet.java.

03130   {
03131     this(fields, resultData);
03132     this.cursorName = cursorName;
03133     hasMoreData = crsHasMoreData;
03134   }


Member Function Documentation

boolean org.objectweb.cjdbc.driver.DriverResultSet.absolute int  row  )  throws SQLException
 

JDBC 2.0

Move to an absolute row number in the result set.

If row is positive, moves to an absolute row with respect to the beginning of the result set. The first row is row 1, the second is row 2, etc.

If row is negative, moves to an absolute row position with respect to the end of result set. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) indicates the next-to-last row, etc.

An attempt to position the cursor beyond the first/last row in the result set, leaves the cursor before/after the first/last row, respectively.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().

Parameters:
row the row to move to
Returns:
true if on the result set, false if off.
Exceptions:
SQLException if a database-access error occurs, or row is 0, or result set type is TYPE_FORWARD_ONLY.

Definition at line 491 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.afterLast(), org.objectweb.cjdbc.driver.DriverResultSet.beforeFirst(), org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.first(), org.objectweb.cjdbc.driver.DriverResultSet.last(), and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.relative().

00492   {
00493     checkIfClosed();
00494 
00495     if (inserting)
00496     {
00497       insertStatement.clearParameters();
00498       tempRow = null;
00499       inserting = false;
00500     }
00501 
00502     if (updating)
00503       cancelRowUpdates();
00504 
00505     if (nbOfRows == 0)
00506       return false;
00507 
00508     if (row == 0)
00509       throw new SQLException("Cannot absolute position to row 0");
00510 
00511     if (row == 1)
00512       return first();
00513 
00514     if (row == -1)
00515       return last();
00516 
00517     if (row > nbOfRows)
00518     {
00519       afterLast();
00520       return false;
00521     }
00522 
00523     if (row < 0)
00524     { // adjust to reflect after end of result set
00525       int newRowPosition = nbOfRows + row + 1;
00526 
00527       if (newRowPosition <= 0)
00528       {
00529         beforeFirst();
00530         return false;
00531       }
00532 
00533       return absolute(newRowPosition);
00534     }
00535     else
00536     {
00537       row--; // adjust for index difference
00538       currentRow = row;
00539       return true;
00540     }
00541   }

void org.objectweb.cjdbc.driver.DriverResultSet.afterLast  )  throws SQLException
 

JDBC 2.0

Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows.

Exceptions:
SQLException if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

Definition at line 370 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute().

00371   {
00372     checkIfClosed();
00373     
00374     if (inserting)
00375     {
00376       insertStatement.clearParameters();
00377       tempRow = null;
00378       inserting = false;
00379     }
00380 
00381     if (updating)
00382       cancelRowUpdates();
00383 
00384     if (nbOfRows != 0)
00385       currentRow = nbOfRows;
00386   }

void org.objectweb.cjdbc.driver.DriverResultSet.beforeFirst  )  throws SQLException
 

JDBC 2.0

Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows.

Exceptions:
SQLException if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY

Definition at line 344 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), and org.objectweb.cjdbc.driver.DriverResultSet.currentRow.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute().

00345   {
00346     checkIfClosed();
00347     
00348     if (inserting)
00349     {
00350       insertStatement.clearParameters();
00351       tempRow = null;
00352       inserting = false;
00353     }
00354 
00355     if (updating)
00356       cancelRowUpdates();
00357     
00358     currentRow = -1;
00359   }

void org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates  )  throws SQLException
 

JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. If no updates have been made or updateRow() has already been called, then this method has no effect.

Exceptions:
SQLException if a database-access error occurs, or if called when on the insert row.

Definition at line 2883 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.clearParameters().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute(), org.objectweb.cjdbc.driver.DriverResultSet.afterLast(), org.objectweb.cjdbc.driver.DriverResultSet.beforeFirst(), org.objectweb.cjdbc.driver.DriverResultSet.first(), org.objectweb.cjdbc.driver.DriverResultSet.last(), org.objectweb.cjdbc.driver.DriverResultSet.next(), org.objectweb.cjdbc.driver.DriverResultSet.prev(), org.objectweb.cjdbc.driver.DriverResultSet.refreshRow(), and org.objectweb.cjdbc.driver.DriverResultSet.relative().

02884   {
02885     checkIfClosed();
02886 
02887     if (inserting)
02888       throw new SQLException("cancelRowUpdates cannot be "
02889           + "called when the cursor is on the insert row");
02890 
02891     if (!updating)
02892       return;
02893 
02894     updateStatement.clearParameters();
02895     tempRow = null;
02896     updating = false;
02897   }

void org.objectweb.cjdbc.driver.DriverResultSet.clearWarnings  )  throws SQLException
 

After this call, getWarnings returns null until a new warning is reported for this ResultSet

Exceptions:
SQLException if a database access error occurs

Definition at line 1384 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.warnings.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.next().

01385   {
01386     warnings = null;
01387   }

void org.objectweb.cjdbc.driver.DriverResultSet.close  )  throws SQLException
 

Closes the remote ResultSet if the ResultSet was streamed else just closes the ResultSet locally.

Exceptions:
SQLException if a database access error occurs

Definition at line 2984 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.Connection.closeRemoteResultSet(), org.objectweb.cjdbc.driver.Statement.connection, and org.objectweb.cjdbc.driver.DriverResultSet.owningStatement.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.refreshRow().

02985   {
02986     if (hasMoreData)
02987       owningStatement.connection.closeRemoteResultSet(cursorName);
02988     isClosed = true;
02989   }

void org.objectweb.cjdbc.driver.DriverResultSet.deleteRow  )  throws SQLException
 

JDBC 2.0 Delete the current row from the result set and the underlying database. Cannot be called when on the insert row.

Exceptions:
SQLException if a database-access error occurs, or if called when on the insert row.

Definition at line 2765 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.PreparedStatement.executeUpdate(), org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows, and org.objectweb.cjdbc.driver.PreparedStatement.setObject().

02766   {
02767     checkIfClosed();
02768 
02769     if (inserting)
02770       throw new SQLException("deleteRow cannot be called "
02771           + "when the cursor is on the insert row");
02772 
02773     this.checkRowPos();
02774 
02775     if (deleteStatement == null)
02776       this.buildDeleteStatement();
02777 
02778     // Add primary key info from current row
02779     for (int i = 0; i < primaryKeyColumns.length; ++i)
02780       deleteStatement
02781           .setObject(
02782               i + 1,
02783               ((Object[]) data.get(currentRow))[findColumn(primaryKeyColumns[i]) - 1]);
02784 
02785     // Delete row from underlying database
02786     try
02787     {
02788       deleteStatement.executeUpdate();
02789     }
02790     finally
02791     {
02792       // Clean up
02793       deleteStatement.clearParameters();
02794     }
02795 
02796     // Delete row from this ResultSet
02797     data.remove(currentRow);
02798     nbOfRows--;
02799 
02800     // Deleting cancels all updates on the row
02801     if (updating)
02802       this.cancelRowUpdates();
02803   }

int org.objectweb.cjdbc.driver.DriverResultSet.findColumn String  columnName  )  throws SQLException
 

Map a ResultSet column name to a ResultSet column index

Parameters:
columnName the name of the column
Returns:
the column index
Exceptions:
SQLException if a database access error occurs

Definition at line 3064 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.columnNameToIndex, org.objectweb.cjdbc.driver.DriverResultSet.fields, org.objectweb.cjdbc.driver.DriverResultSet.fullColumnNameToIndex, org.objectweb.cjdbc.driver.Field.getFieldName(), and org.objectweb.cjdbc.driver.Field.getFullName().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.deleteRow(), org.objectweb.cjdbc.driver.DriverResultSet.getArray(), org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream(), org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal(), org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream(), org.objectweb.cjdbc.driver.DriverResultSet.getBlob(), org.objectweb.cjdbc.driver.DriverResultSet.getBoolean(), org.objectweb.cjdbc.driver.DriverResultSet.getByte(), org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream(), org.objectweb.cjdbc.driver.DriverResultSet.getClob(), org.objectweb.cjdbc.driver.DriverResultSet.getDate(), org.objectweb.cjdbc.driver.DriverResultSet.getDouble(), org.objectweb.cjdbc.driver.DriverResultSet.getFloat(), org.objectweb.cjdbc.driver.DriverResultSet.getInt(), org.objectweb.cjdbc.driver.DriverResultSet.getLong(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), org.objectweb.cjdbc.driver.DriverResultSet.getShort(), org.objectweb.cjdbc.driver.DriverResultSet.getString(), org.objectweb.cjdbc.driver.DriverResultSet.getTime(), org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp(), org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream(), org.objectweb.cjdbc.driver.DriverResultSet.refreshRow(), org.objectweb.cjdbc.driver.DriverResultSet.updateAsciiStream(), org.objectweb.cjdbc.driver.DriverResultSet.updateBigDecimal(), org.objectweb.cjdbc.driver.DriverResultSet.updateBinaryStream(), org.objectweb.cjdbc.driver.DriverResultSet.updateBoolean(), org.objectweb.cjdbc.driver.DriverResultSet.updateByte(), org.objectweb.cjdbc.driver.DriverResultSet.updateBytes(), org.objectweb.cjdbc.driver.DriverResultSet.updateCharacterStream(), org.objectweb.cjdbc.driver.DriverResultSet.updateDate(), org.objectweb.cjdbc.driver.DriverResultSet.updateDouble(), org.objectweb.cjdbc.driver.DriverResultSet.updateFloat(), org.objectweb.cjdbc.driver.DriverResultSet.updateInt(), org.objectweb.cjdbc.driver.DriverResultSet.updateLong(), org.objectweb.cjdbc.driver.DriverResultSet.updateNull(), org.objectweb.cjdbc.driver.DriverResultSet.updateObject(), org.objectweb.cjdbc.driver.DriverResultSet.updateRow(), org.objectweb.cjdbc.driver.DriverResultSet.updateShort(), org.objectweb.cjdbc.driver.DriverResultSet.updateString(), org.objectweb.cjdbc.driver.DriverResultSet.updateTime(), and org.objectweb.cjdbc.driver.DriverResultSet.updateTimestamp().

03065   {
03066     if (columnNameToIndex == null)
03067       buildIndexMapping();
03068 
03069     Integer index = (Integer) columnNameToIndex.get(columnName);
03070 
03071     if (index == null)
03072       index = (Integer) fullColumnNameToIndex.get(columnName);
03073 
03074     if (index != null)
03075       return index.intValue() + 1;
03076     else
03077     {
03078       // Try this inefficient way, now
03079       String columnNameUC = columnName.toUpperCase();
03080       for (int i = 0; i < nbOfColumns; i++)
03081       {
03082         if (fields[i].getFieldName().toUpperCase().equals(columnNameUC))
03083           return i + 1;
03084         else if (fields[i].getFullName().toUpperCase().equals(columnNameUC))
03085           return i + 1;
03086       }
03087       throw new java.sql.SQLException("Column '" + columnName + "' not found.");
03088     }
03089   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.first  )  throws SQLException
 

JDBC 2.0

Moves to the first row in the result set.

Returns:
true if on a valid row, false if no rows in the result set.
Exceptions:
SQLException if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

Definition at line 398 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute().

00399   {
00400     checkIfClosed();
00401     
00402     if (inserting)
00403     {
00404       insertStatement.clearParameters();
00405       tempRow = null;
00406       inserting = false;
00407     }
00408 
00409     if (updating)
00410       cancelRowUpdates();
00411 
00412     if (nbOfRows == 0)
00413       return false;
00414 
00415     currentRow = 0;
00416     return true;
00417   }

java.sql.Array org.objectweb.cjdbc.driver.DriverResultSet.getArray String  colName  )  throws SQLException
 

JDBC 2.0 Get an array column.

Parameters:
colName the column name
Returns:
an object representing an SQL array
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1748 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getArray().

01749   {
01750     return getArray(findColumn(colName));
01751   }

java.sql.Array org.objectweb.cjdbc.driver.DriverResultSet.getArray int  columnIndex  )  throws SQLException
 

JDBC 2.0 Gets an array column.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
an object representing an SQL array
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1676 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getArray().

01677   {
01678     checkRowAndColPosAndSetNullFlag(columnIndex);
01679 
01680     if (wasNullFlag)
01681       return null;
01682 
01683     if (inserting || updating)
01684       return (java.sql.Array) tempRow[columnIndex - 1];
01685     else
01686       return (java.sql.Array) (((Object[]) data.get(currentRow))[columnIndex - 1]);
01687   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getAsciiStream(java.lang.String)

Definition at line 1337 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream().

01338   {
01339     return getAsciiStream(findColumn(columnName));
01340   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream int  columnIndex  )  throws SQLException
 

A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particulary suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
a Java InputStream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null
Exceptions:
SQLException if a database access error occurs
See also:
getBinaryStream(int)

Definition at line 1173 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream().

01174   {
01175     checkRowAndColPosAndSetNullFlag(columnIndex);
01176 
01177     return getBinaryStream(columnIndex);
01178   }

BigDecimal org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getBigDecimal(java.lang.String)

Definition at line 1579 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal().

01580   {
01581     return getBigDecimal(findColumn(columnName));
01582   }

BigDecimal org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal int  columnIndex  )  throws SQLException
 

JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
the column value (full precision); if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1514 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

01515   {
01516     checkRowAndColPosAndSetNullFlag(columnIndex);
01517 
01518     if (wasNullFlag)
01519       return null;
01520 
01521     Object obj;
01522     if (inserting || updating)
01523       obj = tempRow[columnIndex - 1];
01524     else
01525       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
01526 
01527     if (obj instanceof BigDecimal)
01528       return (BigDecimal) obj;
01529     else if (obj instanceof Long)
01530     {
01531       return new BigDecimal(((Long) obj).longValue());
01532     }
01533     else if (obj instanceof BigInteger)
01534     {
01535       return new BigDecimal(((BigInteger) obj));
01536     }
01537     else if (obj instanceof Short)
01538     {
01539       return new BigDecimal(((Short) obj).shortValue());
01540     }
01541     else if (obj instanceof Integer)
01542     {
01543       return new BigDecimal(((Integer) obj).intValue());
01544     }
01545     else if (obj instanceof String)
01546     {
01547       return new BigDecimal((String) obj);
01548     }
01549     else if (obj instanceof Number)
01550     {
01551       // float and double have to be converted via string
01552       // othwerwise we produce errors
01553       // javadoc for BigDecimal :
01554       // Note: the results of this constructor can be somewhat unpredictable.
01555       // One might assume that new BigDecimal(.1) is exactly equal to .1, but
01556       // it is actually equal to
01557       // .1000000000000000055511151231257827021181583404541015625. This is so
01558       // because .1 cannot be represented exactly as a double (or, for that
01559       // matter, as a binary fraction of any finite length). Thus, the long
01560       // value that is being passed in to the constructor is not exactly equal
01561       // to .1, appearances nonwithstanding.
01562 
01563       // The (String) constructor, on the other hand, is perfectly
01564       // predictable: new BigDecimal(".1") is exactly equal to .1, as one
01565       // would expect. Therefore, it is generally recommended that the
01566       // (String) constructor be used in preference to this one.
01567       return new BigDecimal(obj.toString());
01568     }
01569     else
01570     {
01571       throw new SQLException("Type " + obj.getClass().getName()
01572           + " is not compatible with BigDecimal");
01573     }
01574   }

BigDecimal org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal String  columnName,
int  scale
throws SQLException
 

See also:
java.sql.ResultSet#getBigDecimal(String, int)
Deprecated:

Definition at line 1296 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal().

01298   {
01299     return getBigDecimal(findColumn(columnName), scale);
01300   }

BigDecimal org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal int  columnIndex,
int  scale
throws SQLException
 

Get the value of a column in the current row as a java.lang.BigDecimal object

Parameters:
columnIndex the first column is 1, the second is 2...
scale the number of digits to the right of the decimal
Returns:
the column value; if the value is SQL NULL, null
Exceptions:
SQLException if a database access error occurs
Deprecated:

Definition at line 980 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal().

00982   {
00983     BigDecimal bigDecimal = getBigDecimal(columnIndex);
00984     if (bigDecimal == null)
00985       return null;
00986     else
00987       return bigDecimal.setScale(scale);
00988   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getBinaryStream(java.lang.String)

Definition at line 1354 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream().

01355   {
01356     return getBinaryStream(findColumn(columnName));
01357   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream int  columnIndex  )  throws SQLException
 

A column value can also be retrieved as a binary strea. This method is suitable for retrieving LONGVARBINARY values.

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
a Java InputStream that delivers the database column value as a stream of bytes. If the value is SQL NULL, then the result is null
Exceptions:
SQLException if a database access error occurs
See also:
getAsciiStream(int)

getUnicodeStream(int)

Definition at line 1212 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.getBytes().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getAsciiStream(), org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream(), and org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream().

01213   {
01214     checkRowAndColPosAndSetNullFlag(columnIndex);
01215 
01216     byte b[] = getBytes(columnIndex);
01217     if (b != null)
01218       return new ByteArrayInputStream(b);
01219     else
01220       return null; // SQL NULL
01221   }

java.sql.Blob org.objectweb.cjdbc.driver.DriverResultSet.getBlob String  colName  )  throws SQLException
 

JDBC 2.0 Get a BLOB column.

Parameters:
colName the column name
Returns:
an object representing a BLOB
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1724 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBlob().

01725   {
01726     return getBlob(findColumn(colName));
01727   }

java.sql.Blob org.objectweb.cjdbc.driver.DriverResultSet.getBlob int  columnIndex  )  throws SQLException
 

JDBC 2.0 Gets a BLOB column.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
an object representing a BLOB
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1618 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.DriverResultSet.getBytes().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getBlob().

01619   {
01620     checkRowAndColPosAndSetNullFlag(columnIndex);
01621 
01622     if (wasNullFlag)
01623       return null;
01624 
01625     Object o;
01626     if (inserting || updating)
01627       o = tempRow[columnIndex - 1];
01628     else
01629       o = (((Object[]) data.get(currentRow))[columnIndex - 1]);
01630 
01631     // Test if the type of the Blob is indeed a Blob else we assume these are
01632     // just bytes.
01633     if (o instanceof Blob)
01634       return (java.sql.Blob) o;
01635     else
01636       return new Blob(getBytes(columnIndex));
01637   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.getBoolean String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getBoolean(java.lang.String)

Definition at line 1239 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBoolean().

01240   {
01241     return getBoolean(findColumn(columnName));
01242   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.getBoolean int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java boolean

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
the column value, false for SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 693 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanFalse(), org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanTrue(), org.objectweb.cjdbc.driver.DriverResultSet.owningStatement, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getBoolean().

00694   {
00695     checkRowAndColPosAndSetNullFlag(columnIndex);
00696 
00697     if (wasNullFlag)
00698       return false;
00699 
00700     Object object;
00701     if (inserting || updating)
00702       object = tempRow[columnIndex - 1];
00703     else
00704       object = (((Object[]) data.get(currentRow))[columnIndex - 1]);
00705 
00706     String stringVal = object.toString();
00707     if ((stringVal != null) && (stringVal.length() > 0))
00708     {
00709       stringVal = stringVal.toLowerCase();
00710 
00711       // first we check the connection values to be consistent
00712       if (owningStatement.connection.getPreparedStatementBooleanTrue().equals(
00713           stringVal))
00714       {
00715         return true;
00716       }
00717       else if (owningStatement.connection.getPreparedStatementBooleanFalse()
00718           .equals(stringVal))
00719       {
00720         return false;
00721       }
00722 
00723       // now we check some other possible string representations of boolean
00724       else if ("t".equals(stringVal))
00725       {
00726         return true;
00727       }
00728       else if ("f".equals(stringVal))
00729       {
00730         return false;
00731       }
00732       else if ("true".equals(stringVal))
00733       {
00734         return true;
00735       }
00736       else if ("false".equals(stringVal))
00737       {
00738         return false;
00739       }
00740       else if ("1".equals(stringVal))
00741       {
00742         return true;
00743       }
00744       else if ("0".equals(stringVal))
00745       {
00746         return false;
00747       }
00748       else if ("y".equals(stringVal))
00749       {
00750         return true;
00751       }
00752       else if ("n".equals(stringVal))
00753       {
00754         return false;
00755       }
00756       else if ("yes".equals(stringVal))
00757       {
00758         return true;
00759       }
00760       else if ("no".equals(stringVal))
00761       {
00762         return false;
00763       }
00764 
00765       // we didn't find anything reasonable and throw an exception
00766       throw new SQLException("column value " + stringVal
00767           + " could not be converted to boolean");
00768     }
00769     else
00770     {
00771       return false;
00772     }
00773   }

byte org.objectweb.cjdbc.driver.DriverResultSet.getByte int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java byte.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 3657 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.Field.toString().

03658   {
03659     checkRowAndColPosAndSetNullFlag(columnIndex);
03660 
03661     if (wasNullFlag)
03662       return 0;
03663 
03664     Object obj;
03665     if (inserting || updating)
03666       obj = tempRow[columnIndex - 1];
03667     else
03668       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
03669 
03670     if (obj instanceof Number)
03671     {
03672       return ((Number) obj).byteValue();
03673     }
03674 
03675     // the object is not of type number we parse the string representation
03676     try
03677     {
03678       String string = obj.toString();
03679       string = string.trim();
03680       return Byte.parseByte(string);
03681     }
03682     catch (NumberFormatException e)
03683     {
03684       throw new SQLException("the value " + obj.toString()
03685           + " is not a valid byte");
03686     }
03687   }

byte org.objectweb.cjdbc.driver.DriverResultSet.getByte String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getByte(java.lang.String)

Definition at line 1247 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

01248   {
01249     return getByte(findColumn(columnName));
01250   }

byte [] org.objectweb.cjdbc.driver.DriverResultSet.getBytes String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getBytes(java.lang.String)

Definition at line 1305 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getBytes().

01306   {
01307     return getBytes(findColumn(columnName));
01308   }

byte [] org.objectweb.cjdbc.driver.DriverResultSet.getBytes int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java byte array.

Be warned If the blob is huge, then you may run out of memory.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database access error occurs

Definition at line 999 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.common.sql.filters.AbstractBlobFilter.decode(), org.objectweb.cjdbc.driver.Connection.getBlobFilter(), org.objectweb.cjdbc.driver.Statement.getConnection(), and org.objectweb.cjdbc.driver.DriverResultSet.owningStatement.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream(), org.objectweb.cjdbc.driver.DriverResultSet.getBlob(), and org.objectweb.cjdbc.driver.DriverResultSet.getBytes().

01000   {
01001     checkRowAndColPosAndSetNullFlag(columnIndex);
01002 
01003     if (wasNullFlag)
01004       return null;
01005 
01006     Object o;
01007     if (inserting || updating)
01008       o = tempRow[columnIndex - 1];
01009     else
01010       o = ((Object[]) data.get(currentRow))[columnIndex - 1];
01011 
01012     byte[] tmp;
01013     if (o instanceof java.lang.String)
01014     {
01015       tmp = ((String) o).getBytes();
01016     }
01017     else
01018     {
01019       tmp = (byte[]) o;
01020     }
01021 
01022     if (((Connection) owningStatement.getConnection()).isDriverProcessed())
01023       return owningStatement.connection.getBlobFilter().decode(tmp);
01024     else
01025       return tmp;
01026   }

java.io.Reader org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getCharacterStream(java.lang.String)

Definition at line 1499 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream().

01501   {
01502     return getCharacterStream(findColumn(columnName));
01503   }

java.io.Reader org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream int  columnIndex  )  throws SQLException
 

See also:
java.sql.ResultSet#getCharacterStream(int)

Definition at line 1487 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.DriverResultSet.getString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream().

01488   {
01489     String s = getString(columnIndex);
01490     if (s == null)
01491       return null;
01492     char[] data = s.toCharArray();
01493     return new java.io.CharArrayReader(data);
01494   }

java.sql.Clob org.objectweb.cjdbc.driver.DriverResultSet.getClob String  colName  )  throws SQLException
 

JDBC 2.0 Get a CLOB column.

Parameters:
colName the column name
Returns:
an object representing a CLOB
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1736 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getClob().

01737   {
01738     return getClob(findColumn(colName));
01739   }

java.sql.Clob org.objectweb.cjdbc.driver.DriverResultSet.getClob int  columnIndex  )  throws SQLException
 

JDBC 2.0 Gets a CLOB column.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
an object representing a CLOB
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1646 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getClob().

01647   {
01648     checkRowAndColPosAndSetNullFlag(columnIndex);
01649 
01650     if (wasNullFlag)
01651       return null;
01652 
01653     Object o;
01654     if (inserting || updating)
01655       o = tempRow[columnIndex - 1];
01656     else
01657       o = (((Object[]) data.get(currentRow))[columnIndex - 1]);
01658 
01659     // Test if the type of the Clob is indeed a Clob or just a String
01660     //throw new SQLException("Class:"+o.getClass());
01661     if (o instanceof String)
01662       return new Clob((String) o);
01663     else if (o instanceof Clob)
01664       return (java.sql.Clob) o;
01665     else
01666       return new Clob(new String(o.toString()));
01667   }

int org.objectweb.cjdbc.driver.DriverResultSet.getConcurrency  )  throws SQLException
 

JDBC 2.0 Return the concurrency of this result set. The concurrency used is determined by the statement that created the result set.

Returns:
CONCUR_READ_ONLY or CONCUR_UPDATABLE
Exceptions:
SQLException if a database-access error occurs

Definition at line 2973 of file DriverResultSet.java.

02974   {
02975     return resultSetConcurrency;
02976   }

String org.objectweb.cjdbc.driver.DriverResultSet.getCursorName  )  throws SQLException
 

Get the name of the SQL cursor used by this ResultSet

In SQL, a result table is retrieved though a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.

JDBC supports this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResulSet is also the current row of this SQL cursor.

Note: If positioned update is not supported, a java.sql.SQLException is thrown.

Returns:
the ResultSet's SQL cursor name.
Exceptions:
SQLException if a database access error occurs

Definition at line 1406 of file DriverResultSet.java.

01407   {
01408     throw new NotImplementedException("getCursorName()");
01409   }

java.sql.Date org.objectweb.cjdbc.driver.DriverResultSet.getDate String  columnName,
Calendar  cal
throws SQLException
 

Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.

Parameters:
columnName is the SQL name of the column
cal the calendar to use in constructing the date
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1779 of file DriverResultSet.java.

01781   {
01782     throw new NotImplementedException("getDate(String, Calendar)");
01783   }

java.sql.Date org.objectweb.cjdbc.driver.DriverResultSet.getDate int  columnIndex,
Calendar  cal
throws SQLException
 

JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.

Parameters:
columnIndex the first column is 1, the second is 2, ...
cal the calendar to use in constructing the date
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1763 of file DriverResultSet.java.

01765   {
01766     throw new NotImplementedException("getDate(int, Calendar)");
01767   }

java.sql.Date org.objectweb.cjdbc.driver.DriverResultSet.getDate String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getDate(java.lang.String)

Definition at line 1313 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getDate().

01314   {
01315     return getDate(findColumn(columnName));
01316   }

java.sql.Date org.objectweb.cjdbc.driver.DriverResultSet.getDate int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a java.sql.Date object

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 1035 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getDate().

01036   {
01037     checkRowAndColPosAndSetNullFlag(columnIndex);
01038 
01039     if (wasNullFlag)
01040       return null;
01041 
01042     // we may be reading a timestamp column and have to convert it to date
01043     // the client is asking for the date field only, we have to make sure
01044     // hour,minutes,... are cleared
01045     String dateString;
01046     if (inserting || updating)
01047       dateString = tempRow[columnIndex - 1].toString();
01048     else
01049       dateString = ((Object[]) data.get(currentRow))[columnIndex - 1]
01050           .toString();
01051 
01052     if (dateString.length() == 10)
01053       return java.sql.Date.valueOf(dateString);
01054     else
01055       return java.sql.Date.valueOf(dateString.substring(0, 10));
01056   }

double org.objectweb.cjdbc.driver.DriverResultSet.getDouble String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getDouble(java.lang.String)

Definition at line 1287 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getDouble().

01288   {
01289     return getDouble(findColumn(columnName));
01290   }

double org.objectweb.cjdbc.driver.DriverResultSet.getDouble int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java double.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 938 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getDouble().

00939   {
00940     checkRowAndColPosAndSetNullFlag(columnIndex);
00941 
00942     if (wasNullFlag)
00943       return 0;
00944 
00945     Object obj;
00946     if (inserting || updating)
00947       obj = tempRow[columnIndex - 1];
00948     else
00949       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
00950 
00951     if (obj instanceof Number)
00952     {
00953       return ((Number) obj).doubleValue();
00954     }
00955 
00956     // the object is not of type number we parse the string representation
00957     try
00958     {
00959       String string = obj.toString();
00960       string = string.trim();
00961       return Double.parseDouble(string);
00962     }
00963     catch (NumberFormatException e)
00964     {
00965       throw new SQLException("the value " + obj.toString()
00966           + " is not a valid double number");
00967     }
00968   }

int org.objectweb.cjdbc.driver.DriverResultSet.getFetchDirection  )  throws SQLException
 

JDBC 2.0 Return the fetch direction for this result set.

Returns:
the fetch direction
Exceptions:
SQLException if a database-access error occurs

Definition at line 624 of file DriverResultSet.java.

00625   {
00626     return fetchDirection;
00627   }

int org.objectweb.cjdbc.driver.DriverResultSet.getFetchSize  )  throws SQLException
 

JDBC 2.0 Return the fetch size for this result set.

Returns:
the fetch size
Exceptions:
SQLException if a database-access error occurs

Definition at line 655 of file DriverResultSet.java.

00656   {
00657     return fetchSize;
00658   }

float org.objectweb.cjdbc.driver.DriverResultSet.getFloat String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getFloat(java.lang.String)

Definition at line 1279 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getFloat().

01280   {
01281     return getFloat(findColumn(columnName));
01282   }

float org.objectweb.cjdbc.driver.DriverResultSet.getFloat int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java float.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 899 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getFloat().

00900   {
00901     checkRowAndColPosAndSetNullFlag(columnIndex);
00902 
00903     if (wasNullFlag)
00904       return 0;
00905 
00906     Object obj;
00907     if (inserting || updating)
00908       obj = tempRow[columnIndex - 1];
00909     else
00910       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
00911 
00912     if (obj instanceof Number)
00913     {
00914       return ((Number) obj).floatValue();
00915     }
00916 
00917     // the object is not of type number we parse the string representation
00918     try
00919     {
00920       String string = obj.toString();
00921       string = string.trim();
00922       return Float.parseFloat(string);
00923     }
00924     catch (NumberFormatException e)
00925     {
00926       throw new SQLException("the value " + obj.toString()
00927           + " is not a valid float number");
00928     }
00929   }

int org.objectweb.cjdbc.driver.DriverResultSet.getInt String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getInt(java.lang.String)

Definition at line 1263 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getInt().

01264   {
01265     return getInt(findColumn(columnName));
01266   }

int org.objectweb.cjdbc.driver.DriverResultSet.getInt int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java int.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 821 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getInt().

00822   {
00823     checkRowAndColPosAndSetNullFlag(columnIndex);
00824 
00825     if (wasNullFlag)
00826       return 0;
00827 
00828     Object obj;
00829     if (inserting || updating)
00830       obj = tempRow[columnIndex - 1];
00831     else
00832       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
00833 
00834     if (obj instanceof Number)
00835     {
00836       return ((Number) obj).intValue();
00837     }
00838 
00839     // the object is not of type number we parse the string representation
00840     try
00841     {
00842       String string = obj.toString();
00843       string = string.trim();
00844       return Integer.parseInt(string);
00845     }
00846     catch (NumberFormatException e)
00847     {
00848       throw new SQLException("the value " + obj.toString()
00849           + " is not a valid int number");
00850     }
00851   }

long org.objectweb.cjdbc.driver.DriverResultSet.getLong String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getLong(java.lang.String)

Definition at line 1271 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getLong().

01272   {
01273     return getLong(findColumn(columnName));
01274   }

long org.objectweb.cjdbc.driver.DriverResultSet.getLong int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java long.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 860 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getLong().

00861   {
00862     checkRowAndColPosAndSetNullFlag(columnIndex);
00863 
00864     if (wasNullFlag)
00865       return 0;
00866 
00867     Object obj;
00868     if (inserting || updating)
00869       obj = tempRow[columnIndex - 1];
00870     else
00871       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
00872 
00873     if (obj instanceof Number)
00874     {
00875       return ((Number) obj).longValue();
00876     }
00877 
00878     // the object is not of type number we parse the string representation
00879     try
00880     {
00881       String string = obj.toString();
00882       string = string.trim();
00883       return Long.parseLong(string);
00884     }
00885     catch (NumberFormatException e)
00886     {
00887       throw new SQLException("the value " + obj.toString()
00888           + " is not a valid long number");
00889     }
00890   }

java.sql.ResultSetMetaData org.objectweb.cjdbc.driver.DriverResultSet.getMetaData  )  throws SQLException
 

The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method

Returns:
a description of the ResultSet's columns
Exceptions:
SQLException if a database access error occurs

Definition at line 3051 of file DriverResultSet.java.

03052   {
03053     return new ResultSetMetaData(this);
03054   }

Object org.objectweb.cjdbc.driver.DriverResultSet.getObject String  colName,
java.util.Map  map
throws SQLException
 

JDBC 2.0 Returns the value of column as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.

Parameters:
colName the column name
map the mapping from SQL type names to Java classes
Returns:
an object representing the SQL value
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1699 of file DriverResultSet.java.

01701   {
01702     throw new NotImplementedException("getObject(String, java.util.Map)");
01703   }

Object org.objectweb.cjdbc.driver.DriverResultSet.getObject int  i,
java.util.Map  map
throws SQLException
 

JDBC 2.0 Returns the value of column as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.

Parameters:
i the first column is 1, the second is 2, ...
map the mapping from SQL type names to Java classes
Returns:
an object representing the SQL value
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1594 of file DriverResultSet.java.

01595   {
01596     throw new NotImplementedException("getObject(int, java.util.Map)");
01597   }

Object org.objectweb.cjdbc.driver.DriverResultSet.getObject String  columnName  )  throws SQLException
 

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 specification.

This method may also be used to read database specific abstract data types.

Parameters:
columnName is the SQL name of the column
Returns:
a Object holding the column value
Exceptions:
SQLException if a database access error occurs

Definition at line 1477 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getObject().

01478   {
01479     return getObject(findColumn(columnName));
01480   }

Object org.objectweb.cjdbc.driver.DriverResultSet.getObject int  columnIndex  )  throws SQLException
 

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 specification.

This method may also be used to read database specific abstract data types.

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
a Object holding the column value
Exceptions:
SQLException if a database access error occurs

Definition at line 1425 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.common.sql.filters.AbstractBlobFilter.decode(), org.objectweb.cjdbc.driver.Connection.getBlobFilter(), and org.objectweb.cjdbc.driver.DriverResultSet.owningStatement.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getObject().

01426   {
01427     checkRowAndColPosAndSetNullFlag(columnIndex);
01428 
01429     if (wasNullFlag)
01430       return null;
01431 
01432     Object o;
01433     if (inserting || updating)
01434       o = tempRow[columnIndex];
01435     else
01436       o = ((Object[]) data.get(currentRow))[columnIndex - 1];
01437 
01438     if (o instanceof byte[])
01439     {
01440       try
01441       {
01442         byte[] b = owningStatement.connection.getBlobFilter()
01443             .decode((byte[]) o);
01444         return new ObjectInputStream(new ByteArrayInputStream(b)).readObject();
01445       }
01446       catch (ClassNotFoundException e)
01447       {
01448         e.printStackTrace();
01449         throw new SQLException("Missing class while deserializing Blob" + e);
01450       }
01451       catch (IOException e)
01452       {
01453         e.printStackTrace();
01454         throw new SQLException("IOException while deserializing Blob" + e);
01455       }
01456     }
01457     else
01458     {
01459       return o;
01460     }
01461   }

java.sql.Ref org.objectweb.cjdbc.driver.DriverResultSet.getRef String  colName  )  throws SQLException
 

JDBC 2.0 Get a REF(<structured-type>) column.

Parameters:
colName the column name
Returns:
an object representing data of an SQL REF type
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1712 of file DriverResultSet.java.

01713   {
01714     throw new NotImplementedException("getRef(String)");
01715   }

java.sql.Ref org.objectweb.cjdbc.driver.DriverResultSet.getRef int  i  )  throws SQLException
 

JDBC 2.0 Get a REF(<structured-type>) column.

Parameters:
i the first column is 1, the second is 2, ...
Returns:
an object representing data of an SQL REF type
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1606 of file DriverResultSet.java.

01607   {
01608     throw new NotImplementedException("getRef");
01609   }

int org.objectweb.cjdbc.driver.DriverResultSet.getRow  )  throws SQLException
 

JDBC 2.0

Determine the current row number. The first row is number 1, the second number 2, etc.

Returns:
the current row number, else return 0 if there is no current row
Exceptions:
SQLException if a database-access error occurs.

Definition at line 459 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00460   {
00461     checkIfClosed();
00462     if (currentRow < 0 || currentRow >= nbOfRows || nbOfRows == 0)
00463       return 0;
00464     else
00465       return currentRow + 1;
00466   }

short org.objectweb.cjdbc.driver.DriverResultSet.getShort String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getShort(java.lang.String)

Definition at line 1255 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getShort().

01256   {
01257     return getShort(findColumn(columnName));
01258   }

short org.objectweb.cjdbc.driver.DriverResultSet.getShort int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java short.

Parameters:
columnIndex the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 782 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getShort().

00783   {
00784     checkRowAndColPosAndSetNullFlag(columnIndex);
00785 
00786     if (wasNullFlag)
00787       return 0;
00788 
00789     Object obj;
00790     if (inserting || updating)
00791       obj = tempRow[columnIndex - 1];
00792     else
00793       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
00794 
00795     if (obj instanceof Number)
00796     {
00797       return ((Number) obj).shortValue();
00798     }
00799 
00800     // the object is not of type number we parse the string representation
00801     try
00802     {
00803       String string = obj.toString();
00804       string = string.trim();
00805       return Short.parseShort(string);
00806     }
00807     catch (NumberFormatException e)
00808     {
00809       throw new SQLException("the value " + obj.toString()
00810           + " is not a valid short number");
00811     }
00812   }

java.sql.Statement org.objectweb.cjdbc.driver.DriverResultSet.getStatement  )  throws SQLException
 

JDBC 2.0 Return the Statement that produced the ResultSet.

Returns:
the Statement that produced the ResultSet, or null if the result was produced some other way.
Exceptions:
SQLException if a database-access error occurs

Definition at line 3015 of file DriverResultSet.java.

03016   {
03017     return owningStatement;
03018   }

String org.objectweb.cjdbc.driver.DriverResultSet.getString String  columnName  )  throws SQLException
 

The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.

Parameters:
columnName is the SQL name of the column
Returns:
the column value
Exceptions:
SQLException if a database access error occurs

Definition at line 1231 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

01232   {
01233     return this.getString(findColumn(columnName));
01234   }

String org.objectweb.cjdbc.driver.DriverResultSet.getString int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a Java String

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
the column value, null for SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 673 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, and org.objectweb.cjdbc.driver.PreparedStatement.toString().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream().

00674   {
00675     checkRowAndColPosAndSetNullFlag(columnIndex);
00676 
00677     if (wasNullFlag)
00678       return null;
00679 
00680     if (inserting || updating)
00681       return tempRow[columnIndex - 1].toString();
00682     else
00683       return (((Object[]) data.get(currentRow))[columnIndex - 1]).toString();
00684   }

java.sql.Time org.objectweb.cjdbc.driver.DriverResultSet.getTime String  columnName,
Calendar  cal
throws SQLException
 

Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.

Parameters:
columnName is the SQL name of the column
cal the calendar to use in constructing the time
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1811 of file DriverResultSet.java.

01813   {
01814     throw new NotImplementedException("getTime(String, Calendar)");
01815   }

java.sql.Time org.objectweb.cjdbc.driver.DriverResultSet.getTime int  columnIndex,
Calendar  cal
throws SQLException
 

Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.

Parameters:
columnIndex the first column is 1, the second is 2, ...
cal the calendar to use in constructing the time
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1795 of file DriverResultSet.java.

01797   {
01798     throw new NotImplementedException("getTime(int, Calendar)");
01799   }

Time org.objectweb.cjdbc.driver.DriverResultSet.getTime String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getTime(java.lang.String)

Definition at line 1321 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getTime().

01322   {
01323     return getTime(findColumn(columnName));
01324   }

Time org.objectweb.cjdbc.driver.DriverResultSet.getTime int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a java.sql.Time object

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 1065 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getTime().

01066   {
01067     checkRowAndColPosAndSetNullFlag(columnIndex);
01068 
01069     if (wasNullFlag)
01070       return null;
01071 
01072     Object obj;
01073     if (inserting || updating)
01074       obj = tempRow[columnIndex - 1];
01075     else
01076       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
01077 
01078     if (obj instanceof java.util.Date)
01079     {
01080       java.util.Date time = (java.util.Date) obj;
01081       // the driver returns the format of the column, but we are asking for
01082       // the time values only.
01083       String timeString = time.toString();
01084       if (timeString.length() == 8)
01085       {
01086         // ok we have got a timefield of the format HH:mm:ss, exactly the way
01087         // we need it, no further processing is required
01088         return new Time(time.getTime());
01089       }
01090 
01091       // we have got the date fields too and have to clear the year, month and
01092       // date field
01093       Calendar cal = Calendar.getInstance();
01094       cal.setTime(time);
01095       cal.clear(Calendar.YEAR);
01096       cal.clear(Calendar.MONTH);
01097       cal.clear(Calendar.DATE);
01098       cal.clear(Calendar.MILLISECOND);
01099       return new Time(cal.getTimeInMillis());
01100     }
01101 
01102     // the object is not of type date we parse the string representation
01103     try
01104     {
01105       String string = obj.toString();
01106       string = string.trim();
01107       return Time.valueOf(string);
01108     }
01109     catch (IllegalArgumentException e)
01110     {
01111       throw new SQLException("the value " + obj.toString()
01112           + " is not a valid time");
01113     }
01114   }

java.sql.Timestamp org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp String  columnName,
Calendar  cal
throws SQLException
 

Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.

Parameters:
columnName is the SQL name of the column
cal the calendar to use in constructing the timestamp
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1845 of file DriverResultSet.java.

01847   {
01848     throw new NotImplementedException("getTimestamp(String, Calendar)");
01849   }

java.sql.Timestamp org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp int  columnIndex,
Calendar  cal
throws SQLException
 

Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.

Parameters:
columnIndex the first column is 1, the second is 2, ...
cal the calendar to use in constructing the timestamp
Returns:
the column value; if the value is SQL NULL, the result is null
Exceptions:
SQLException if a database-access error occurs.

Definition at line 1828 of file DriverResultSet.java.

01830   {
01831     throw new NotImplementedException("getTimestamp(int, Calendar)");
01832   }

Timestamp org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getTimestamp(java.lang.String)

Definition at line 1329 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp().

01330   {
01331     return getTimestamp(findColumn(columnName));
01332   }

Timestamp org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp int  columnIndex  )  throws SQLException
 

Get the value of a column in the current row as a java.sql.Timestamp object

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Exceptions:
SQLException if a database access error occurs

Definition at line 1123 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.data.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp().

01124   {
01125     checkRowAndColPosAndSetNullFlag(columnIndex);
01126 
01127     if (wasNullFlag)
01128       return null;
01129 
01130     Object obj;
01131     if (inserting || updating)
01132       obj = tempRow[columnIndex - 1];
01133     else
01134       obj = ((Object[]) data.get(currentRow))[columnIndex - 1];
01135 
01136     if (obj instanceof java.util.Date)
01137     {
01138       return new Timestamp(((java.util.Date) obj).getTime());
01139     }
01140 
01141     // the object is not of type timestamp we parse the string representation
01142     try
01143     {
01144       String string = obj.toString();
01145       string = string.trim();
01146       return Timestamp.valueOf(string);
01147     }
01148     catch (IllegalArgumentException e)
01149     {
01150       throw new SQLException("the value " + obj.toString()
01151           + " is not a valid timestamp");
01152     }
01153   }

int org.objectweb.cjdbc.driver.DriverResultSet.getType  )  throws SQLException
 

JDBC 2.0 Return the type of this result set. The type is determined based on the statement that created the result set.

Returns:
TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or TYPE_SCROLL_SENSITIVE
Exceptions:
SQLException if a database-access error occurs

Definition at line 2960 of file DriverResultSet.java.

02961   {
02962     return resultSetType;
02963   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream String  columnName  )  throws SQLException
 

See also:
java.sql.ResultSet#getUnicodeStream(String)
Deprecated:

Definition at line 1346 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), and org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream().

01347   {
01348     return getUnicodeStream(findColumn(columnName));
01349   }

InputStream org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream int  columnIndex  )  throws SQLException
 

A column value can also be retrieved as a stream of Unicode characters. We implement this as a binary stream.

Parameters:
columnIndex the first column is 1, the second is 2...
Returns:
a Java InputStream that delivers the database column value as a stream of two byte Unicode characters. If the value is SQL NULL, then the result is null
Exceptions:
SQLException if a database access error occurs
Deprecated:
See also:
getAsciiStream

getBinaryStream(int)

Definition at line 1193 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.getBinaryStream().

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.getUnicodeStream().

01194   {
01195     checkRowAndColPosAndSetNullFlag(columnIndex);
01196 
01197     return getBinaryStream(columnIndex);
01198   }

java.net.URL org.objectweb.cjdbc.driver.DriverResultSet.getURL String  columnName  )  throws SQLException
 

Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.

Parameters:
columnName the SQL name of the column
Returns:
the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language
Exceptions:
SQLException if a database access error occurs or if a URL is malformed
Since:
JDK 1.4

Definition at line 3505 of file DriverResultSet.java.

03506   {
03507     throw new NotImplementedException("getURL");
03508   }

java.net.URL org.objectweb.cjdbc.driver.DriverResultSet.getURL int  columnIndex  )  throws SQLException
 

Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.

Parameters:
columnIndex the index of the column 1 is the first, 2 is the second,...
Returns:
the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null in the Java programming language
Exceptions:
SQLException if a database access error occurs, or if a URL is malformed
Since:
JDK 1.4

Definition at line 3487 of file DriverResultSet.java.

03488   {
03489     throw new NotImplementedException("getURL");
03490   }

java.sql.SQLWarning org.objectweb.cjdbc.driver.DriverResultSet.getWarnings  )  throws SQLException
 

The first warning reported by calls on this ResultSet is returned. Subsequent ResultSet warnings will be chained to this java.sql.SQLWarning.

The warning chain is automatically cleared each time a new row is read.

Note: This warning chain only covers warnings caused by ResultSet methods. Any warnings caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.

Returns:
the first java.sql.SQLWarning or null;
Exceptions:
SQLException if a database access error occurs.

Definition at line 1372 of file DriverResultSet.java.

01373   {
01374     return warnings;
01375   }

void org.objectweb.cjdbc.driver.DriverResultSet.insertRow  )  throws SQLException
 

JDBC 2.0 Insert the contents of the insert row into the result set and the database. Must be on the insert row when this method is called.

Exceptions:
SQLException if a database-access error occurs, if called when not on the insert row, or if all non-nullable columns in the insert row have not been given a value

Definition at line 2687 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.PreparedStatement.executeUpdate(), and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

02688   {
02689     checkIfClosed();
02690 
02691     if (!inserting)
02692       throw new SQLException("insertRow cannot be called "
02693           + "when the cursor is not on the insert row");
02694 
02695     // Insert row in underlying database
02696     try
02697     {
02698       insertStatement.executeUpdate();
02699     }
02700     finally
02701     {
02702       // Clean up
02703       insertStatement.clearParameters();
02704     }
02705 
02706     // Insert row in this ResultSet
02707     if (data == null)
02708       data = new ArrayList();
02709     data.add(tempRow);
02710     nbOfRows++;
02711 
02712     // Prepare for a new insert
02713     tempRow = new Object[nbOfColumns];
02714   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.isAfterLast  )  throws SQLException
 

JDBC 2.0

Determine if the cursor is after the last row in the result set.

Returns:
true if after the last row, false otherwise. Returns false when the result set contains no rows.
Exceptions:
SQLException if a database-access error occurs.

Definition at line 287 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00288   {
00289     checkIfClosed();
00290     if (nbOfRows == 0)
00291       return false;
00292     else
00293       return (currentRow >= nbOfRows);
00294   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.isBeforeFirst  )  throws SQLException
 

JDBC 2.0.

Determine if the cursor is before the first row in the result set.

Returns:
true if before the first row, false otherwise. Returns false when the result set contains no rows.
Exceptions:
SQLException if a database-access error occurs.

Definition at line 268 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00269   {
00270     checkIfClosed();
00271     if (nbOfRows == 0)
00272       return false;
00273     else
00274       return (currentRow == -1);
00275   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.isFirst  )  throws SQLException
 

JDBC 2.0

Determine if the cursor is on the first row of the result set.

Returns:
true if on the first row, false otherwise.
Exceptions:
SQLException if a database-access error occurs.

Definition at line 305 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00306   {
00307     checkIfClosed();
00308     if (nbOfRows == 0)
00309       return false;
00310     else
00311       return (currentRow == 0);
00312   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.isLast  )  throws SQLException
 

JDBC 2.0

Determine if the cursor is on the last row of the result set. Note: Calling isLast() may be expensive since 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.

Returns:
true if on the last row, false otherwise.
Exceptions:
SQLException if a database-access error occurs.

Definition at line 326 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00327   {
00328     checkIfClosed();
00329     if (nbOfRows == 0)
00330       return false;
00331     else
00332       return (currentRow == nbOfRows - 1);
00333   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.last  )  throws SQLException
 

JDBC 2.0

Moves to the last row in the result set.

Returns:
true if on a valid row, false if no rows in the result set.
Exceptions:
SQLException if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

Definition at line 429 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute().

00430   {
00431     checkIfClosed();
00432 
00433     if (inserting)
00434     {
00435       insertStatement.clearParameters();
00436       tempRow = null;
00437       inserting = false;
00438     }
00439 
00440     if (updating)
00441       cancelRowUpdates();
00442 
00443     if (nbOfRows == 0)
00444       return false;
00445 
00446     currentRow = nbOfRows - 1;
00447     return true;
00448   }

void org.objectweb.cjdbc.driver.DriverResultSet.moveToCurrentRow  )  throws SQLException
 

JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row.

Exceptions:
SQLException if a database-access error occurs, or the result set is not updatable

Definition at line 2934 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.clearParameters().

02935   {
02936     checkIfClosed();
02937 
02938     if (!inserting)
02939       return;
02940 
02941     insertStatement.clearParameters();
02942     tempRow = null;
02943     inserting = false;
02944   }

void org.objectweb.cjdbc.driver.DriverResultSet.moveToInsertRow  )  throws SQLException
 

JDBC 2.0 Move 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 updateXXX() methods prior to inserting the row into the result set. Only the updateXXX(), getXXX(), 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(). UpdateXXX()must be called before getXXX() on a column.

Exceptions:
SQLException if a database-access error occurs, or the result set is not updatable

Definition at line 2913 of file DriverResultSet.java.

02914   {
02915     checkIfClosed();
02916 
02917     if (inserting)
02918       return;
02919 
02920     if (insertStatement == null)
02921       this.buildInsertStatement();
02922 
02923     tempRow = new Object[nbOfColumns];
02924     inserting = true;
02925   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.next  )  throws java.sql.SQLException
 

A ResultSet 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.

If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read

Returns:
true if the new current is valid; false if there are no more rows
Exceptions:
java.sql.SQLException if a database access error occurs

Definition at line 178 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.clearWarnings(), org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.Connection.fetchNextData(), org.objectweb.cjdbc.driver.DriverResultSet.fetchSize, org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows, and org.objectweb.cjdbc.driver.DriverResultSet.owningStatement.

00179   {
00180     checkIfClosed();
00181 
00182     if (inserting)
00183     {
00184       insertStatement.clearParameters();
00185       tempRow = null;
00186       inserting = false;
00187     }
00188 
00189     if (updating)
00190       cancelRowUpdates();
00191     
00192     if (nbOfRows == 0)
00193       return false;
00194     
00195     if (currentRow + 1 >= nbOfRows)
00196     {
00197       if (hasMoreData)
00198       {
00199         owningStatement.connection.fetchNextData(cursorName, fetchSize, this);
00200         currentRow = 0;
00201         if (data == null)
00202         {
00203           nbOfRows = 0;
00204           return false;
00205         }
00206         else
00207         {
00208           nbOfRows = data.size();
00209           return true;
00210         }
00211       }
00212       
00213       // force scroll past end
00214       currentRow = nbOfRows;
00215       return false;
00216     }
00217     
00218     clearWarnings();
00219     currentRow++;
00220     return true;
00221   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.prev  )  throws SQLException
 

The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set.

If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read

Returns:
true if the new current is valid; false if there are no more rows
Exceptions:
SQLException if a database access error occurs

Definition at line 235 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), and org.objectweb.cjdbc.driver.DriverResultSet.currentRow.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.previous().

00236   {
00237     checkIfClosed();
00238     
00239     if (inserting)
00240     {
00241       insertStatement.clearParameters();
00242       tempRow = null;
00243       inserting = false;
00244     }
00245 
00246     if (updating)
00247       cancelRowUpdates();
00248     
00249     if (currentRow - 1 >= 0)
00250     {
00251       currentRow--;
00252       return true;
00253     }
00254     
00255     return false;
00256   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.previous  )  throws SQLException
 

JDBC 2.0

Moves to the previous row in the result set.

Note: previous() is not the same as relative(-1) since it makes sense to call previous() when there is no current row.

Returns:
true if on a valid row, false if off the result set.
Exceptions:
SQLException if a database-access error occurs, or result set type is TYPE_FORWAR_DONLY.

Definition at line 593 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.prev().

00594   {
00595     return prev();
00596   }

void org.objectweb.cjdbc.driver.DriverResultSet.refreshRow  )  throws SQLException
 

JDBC 2.0 Refresh the value of the current row with its current value in the database. Cannot be called when 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 updateXXX(), but before calling updateRow() then the updates made to the row are lost. Calling refreshRow() frequently will likely slow performance.

Exceptions:
SQLException if a database-access error occurs, or if called when on the insert row.

Definition at line 2821 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.close(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.PreparedStatement.executeQuery(), org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), org.objectweb.cjdbc.driver.PreparedStatement.set(), and org.objectweb.cjdbc.driver.PreparedStatement.setObject().

02822   {
02823     checkIfClosed();
02824 
02825     if (inserting)
02826       throw new SQLException("refreshRow cannot be called "
02827           + "when the cursor is on the insert row");
02828 
02829     this.checkRowPos();
02830 
02831     if (refreshStatement == null)
02832       this.buildRefreshStatement();
02833 
02834     // Add primary key info from current row
02835     for (int i = 0; i < primaryKeyColumns.length; ++i)
02836       refreshStatement
02837           .setObject(
02838               i + 1,
02839               ((Object[]) data.get(currentRow))[findColumn(primaryKeyColumns[i]) - 1]);
02840 
02841     // Retrieve row from underlying database
02842     DriverResultSet res;
02843     try
02844     {
02845       res = (DriverResultSet) refreshStatement.executeQuery();
02846     }
02847     finally
02848     {
02849       // Clean up
02850       refreshStatement.clearParameters();
02851     }
02852 
02853     // Refresh row in this ResultSet
02854     try
02855     {
02856       data.set(currentRow, res.data.get(0));
02857     }
02858     catch (NullPointerException e)
02859     {
02860       throw new SQLException("The current row has been "
02861           + "removed from the database");
02862     }
02863     finally
02864     {
02865       // Clean up
02866       res.close();
02867     }
02868 
02869     // Refreshing cancels all updates on the row
02870     if (updating)
02871       this.cancelRowUpdates();
02872   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.relative int  rows  )  throws SQLException
 

JDBC 2.0

Moves a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Note: Calling relative(1) is different than calling next() since is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.

Parameters:
rows the number of rows
Returns:
true if on a row, false otherwise.
Exceptions:
SQLException if a database-access error occurs, or there is no current row, or result set type is TYPE_FORWARD_ONLY.

Definition at line 561 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.absolute(), org.objectweb.cjdbc.driver.DriverResultSet.cancelRowUpdates(), org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

00562   {
00563     checkIfClosed();
00564 
00565     if (inserting)
00566     {
00567       insertStatement.clearParameters();
00568       tempRow = null;
00569       inserting = false;
00570     }
00571 
00572     if (updating)
00573       cancelRowUpdates();
00574 
00575     if (nbOfRows == 0)
00576       return false;
00577 
00578     return absolute(currentRow + rows + 1);
00579   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.rowDeleted  )  throws SQLException
 

JDBC 2.0 Determine if this 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 the result set can detect deletions.

Returns:
true if deleted and deletes are detected
Exceptions:
SQLException if a database-access error occurs
See also:
DatabaseMetaData.deletesAreDetected

Definition at line 1892 of file DriverResultSet.java.

01893   {
01894     throw new NotImplementedException("rowDeleted");
01895   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.rowInserted  )  throws SQLException
 

JDBC 2.0 Determine if the current row has been inserted. The value returned depends on whether or not the result set can detect visible inserts.

Returns:
true if inserted and inserts are detected
Exceptions:
SQLException if a database-access error occurs
See also:
DatabaseMetaData.insertsAreDetected

Definition at line 1877 of file DriverResultSet.java.

01878   {
01879     throw new NotImplementedException("rowInserted");
01880   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.rowUpdated  )  throws SQLException
 

JDBC 2.0 Determine if the current row has been updated. The value returned depends on whether or not the result set can detect updates.

Returns:
true if the row has been visibly updated by the owner or another, and updates are detected
Exceptions:
SQLException if a database-access error occurs
See also:
DatabaseMetaData.updatesAreDetected

Definition at line 1864 of file DriverResultSet.java.

01865   {
01866     throw new NotImplementedException("rowUpdated");
01867   }

void org.objectweb.cjdbc.driver.DriverResultSet.setData ArrayList  newData  )  [protected]
 

Set the ResultSet data with the given ArrayList. This function is used by the ResultSet streaming feature.

Note that metadata (currentRow, nbOfRows, ...) are not updated.

Parameters:
newData new ResultSet data

Definition at line 3028 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.data.

03029   {
03030     data = newData;
03031   }

void org.objectweb.cjdbc.driver.DriverResultSet.setFetchDirection int  direction  )  throws SQLException
 

JDBC 2.0 Give a hint as to the direction in which the rows in this result set will be processed. The initial value is determined by the statement that produced the result set. The fetch direction may be changed at any time.

Parameters:
direction the fetch direction
Exceptions:
SQLException if a database-access error occurs, or the result set type is TYPE_FORWARD_ONLY and direction is not FETCH_FORWARD. MM.MySQL actually ignores this, because it has the whole result set anyway, so the direction is immaterial.

Definition at line 610 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.fetchDirection.

00611   {
00612     if (direction != FETCH_FORWARD && direction != FETCH_REVERSE)
00613       throw new SQLException("Illegal value for fetch direction");
00614     else
00615       fetchDirection = direction;
00616   }

void org.objectweb.cjdbc.driver.DriverResultSet.setFetchSize int  rows  )  throws SQLException
 

JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set. If the fetch size specified is zero, then the JDBC driver ignores the value, and is free to make its own best guess as to what the fetch size should be. The default value is set by the statement that creates the result set. The fetch size may be changed at any time.

Parameters:
rows the number of rows to fetch
Exceptions:
SQLException if a database-access error occurs, or the condition 0 <= rows <= this.getMaxRows() is not satisfied. Currently ignored by this driver.

Definition at line 642 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.fetchSize.

00643   {
00644     if (rows < 0 || rows > nbOfRows)
00645       throw new SQLException("Value must be between 0 and getMaxRows()");
00646     fetchSize = rows;
00647   }

void org.objectweb.cjdbc.driver.DriverResultSet.setHasMoreData boolean  hasMore  )  [protected]
 

Set the hasMoreData boolean (is there more data to fetch from the controller). This function is used by the ResultSet streaming feature.

Parameters:
hasMore new value for hasMoreData

Definition at line 3039 of file DriverResultSet.java.

03040   {
03041     hasMoreData = hasMore;
03042   }

void org.objectweb.cjdbc.driver.DriverResultSet.setStatement Statement  stmt  )  throws SQLException [protected]
 

Set the statement.

Parameters:
stmt The statement to set
Exceptions:
SQLException if an error occurs

Definition at line 3142 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.fetchSize, org.objectweb.cjdbc.driver.Statement.getFetchSize(), org.objectweb.cjdbc.driver.Statement.getResultSetConcurrency(), org.objectweb.cjdbc.driver.Statement.getResultSetType(), org.objectweb.cjdbc.driver.DriverResultSet.owningStatement, org.objectweb.cjdbc.driver.DriverResultSet.resultSetConcurrency, and org.objectweb.cjdbc.driver.DriverResultSet.resultSetType.

03143   {
03144     owningStatement = stmt;
03145     fetchSize = stmt.getFetchSize();
03146     resultSetConcurrency = stmt.getResultSetConcurrency();
03147     resultSetType = stmt.getResultSetType();
03148   }

String org.objectweb.cjdbc.driver.DriverResultSet.toString  ) 
 

See also:
java.lang.Object#toString()

Definition at line 3692 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.currentRow, and org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows.

03693   {
03694     return nbOfRows + " rows - " + nbOfColumns + " columns - current row:"
03695         + currentRow + " - hasMoreData:" + hasMoreData + " - isClosed:"
03696         + isClosed;
03697   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateArray String  columnName,
java.sql.Array  x
throws SQLException
 

Updates the designated column with a java.sql.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.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3644 of file DriverResultSet.java.

03646   {
03647     throw new NotImplementedException("updateArray");
03648   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateArray int  columnIndex,
java.sql.Array  x
throws SQLException
 

Updates the designated column with a java.sql.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.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3626 of file DriverResultSet.java.

03628   {
03629     throw new NotImplementedException("updateArray");
03630   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateAsciiStream String  columnName,
java.io.InputStream  x,
int  length
throws SQLException
 

JDBC 2.0 Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2605 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02607   {
02608     this.updateAsciiStream(findColumn(columnName), x, length);
02609   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateAsciiStream int  columnIndex,
java.io.InputStream  x,
int  length
throws SQLException
 

JDBC 2.0 Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
length the length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2262 of file DriverResultSet.java.

02264   {
02265     this.updateBinaryStream(columnIndex, x, length);
02266   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBigDecimal String  columnName,
BigDecimal  x
throws SQLException
 

JDBC 2.0 Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2510 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02512   {
02513     this.updateBigDecimal(findColumn(columnName), x);
02514   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBigDecimal int  columnIndex,
BigDecimal  x
throws SQLException
 

JDBC 2.0 Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2109 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setBigDecimal().

02111   {
02112     checkIfClosed();
02113 
02114     if (inserting)
02115       insertStatement.setBigDecimal(columnIndex, x);
02116     else
02117     {
02118       checkUpdateFlagAndPrepareUpdateIfNeeded();
02119       updateStatement.setBigDecimal(columnIndex, x);
02120     }
02121 
02122     tempRow[columnIndex - 1] = x;
02123   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBinaryStream String  columnName,
java.io.InputStream  x,
int  length
throws SQLException
 

JDBC 2.0 Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2622 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02624   {
02625     this.updateBinaryStream(findColumn(columnName), x, length);
02626   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBinaryStream int  columnIndex,
java.io.InputStream  x,
int  length
throws SQLException
 

JDBC 2.0 Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
length the length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2279 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.data.

02281   {
02282     checkIfClosed();
02283 
02284     byte[] data = new byte[length];
02285     try
02286     {
02287       x.read(data, 0, length);
02288     }
02289     catch (Exception ioe)
02290     {
02291       throw new SQLException("Problem with streaming of data");
02292     }
02293 
02294     this.updateBytes(columnIndex, data);
02295   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBlob String  columnName,
java.sql.Blob  x
throws SQLException
 

Updates the designated column with a java.sql.Blob 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.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3573 of file DriverResultSet.java.

03575   {
03576     throw new NotImplementedException("updateBlob");
03577   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBlob int  columnIndex,
java.sql.Blob  x
throws SQLException
 

Updates the designated column with a java.sql.Blob 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.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3556 of file DriverResultSet.java.

03557   {
03558     throw new NotImplementedException("updateBlob");
03559   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBoolean String  columnName,
boolean  x
throws SQLException
 

JDBC 2.0 Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2405 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02406   {
02407     this.updateBoolean(findColumn(columnName), x);
02408   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBoolean int  columnIndex,
boolean  x
throws SQLException
 

JDBC 2.0 Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 1934 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setBoolean().

01935   {
01936     checkIfClosed();
01937 
01938     if (inserting)
01939       insertStatement.setBoolean(columnIndex, x);
01940     else
01941     {
01942       checkUpdateFlagAndPrepareUpdateIfNeeded();
01943       updateStatement.setBoolean(columnIndex, x);
01944     }
01945 
01946     tempRow[columnIndex - 1] = Boolean.valueOf(x);
01947   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateByte String  columnName,
byte  x
throws SQLException
 

JDBC 2.0 Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2420 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02421   {
02422     this.updateByte(findColumn(columnName), x);
02423   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateByte int  columnIndex,
byte  x
throws SQLException
 

JDBC 2.0 Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 1959 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setByte().

01960   {
01961     checkIfClosed();
01962 
01963     if (inserting)
01964       insertStatement.setByte(columnIndex, x);
01965     else
01966     {
01967       checkUpdateFlagAndPrepareUpdateIfNeeded();
01968       updateStatement.setByte(columnIndex, x);
01969     }
01970 
01971     tempRow[columnIndex - 1] = new Byte(x);
01972   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBytes String  columnName,
byte  x[]
throws SQLException
 

JDBC 2.0 Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2541 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02542   {
02543     this.updateBytes(findColumn(columnName), x);
02544   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateBytes int  columnIndex,
byte  x[]
throws SQLException
 

JDBC 2.0 Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2160 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setBytes().

02161   {
02162     checkIfClosed();
02163 
02164     if (inserting)
02165       insertStatement.setBytes(columnIndex, x);
02166     else
02167     {
02168       checkUpdateFlagAndPrepareUpdateIfNeeded();
02169       updateStatement.setBytes(columnIndex, x);
02170     }
02171 
02172     tempRow[columnIndex - 1] = x;
02173   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateCharacterStream String  columnName,
java.io.Reader  reader,
int  length
throws SQLException
 

JDBC 2.0 Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
reader the stream
length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2639 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02641   {
02642     this.updateCharacterStream(findColumn(columnName), reader, length);
02643   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateCharacterStream int  columnIndex,
java.io.Reader  x,
int  length
throws SQLException
 

JDBC 2.0 Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
length the length of the stream
Exceptions:
SQLException if a database-access error occurs

Definition at line 2308 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.data.

02310   {
02311     checkIfClosed();
02312 
02313     char[] data = new char[length];
02314     try
02315     {
02316       x.read(data, 0, length);
02317     }
02318     catch (Exception ioe)
02319     {
02320       throw new SQLException("Problem with streaming of data");
02321     }
02322 
02323     this.updateString(columnIndex, new String(data));
02324   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateClob String  columnName,
java.sql.Clob  x
throws SQLException
 

Updates the designated column with a java.sql.Clob 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.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3608 of file DriverResultSet.java.

03610   {
03611     throw new NotImplementedException("updateClob");
03612   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateClob int  columnIndex,
java.sql.Clob  x
throws SQLException
 

Updates the designated column with a java.sql.Clob 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.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3591 of file DriverResultSet.java.

03592   {
03593     throw new NotImplementedException("updateClob");
03594   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateDate String  columnName,
java.sql.Date  x
throws SQLException
 

JDBC 2.0 Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2556 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02558   {
02559     this.updateDate(findColumn(columnName), x);
02560   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateDate int  columnIndex,
java.sql.Date  x
throws SQLException
 

JDBC 2.0 Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2185 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setDate().

02186   {
02187     checkIfClosed();
02188 
02189     if (inserting)
02190       insertStatement.setDate(columnIndex, x);
02191     else
02192     {
02193       checkUpdateFlagAndPrepareUpdateIfNeeded();
02194       updateStatement.setDate(columnIndex, x);
02195     }
02196 
02197     tempRow[columnIndex - 1] = x;
02198   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateDouble String  columnName,
double  x
throws SQLException
 

JDBC 2.0 Update a column with a double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2495 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02496   {
02497     this.updateDouble(findColumn(columnName), x);
02498   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateDouble int  columnIndex,
double  x
throws SQLException
 

JDBC 2.0 Update a column with a Double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2084 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setDouble().

02085   {
02086     checkIfClosed();
02087 
02088     if (inserting)
02089       insertStatement.setDouble(columnIndex, x);
02090     else
02091     {
02092       checkUpdateFlagAndPrepareUpdateIfNeeded();
02093       updateStatement.setDouble(columnIndex, x);
02094     }
02095 
02096     tempRow[columnIndex - 1] = new Double(x);
02097   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateFloat String  columnName,
float  x
throws SQLException
 

JDBC 2.0 Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2480 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02481   {
02482     this.updateFloat(findColumn(columnName), x);
02483   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateFloat int  columnIndex,
float  x
throws SQLException
 

JDBC 2.0 Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2059 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setFloat().

02060   {
02061     checkIfClosed();
02062 
02063     if (inserting)
02064       insertStatement.setFloat(columnIndex, x);
02065     else
02066     {
02067       checkUpdateFlagAndPrepareUpdateIfNeeded();
02068       updateStatement.setFloat(columnIndex, x);
02069     }
02070 
02071     tempRow[columnIndex - 1] = new Float(x);
02072   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateInt String  columnName,
int  x
throws SQLException
 

JDBC 2.0 Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2450 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02451   {
02452     this.updateInt(findColumn(columnName), x);
02453   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateInt int  columnIndex,
int  x
throws SQLException
 

JDBC 2.0 Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2009 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setInt().

02010   {
02011     checkIfClosed();
02012 
02013     if (inserting)
02014       insertStatement.setInt(columnIndex, x);
02015     else
02016     {
02017       checkUpdateFlagAndPrepareUpdateIfNeeded();
02018       updateStatement.setInt(columnIndex, x);
02019     }
02020 
02021     tempRow[columnIndex - 1] = new Integer(x);
02022   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateLong String  columnName,
long  x
throws SQLException
 

JDBC 2.0 Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2465 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02466   {
02467     this.updateLong(findColumn(columnName), x);
02468   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateLong int  columnIndex,
long  x
throws SQLException
 

JDBC 2.0 Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2034 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setLong().

02035   {
02036     checkIfClosed();
02037 
02038     if (inserting)
02039       insertStatement.setLong(columnIndex, x);
02040     else
02041     {
02042       checkUpdateFlagAndPrepareUpdateIfNeeded();
02043       updateStatement.setLong(columnIndex, x);
02044     }
02045 
02046     tempRow[columnIndex - 1] = new Long(x);
02047   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateNull String  columnName  )  throws SQLException
 

JDBC 2.0 Update a column with a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
Exceptions:
SQLException if a database-access error occurs

Definition at line 2390 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02391   {
02392     this.updateNull(findColumn(columnName));
02393   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateNull int  columnIndex  )  throws SQLException
 

JDBC 2.0 Give a nullable column a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Exceptions:
SQLException if a database-access error occurs

Definition at line 1906 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.fields, and org.objectweb.cjdbc.driver.PreparedStatement.setNull().

01907   {
01908     checkIfClosed();
01909 
01910     if (inserting)
01911       insertStatement
01912           .setNull(columnIndex, fields[columnIndex - 1].getSqlType());
01913     else
01914     {
01915       checkUpdateFlagAndPrepareUpdateIfNeeded();
01916       updateStatement
01917           .setNull(columnIndex, fields[columnIndex - 1].getSqlType());
01918     }
01919 
01920     tempRow[columnIndex - 1] = null;
01921   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateObject String  columnName,
Object  x
throws SQLException
 

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2674 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02675   {
02676     this.updateObject(findColumn(columnName), x);
02677   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateObject String  columnName,
Object  x,
int  scale
throws SQLException
 

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.
Exceptions:
SQLException if a database-access error occurs

Definition at line 2658 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02660   {
02661     this.updateObject(findColumn(columnName), x, scale);
02662   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateObject int  columnIndex,
Object  x
throws SQLException
 

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2365 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setObject().

02366   {
02367     checkIfClosed();
02368 
02369     if (inserting)
02370       insertStatement.setObject(columnIndex, x);
02371     else
02372     {
02373       checkUpdateFlagAndPrepareUpdateIfNeeded();
02374       updateStatement.setObject(columnIndex, x);
02375     }
02376 
02377     tempRow[columnIndex - 1] = x;
02378   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateObject int  columnIndex,
Object  x,
int  scale
throws SQLException
 

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.
Exceptions:
SQLException if a database-access error occurs

Definition at line 2339 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setObject().

02341   {
02342     checkIfClosed();
02343 
02344     if (inserting)
02345       insertStatement.setObject(columnIndex, x, scale);
02346     else
02347     {
02348       checkUpdateFlagAndPrepareUpdateIfNeeded();
02349       updateStatement.setObject(columnIndex, x, scale);
02350     }
02351 
02352     tempRow[columnIndex - 1] = x;
02353   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateRef String  columnName,
java.sql.Ref  x
throws SQLException
 

Updates the designated column with a java.sql.Ref 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.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3539 of file DriverResultSet.java.

03540   {
03541     throw new NotImplementedException("updateRef");
03542   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateRef int  columnIndex,
java.sql.Ref  x
throws SQLException
 

Updates the designated column with a java.sql.Ref 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.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database access error occurs
Since:
JDK 1.4

Definition at line 3522 of file DriverResultSet.java.

03523   {
03524     throw new NotImplementedException("updateRef");
03525   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateRow  )  throws SQLException
 

JDBC 2.0 Update the underlying database with the new contents of the current row. Cannot be called when on the insert row.

Exceptions:
SQLException if a database-access error occurs, or if called when on the insert row

Definition at line 2723 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.DriverResultSet.currentRow, org.objectweb.cjdbc.driver.DriverResultSet.data, org.objectweb.cjdbc.driver.PreparedStatement.executeUpdate(), org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), org.objectweb.cjdbc.driver.DriverResultSet.nbOfColumns, org.objectweb.cjdbc.driver.PreparedStatement.set(), and org.objectweb.cjdbc.driver.PreparedStatement.setObject().

02724   {
02725     checkIfClosed();
02726 
02727     if (inserting)
02728       throw new SQLException("updateRow cannot be called "
02729           + "when the cursor is on the insert row");
02730 
02731     if (!updating)
02732       return;
02733 
02734     // Add primary key info from current row
02735     for (int i = 0; i < primaryKeyColumns.length; ++i)
02736       updateStatement.setObject(nbOfColumns + i + 1, ((Object[]) data
02737           .get(currentRow))[findColumn(primaryKeyColumns[i]) - 1]);
02738 
02739     // Update row in underlying database
02740     try
02741     {
02742       updateStatement.executeUpdate();
02743     }
02744     finally
02745     {
02746       // Clean up
02747       updateStatement.clearParameters();
02748     }
02749 
02750     // Update row in this ResultSet
02751     data.set(currentRow, tempRow);
02752 
02753     // Clean up
02754     tempRow = null;
02755     updating = false;
02756   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateShort String  columnName,
short  x
throws SQLException
 

JDBC 2.0 Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2435 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02436   {
02437     this.updateShort(findColumn(columnName), x);
02438   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateShort int  columnIndex,
short  x
throws SQLException
 

JDBC 2.0 Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 1984 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setShort().

01985   {
01986     checkIfClosed();
01987 
01988     if (inserting)
01989       insertStatement.setShort(columnIndex, x);
01990     else
01991     {
01992       checkUpdateFlagAndPrepareUpdateIfNeeded();
01993       updateStatement.setShort(columnIndex, x);
01994     }
01995 
01996     tempRow[columnIndex - 1] = new Short(x);
01997   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateString String  columnName,
String  x
throws SQLException
 

JDBC 2.0 Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2526 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02527   {
02528     this.updateString(findColumn(columnName), x);
02529   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateString int  columnIndex,
String  x
throws SQLException
 

JDBC 2.0 Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2135 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setString().

02136   {
02137     checkIfClosed();
02138 
02139     if (inserting)
02140       insertStatement.setString(columnIndex, x);
02141     else
02142     {
02143       checkUpdateFlagAndPrepareUpdateIfNeeded();
02144       updateStatement.setString(columnIndex, x);
02145     }
02146 
02147     tempRow[columnIndex - 1] = x;
02148   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateTime String  columnName,
java.sql.Time  x
throws SQLException
 

JDBC 2.0 Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2572 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02574   {
02575     this.updateTime(findColumn(columnName), x);
02576   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateTime int  columnIndex,
java.sql.Time  x
throws SQLException
 

JDBC 2.0 Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2210 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setTime().

02211   {
02212     checkIfClosed();
02213 
02214     if (inserting)
02215       insertStatement.setTime(columnIndex, x);
02216     else
02217     {
02218       checkUpdateFlagAndPrepareUpdateIfNeeded();
02219       updateStatement.setTime(columnIndex, x);
02220     }
02221 
02222     tempRow[columnIndex - 1] = x;
02223   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateTimestamp String  columnName,
java.sql.Timestamp  x
throws SQLException
 

JDBC 2.0 Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnName the name of the column
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2588 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

02590   {
02591     this.updateTimestamp(findColumn(columnName), x);
02592   }

void org.objectweb.cjdbc.driver.DriverResultSet.updateTimestamp int  columnIndex,
java.sql.Timestamp  x
throws SQLException
 

JDBC 2.0 Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
columnIndex the first column is 1, the second is 2, ...
x the new column value
Exceptions:
SQLException if a database-access error occurs

Definition at line 2235 of file DriverResultSet.java.

References org.objectweb.cjdbc.driver.PreparedStatement.setTimestamp().

02237   {
02238     checkIfClosed();
02239 
02240     if (inserting)
02241       insertStatement.setTimestamp(columnIndex, x);
02242     else
02243     {
02244       checkUpdateFlagAndPrepareUpdateIfNeeded();
02245       updateStatement.setTimestamp(columnIndex, x);
02246     }
02247 
02248     tempRow[columnIndex - 1] = x;
02249   }

boolean org.objectweb.cjdbc.driver.DriverResultSet.wasNull  )  throws SQLException
 

A column may have the value of SQL NULL; wasNull() reports whether the last column read had this special value. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to find if the value was SQL NULL

Returns:
true if the last column read was SQL NULL
Exceptions:
SQLException if a database access error occurred

Definition at line 3001 of file DriverResultSet.java.

03002   {
03003     return wasNullFlag;
03004   }


Member Data Documentation

transient Hashtable org.objectweb.cjdbc.driver.DriverResultSet.columnNameToIndex = null [protected]
 

column name -> index in ResultSet data array

Definition at line 125 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

int org.objectweb.cjdbc.driver.DriverResultSet.currentRow = -1 [protected]
 

Cursor to current row

Definition at line 104 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute(), org.objectweb.cjdbc.driver.DriverResultSet.afterLast(), org.objectweb.cjdbc.driver.DriverResultSet.beforeFirst(), org.objectweb.cjdbc.driver.DriverResultSet.deleteRow(), org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet(), org.objectweb.cjdbc.driver.DriverResultSet.first(), org.objectweb.cjdbc.driver.DriverResultSet.getArray(), org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal(), org.objectweb.cjdbc.driver.DriverResultSet.getBlob(), org.objectweb.cjdbc.driver.DriverResultSet.getBoolean(), org.objectweb.cjdbc.driver.DriverResultSet.getByte(), org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.DriverResultSet.getClob(), org.objectweb.cjdbc.driver.DriverResultSet.getDate(), org.objectweb.cjdbc.driver.DriverResultSet.getDouble(), org.objectweb.cjdbc.driver.DriverResultSet.getFloat(), org.objectweb.cjdbc.driver.DriverResultSet.getInt(), org.objectweb.cjdbc.driver.DriverResultSet.getLong(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), org.objectweb.cjdbc.driver.DriverResultSet.getRow(), org.objectweb.cjdbc.driver.DriverResultSet.getShort(), org.objectweb.cjdbc.driver.DriverResultSet.getString(), org.objectweb.cjdbc.driver.DriverResultSet.getTime(), org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp(), org.objectweb.cjdbc.driver.DriverResultSet.isAfterLast(), org.objectweb.cjdbc.driver.DriverResultSet.isBeforeFirst(), org.objectweb.cjdbc.driver.DriverResultSet.isFirst(), org.objectweb.cjdbc.driver.DriverResultSet.isLast(), org.objectweb.cjdbc.driver.DriverResultSet.last(), org.objectweb.cjdbc.driver.DriverResultSet.next(), org.objectweb.cjdbc.driver.DriverResultSet.prev(), org.objectweb.cjdbc.driver.DriverResultSet.refreshRow(), org.objectweb.cjdbc.driver.DriverResultSet.relative(), org.objectweb.cjdbc.driver.DriverResultSet.toString(), and org.objectweb.cjdbc.driver.DriverResultSet.updateRow().

ArrayList org.objectweb.cjdbc.driver.DriverResultSet.data [protected]
 

The results

Definition at line 110 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.deleteRow(), org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet(), org.objectweb.cjdbc.driver.DriverResultSet.getArray(), org.objectweb.cjdbc.driver.DriverResultSet.getBigDecimal(), org.objectweb.cjdbc.driver.DriverResultSet.getBlob(), org.objectweb.cjdbc.driver.DriverResultSet.getBoolean(), org.objectweb.cjdbc.driver.DriverResultSet.getByte(), org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.DriverResultSet.getCharacterStream(), org.objectweb.cjdbc.driver.DriverResultSet.getClob(), org.objectweb.cjdbc.driver.DriverResultSet.getDate(), org.objectweb.cjdbc.driver.DriverResultSet.getDouble(), org.objectweb.cjdbc.driver.DriverResultSet.getFloat(), org.objectweb.cjdbc.driver.DriverResultSet.getInt(), org.objectweb.cjdbc.driver.DriverResultSet.getLong(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), org.objectweb.cjdbc.driver.DriverResultSet.getShort(), org.objectweb.cjdbc.driver.DriverResultSet.getString(), org.objectweb.cjdbc.driver.DriverResultSet.getTime(), org.objectweb.cjdbc.driver.DriverResultSet.getTimestamp(), org.objectweb.cjdbc.driver.DriverResultSet.insertRow(), org.objectweb.cjdbc.driver.DriverResultSet.next(), org.objectweb.cjdbc.driver.DriverResultSet.refreshRow(), org.objectweb.cjdbc.driver.DriverResultSet.setData(), org.objectweb.cjdbc.driver.DriverResultSet.updateBinaryStream(), org.objectweb.cjdbc.driver.DriverResultSet.updateCharacterStream(), and org.objectweb.cjdbc.driver.DriverResultSet.updateRow().

int org.objectweb.cjdbc.driver.DriverResultSet.fetchDirection = FETCH_FORWARD [protected]
 

The fetch direction (not used yet)

Definition at line 114 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.setFetchDirection().

int org.objectweb.cjdbc.driver.DriverResultSet.fetchSize = 0 [protected]
 

The fetch size

Definition at line 116 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.next(), org.objectweb.cjdbc.driver.DriverResultSet.setFetchSize(), and org.objectweb.cjdbc.driver.DriverResultSet.setStatement().

Field [] org.objectweb.cjdbc.driver.DriverResultSet.fields [protected]
 

The fields

Definition at line 121 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.findColumn(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnClassName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnDisplaySize(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnLabel(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnType(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnTypeName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getPrecision(), org.objectweb.cjdbc.driver.ResultSetMetaData.getScale(), org.objectweb.cjdbc.driver.ResultSetMetaData.getSchemaName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getTableName(), org.objectweb.cjdbc.driver.ResultSetMetaData.isAutoIncrement(), org.objectweb.cjdbc.driver.ResultSetMetaData.isCaseSensitive(), org.objectweb.cjdbc.driver.ResultSetMetaData.isCurrency(), org.objectweb.cjdbc.driver.ResultSetMetaData.isDefinitelyWritable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isNullable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isReadOnly(), org.objectweb.cjdbc.driver.ResultSetMetaData.isSearchable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isSigned(), org.objectweb.cjdbc.driver.ResultSetMetaData.isWritable(), and org.objectweb.cjdbc.driver.DriverResultSet.updateNull().

transient Hashtable org.objectweb.cjdbc.driver.DriverResultSet.fullColumnNameToIndex = null [protected]
 

full column name -> index in ResultSet data array

Definition at line 127 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.findColumn().

int org.objectweb.cjdbc.driver.DriverResultSet.nbOfColumns = -1 [protected]
 

Number of columns

Definition at line 108 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet(), org.objectweb.cjdbc.driver.ResultSetMetaData.getCatalogName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnClassName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnCount(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnDisplaySize(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnLabel(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnType(), org.objectweb.cjdbc.driver.ResultSetMetaData.getColumnTypeName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getPrecision(), org.objectweb.cjdbc.driver.ResultSetMetaData.getScale(), org.objectweb.cjdbc.driver.ResultSetMetaData.getSchemaName(), org.objectweb.cjdbc.driver.ResultSetMetaData.getTableName(), org.objectweb.cjdbc.driver.ResultSetMetaData.isAutoIncrement(), org.objectweb.cjdbc.driver.ResultSetMetaData.isCaseSensitive(), org.objectweb.cjdbc.driver.ResultSetMetaData.isCurrency(), org.objectweb.cjdbc.driver.ResultSetMetaData.isDefinitelyWritable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isNullable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isReadOnly(), org.objectweb.cjdbc.driver.ResultSetMetaData.isSearchable(), org.objectweb.cjdbc.driver.ResultSetMetaData.isSigned(), org.objectweb.cjdbc.driver.ResultSetMetaData.isWritable(), and org.objectweb.cjdbc.driver.DriverResultSet.updateRow().

int org.objectweb.cjdbc.driver.DriverResultSet.nbOfRows = -1 [protected]
 

Number of rows

Definition at line 106 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.absolute(), org.objectweb.cjdbc.driver.DriverResultSet.afterLast(), org.objectweb.cjdbc.driver.DriverResultSet.deleteRow(), org.objectweb.cjdbc.driver.DriverResultSet.DriverResultSet(), org.objectweb.cjdbc.driver.DriverResultSet.first(), org.objectweb.cjdbc.driver.DriverResultSet.getRow(), org.objectweb.cjdbc.driver.DriverResultSet.insertRow(), org.objectweb.cjdbc.driver.DriverResultSet.isAfterLast(), org.objectweb.cjdbc.driver.DriverResultSet.isBeforeFirst(), org.objectweb.cjdbc.driver.DriverResultSet.isFirst(), org.objectweb.cjdbc.driver.DriverResultSet.isLast(), org.objectweb.cjdbc.driver.DriverResultSet.last(), org.objectweb.cjdbc.driver.DriverResultSet.next(), org.objectweb.cjdbc.driver.DriverResultSet.relative(), and org.objectweb.cjdbc.driver.DriverResultSet.toString().

transient Statement org.objectweb.cjdbc.driver.DriverResultSet.owningStatement [protected]
 

Statement corresponding to this ResultSet

Definition at line 136 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.close(), org.objectweb.cjdbc.driver.DriverResultSet.getBoolean(), org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), org.objectweb.cjdbc.driver.DriverResultSet.next(), and org.objectweb.cjdbc.driver.DriverResultSet.setStatement().

int org.objectweb.cjdbc.driver.DriverResultSet.resultSetConcurrency = 0 [protected]
 

Concurrency for this ResultSet

Definition at line 132 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.setStatement().

int org.objectweb.cjdbc.driver.DriverResultSet.resultSetType = 0 [protected]
 

Type of ResultSet

Definition at line 130 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.setStatement().

SQLWarning org.objectweb.cjdbc.driver.DriverResultSet.warnings = null [protected]
 

the warning chain

Definition at line 134 of file DriverResultSet.java.

Referenced by org.objectweb.cjdbc.driver.DriverResultSet.clearWarnings().

boolean org.objectweb.cjdbc.driver.DriverResultSet.wasNullFlag = false [protected]
 

for wasNull()

Definition at line 123 of file DriverResultSet.java.


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:05:01 2005 for C-JDBC by  doxygen 1.3.9.1