com.uwyn.rife.database
Class DbResultSet

java.lang.Object
  extended by com.uwyn.rife.database.DbResultSet
All Implemented Interfaces:
Cloneable, ResultSet, Wrapper
Direct Known Subclasses:
DbResultSet30, DbResultSet40

public abstract class DbResultSet
extends Object
implements ResultSet, Cloneable


Field Summary
protected  boolean mFirstRowSkew
           
protected  boolean mHasResultRows
           
protected  ResultSet mResultSet
           
protected  DbStatement mStatement
           
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Method Summary
 boolean absolute(int row)
           
 void afterLast()
           
 void beforeFirst()
           
 void cancelRowUpdates()
           
 void clearWarnings()
           
 Object clone()
          Simply clones the instance with the default clone method.
 void close()
           
 void deleteRow()
           
 int findColumn(String columnName)
           
 boolean first()
           
 Array getArray(int i)
           
 Array getArray(String colName)
           
 InputStream getAsciiStream(int columnIndex)
           
 InputStream getAsciiStream(String columnName)
           
 BigDecimal getBigDecimal(int columnIndex)
           
 BigDecimal getBigDecimal(int columnIndex, int scale)
           
 BigDecimal getBigDecimal(String columnName)
           
 BigDecimal getBigDecimal(String columnName, int scale)
           
 InputStream getBinaryStream(int columnIndex)
           
 InputStream getBinaryStream(String columnName)
           
 Blob getBlob(int i)
           
 Blob getBlob(String colName)
           
 boolean getBoolean(int columnIndex)
           
 boolean getBoolean(String columnName)
           
 byte getByte(int columnIndex)
           
 byte getByte(String columnName)
           
 byte[] getBytes(int columnIndex)
           
 byte[] getBytes(String columnName)
           
 Reader getCharacterStream(int columnIndex)
           
 Reader getCharacterStream(String columnName)
           
 Clob getClob(int i)
           
 Clob getClob(String colName)
           
 int getConcurrency()
           
 String getCursorName()
           
 Date getDate(int columnIndex)
           
 Date getDate(int columnIndex, Calendar cal)
           
 Date getDate(String columnName)
           
 Date getDate(String columnName, Calendar cal)
           
 double getDouble(int columnIndex)
           
 double getDouble(String columnName)
           
 int getFetchDirection()
           
 int getFetchSize()
           
 InputStream getFirstAsciiStream()
          Retrieves the first field of the first row of this DbResultSet object as an ascii stream.
 BigDecimal getFirstBigDecimal()
          Retrieves the first field of the first row of this DbResultSet object as a big decimal.
 InputStream getFirstBinaryStream()
          Retrieves the first field of the first row of this DbResultSet object as a binary stream.
 boolean getFirstBoolean()
          Retrieves the first field of the first row of this DbResultSet object as a boolean.
 byte getFirstByte()
          Retrieves the first field of the first row of this DbResultSet object as a byte.
 byte[] getFirstBytes()
          Retrieves the first field of the first row of this DbResultSet object as an array of bytes.
 Reader getFirstCharacterStream()
          Retrieves the first field of the first row of this DbResultSet object as a character stream.
 Date getFirstDate()
          Retrieves the first field of the first row of this DbResultSet object as a sql date.
 Date getFirstDate(Calendar cal)
          Retrieves the first field of the first row of this DbResultSet object as a sql date.
 double getFirstDouble()
          Retrieves the first field of the first row of this DbResultSet object as a double.
 float getFirstFloat()
          Retrieves the first field of the first row of this DbResultSet object as a float.
 int getFirstInt()
          Retrieves the first field of the first row of this DbResultSet object as an integer.
 long getFirstLong()
          Retrieves the first field of the first row of this DbResultSet object as a long.
 short getFirstShort()
          Retrieves the first field of the first row of this DbResultSet object as a short.
 String getFirstString()
          Retrieves the first field of the first row of this DbResultSet object as a string.
 Time getFirstTime()
          Retrieves the first field of the first row of this DbResultSet object as a sql time.
 Time getFirstTime(Calendar cal)
          Retrieves the first field of the first row of this DbResultSet object as a sql time.
 Timestamp getFirstTimestamp()
          Retrieves the first field of the first row of this DbResultSet object as a sql timestamo.
 Timestamp getFirstTimestamp(Calendar cal)
          Retrieves the first field of the first row of this DbResultSet object as a sql timestamp.
 float getFloat(int columnIndex)
           
 float getFloat(String columnName)
           
 int getInt(int columnIndex)
           
 int getInt(String columnName)
           
 long getLong(int columnIndex)
           
 long getLong(String columnName)
           
 ResultSetMetaData getMetaData()
           
 Object getObject(int columnIndex)
           
 Object getObject(int i, Map map)
           
 Object getObject(String columnName)
           
 Object getObject(String colName, Map map)
           
 Ref getRef(int i)
           
 Ref getRef(String colName)
           
 int getRow()
           
 short getShort(int columnIndex)
           
 short getShort(String columnName)
           
 Statement getStatement()
           
 String getString(int columnIndex)
           
 String getString(String columnName)
           
 Time getTime(int columnIndex)
           
 Time getTime(int columnIndex, Calendar cal)
           
 Time getTime(String columnName)
           
 Time getTime(String columnName, Calendar cal)
           
 Timestamp getTimestamp(int columnIndex)
           
 Timestamp getTimestamp(int columnIndex, Calendar cal)
           
 Timestamp getTimestamp(String columnName)
           
 Timestamp getTimestamp(String columnName, Calendar cal)
           
 int getType()
           
 InputStream getUnicodeStream(int columnIndex)
           
 InputStream getUnicodeStream(String columnName)
           
 URL getURL(int columnIndex)
           
 URL getURL(String columnName)
           
 SQLWarning getWarnings()
           
 boolean hasResultRows()
          Determines if there are rows available in the ResultSet object that was returned by an execute method.
 void insertRow()
           
 boolean isAfterLast()
           
 boolean isBeforeFirst()
           
 boolean isFirst()
           
 boolean isLast()
           
 boolean last()
           
 void moveToCurrentRow()
           
 void moveToInsertRow()
           
 boolean next()
           
 boolean previous()
           
 void refreshRow()
           
 boolean relative(int rows)
           
 boolean rowDeleted()
           
 boolean rowInserted()
           
 boolean rowUpdated()
           
 void setFetchDirection(int direction)
           
 void setFetchSize(int rows)
           
 void updateArray(int columnIndex, Array x)
           
 void updateArray(String columnName, Array x)
           
 void updateAsciiStream(int columnIndex, InputStream x, int length)
           
 void updateAsciiStream(String columnName, InputStream x, int length)
           
 void updateBigDecimal(int columnIndex, BigDecimal x)
           
 void updateBigDecimal(String columnName, BigDecimal x)
           
 void updateBinaryStream(int columnIndex, InputStream x, int length)
           
 void updateBinaryStream(String columnName, InputStream x, int length)
           
 void updateBlob(int columnIndex, Blob x)
           
 void updateBlob(String columnName, Blob x)
           
 void updateBoolean(int columnIndex, boolean x)
           
 void updateBoolean(String columnName, boolean x)
           
 void updateByte(int columnIndex, byte x)
           
 void updateByte(String columnName, byte x)
           
 void updateBytes(int columnIndex, byte[] x)
           
 void updateBytes(String columnName, byte[] x)
           
 void updateCharacterStream(int columnIndex, Reader x, int length)
           
 void updateCharacterStream(String columnName, Reader reader, int length)
           
 void updateClob(int columnIndex, Clob x)
           
 void updateClob(String columnName, Clob x)
           
 void updateDate(int columnIndex, Date x)
           
 void updateDate(String columnName, Date x)
           
 void updateDouble(int columnIndex, double x)
           
 void updateDouble(String columnName, double x)
           
 void updateFloat(int columnIndex, float x)
           
 void updateFloat(String columnName, float x)
           
 void updateInt(int columnIndex, int x)
           
 void updateInt(String columnName, int x)
           
 void updateLong(int columnIndex, long x)
           
 void updateLong(String columnName, long x)
           
 void updateNull(int columnIndex)
           
 void updateNull(String columnName)
           
 void updateObject(int columnIndex, Object x)
           
 void updateObject(int columnIndex, Object x, int scale)
           
 void updateObject(String columnName, Object x)
           
 void updateObject(String columnName, Object x, int scale)
           
 void updateRef(int columnIndex, Ref x)
           
 void updateRef(String columnName, Ref x)
           
 void updateRow()
           
 void updateShort(int columnIndex, short x)
           
 void updateShort(String columnName, short x)
           
 void updateString(int columnIndex, String x)
           
 void updateString(String columnName, String x)
           
 void updateTime(int columnIndex, Time x)
           
 void updateTime(String columnName, Time x)
           
 void updateTimestamp(int columnIndex, Timestamp x)
           
 void updateTimestamp(String columnName, Timestamp x)
           
 boolean wasNull()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

mStatement

protected DbStatement mStatement

mResultSet

protected ResultSet mResultSet

mFirstRowSkew

protected boolean mFirstRowSkew

mHasResultRows

protected boolean mHasResultRows
Method Detail

next

public final boolean next()
                   throws SQLException
Specified by:
next in interface ResultSet
Throws:
SQLException

previous

public final boolean previous()
                       throws SQLException
Specified by:
previous in interface ResultSet
Throws:
SQLException

absolute

public final boolean absolute(int row)
                       throws SQLException
Specified by:
absolute in interface ResultSet
Throws:
SQLException

relative

public final boolean relative(int rows)
                       throws SQLException
Specified by:
relative in interface ResultSet
Throws:
SQLException

beforeFirst

public final void beforeFirst()
                       throws SQLException
Specified by:
beforeFirst in interface ResultSet
Throws:
SQLException

first

public final boolean first()
                    throws SQLException
Specified by:
first in interface ResultSet
Throws:
SQLException

last

public final boolean last()
                   throws SQLException
Specified by:
last in interface ResultSet
Throws:
SQLException

afterLast

public final void afterLast()
                     throws SQLException
Specified by:
afterLast in interface ResultSet
Throws:
SQLException

moveToInsertRow

public final void moveToInsertRow()
                           throws SQLException
Specified by:
moveToInsertRow in interface ResultSet
Throws:
SQLException

moveToCurrentRow

public final void moveToCurrentRow()
                            throws SQLException
Specified by:
moveToCurrentRow in interface ResultSet
Throws:
SQLException

isBeforeFirst

public final boolean isBeforeFirst()
                            throws SQLException
Specified by:
isBeforeFirst in interface ResultSet
Throws:
SQLException

isFirst

public final boolean isFirst()
                      throws SQLException
Specified by:
isFirst in interface ResultSet
Throws:
SQLException

isLast

public final boolean isLast()
                     throws SQLException
Specified by:
isLast in interface ResultSet
Throws:
SQLException

isAfterLast

public final boolean isAfterLast()
                          throws SQLException
Specified by:
isAfterLast in interface ResultSet
Throws:
SQLException

getRow

public final int getRow()
                 throws SQLException
Specified by:
getRow in interface ResultSet
Throws:
SQLException

refreshRow

public final void refreshRow()
                      throws SQLException
Specified by:
refreshRow in interface ResultSet
Throws:
SQLException

insertRow

public final void insertRow()
                     throws SQLException
Specified by:
insertRow in interface ResultSet
Throws:
SQLException

updateRow

public final void updateRow()
                     throws SQLException
Specified by:
updateRow in interface ResultSet
Throws:
SQLException

deleteRow

public final void deleteRow()
                     throws SQLException
Specified by:
deleteRow in interface ResultSet
Throws:
SQLException

rowInserted

public final boolean rowInserted()
                          throws SQLException
Specified by:
rowInserted in interface ResultSet
Throws:
SQLException

rowUpdated

public final boolean rowUpdated()
                         throws SQLException
Specified by:
rowUpdated in interface ResultSet
Throws:
SQLException

rowDeleted

public final boolean rowDeleted()
                         throws SQLException
Specified by:
rowDeleted in interface ResultSet
Throws:
SQLException

close

public final void close()
                 throws SQLException
Specified by:
close in interface ResultSet
Throws:
SQLException

wasNull

public final boolean wasNull()
                      throws SQLException
Specified by:
wasNull in interface ResultSet
Throws:
SQLException

setFetchDirection

public final void setFetchDirection(int direction)
                             throws SQLException
Specified by:
setFetchDirection in interface ResultSet
Throws:
SQLException

setFetchSize

public final void setFetchSize(int rows)
                        throws SQLException
Specified by:
setFetchSize in interface ResultSet
Throws:
SQLException

cancelRowUpdates

public final void cancelRowUpdates()
                            throws SQLException
Specified by:
cancelRowUpdates in interface ResultSet
Throws:
SQLException

getMetaData

public final ResultSetMetaData getMetaData()
                                    throws SQLException
Specified by:
getMetaData in interface ResultSet
Throws:
SQLException

getConcurrency

public final int getConcurrency()
                         throws SQLException
Specified by:
getConcurrency in interface ResultSet
Throws:
SQLException

getFetchDirection

public final int getFetchDirection()
                            throws SQLException
Specified by:
getFetchDirection in interface ResultSet
Throws:
SQLException

getFetchSize

public final int getFetchSize()
                       throws SQLException
Specified by:
getFetchSize in interface ResultSet
Throws:
SQLException

clearWarnings

public final void clearWarnings()
                         throws SQLException
Specified by:
clearWarnings in interface ResultSet
Throws:
SQLException

getWarnings

public final SQLWarning getWarnings()
                             throws SQLException
Specified by:
getWarnings in interface ResultSet
Throws:
SQLException

getCursorName

public final String getCursorName()
                           throws SQLException
Specified by:
getCursorName in interface ResultSet
Throws:
SQLException

getStatement

public final Statement getStatement()
                             throws SQLException
Specified by:
getStatement in interface ResultSet
Throws:
SQLException

getType

public final int getType()
                  throws SQLException
Specified by:
getType in interface ResultSet
Throws:
SQLException

findColumn

public final int findColumn(String columnName)
                     throws SQLException
Specified by:
findColumn in interface ResultSet
Throws:
SQLException

hasResultRows

public boolean hasResultRows()
                      throws DatabaseException
Determines if there are rows available in the ResultSet object that was returned by an execute method.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
true if there are result rows available; or

false if no ResultSet object was available or it didn't have any result rows.

Throws:
DatabaseException - if a database access error occurs
Since:
1.0

getFirstString

public String getFirstString()
                      throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a string. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first String object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstBoolean

public boolean getFirstBoolean()
                        throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a boolean. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first boolean object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstByte

public byte getFirstByte()
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a byte. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first byte object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstShort

public short getFirstShort()
                    throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a short. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first short object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstInt

public int getFirstInt()
                throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as an integer. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first int object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstLong

public long getFirstLong()
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a long. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first long object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstFloat

public float getFirstFloat()
                    throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a float. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first float object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstDouble

public double getFirstDouble()
                      throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a double. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first String object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstBigDecimal

public BigDecimal getFirstBigDecimal()
                              throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a big decimal. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first BigDecimal object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstBytes

public byte[] getFirstBytes()
                     throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as an array of bytes. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first byte[] object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstDate

public Date getFirstDate()
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql date. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.sql.Date object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstDate

public Date getFirstDate(Calendar cal)
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql date. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Parameters:
cal - the java.util.Calendar object to use in constructing the date
Returns:
the first java.sql.Date object in the resultsn; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0

getFirstTime

public Time getFirstTime()
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql time. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.sql.Time object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstTime

public Time getFirstTime(Calendar cal)
                  throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql time. This method works both when the next method has never been called or once been called. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Parameters:
cal - the java.util.Calendar object to use in constructing the time
Returns:
the first java.sql.Time object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstTimestamp

public Timestamp getFirstTimestamp()
                            throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql timestamo. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.sql.Timestamp object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstTimestamp

public Timestamp getFirstTimestamp(Calendar cal)
                            throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a sql timestamp. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information. This method works both when the next method has never been called or once been called.

It is perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Parameters:
cal - the java.util.Calendar object to use in constructing the date
Returns:
the first java.sql.Timestamp object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstAsciiStream

public InputStream getFirstAsciiStream()
                                throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as an ascii stream. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.io.InputStream object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstCharacterStream

public Reader getFirstCharacterStream()
                               throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a character stream. This method works both when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.io.Reader object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getFirstBinaryStream

public InputStream getFirstBinaryStream()
                                 throws DatabaseException
Retrieves the first field of the first row of this DbResultSet object as a binary stream. This method works hiboth when the next method has never been called or once been called.

Therefore, it's thus perfectly usable after the hasResultRows method or alone where catching the MissingResultsException is used to indicate the absence of results.

If an exception is thrown, the related DbStatement is automatically closed and an ongoing transaction will be automatically rolled back if it belongs to the executing thread.

Returns:
the first java.io.InputStream object in the results.
Throws:
DatabaseException - if a database access error occurs. If there are no results available the thrown exception is MissingResultsException.
Since:
1.0
See Also:
hasResultRows()

getString

public final String getString(int columnIndex)
                       throws SQLException
Specified by:
getString in interface ResultSet
Throws:
SQLException

getString

public final String getString(String columnName)
                       throws SQLException
Specified by:
getString in interface ResultSet
Throws:
SQLException

getBoolean

public final boolean getBoolean(int columnIndex)
                         throws SQLException
Specified by:
getBoolean in interface ResultSet
Throws:
SQLException

getBoolean

public final boolean getBoolean(String columnName)
                         throws SQLException
Specified by:
getBoolean in interface ResultSet
Throws:
SQLException

getByte

public final byte getByte(int columnIndex)
                   throws SQLException
Specified by:
getByte in interface ResultSet
Throws:
SQLException

getByte

public final byte getByte(String columnName)
                   throws SQLException
Specified by:
getByte in interface ResultSet
Throws:
SQLException

getShort

public final short getShort(int columnIndex)
                     throws SQLException
Specified by:
getShort in interface ResultSet
Throws:
SQLException

getShort

public final short getShort(String columnName)
                     throws SQLException
Specified by:
getShort in interface ResultSet
Throws:
SQLException

getInt

public final int getInt(int columnIndex)
                 throws SQLException
Specified by:
getInt in interface ResultSet
Throws:
SQLException

getInt

public final int getInt(String columnName)
                 throws SQLException
Specified by:
getInt in interface ResultSet
Throws:
SQLException

getLong

public final long getLong(int columnIndex)
                   throws SQLException
Specified by:
getLong in interface ResultSet
Throws:
SQLException

getLong

public final long getLong(String columnName)
                   throws SQLException
Specified by:
getLong in interface ResultSet
Throws:
SQLException

getFloat

public final float getFloat(int columnIndex)
                     throws SQLException
Specified by:
getFloat in interface ResultSet
Throws:
SQLException

getFloat

public final float getFloat(String columnName)
                     throws SQLException
Specified by:
getFloat in interface ResultSet
Throws:
SQLException

getDouble

public final double getDouble(int columnIndex)
                       throws SQLException
Specified by:
getDouble in interface ResultSet
Throws:
SQLException

getDouble

public final double getDouble(String columnName)
                       throws SQLException
Specified by:
getDouble in interface ResultSet
Throws:
SQLException

getBigDecimal

public final BigDecimal getBigDecimal(int columnIndex)
                               throws SQLException
Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public final BigDecimal getBigDecimal(String columnName)
                               throws SQLException
Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public final BigDecimal getBigDecimal(int columnIndex,
                                      int scale)
                               throws SQLException
Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public final BigDecimal getBigDecimal(String columnName,
                                      int scale)
                               throws SQLException
Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBytes

public final byte[] getBytes(int columnIndex)
                      throws SQLException
Specified by:
getBytes in interface ResultSet
Throws:
SQLException

getBytes

public final byte[] getBytes(String columnName)
                      throws SQLException
Specified by:
getBytes in interface ResultSet
Throws:
SQLException

getDate

public final Date getDate(int columnIndex)
                   throws SQLException
Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public final Date getDate(String columnName)
                   throws SQLException
Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public final Date getDate(int columnIndex,
                          Calendar cal)
                   throws SQLException
Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public final Date getDate(String columnName,
                          Calendar cal)
                   throws SQLException
Specified by:
getDate in interface ResultSet
Throws:
SQLException

getTime

public final Time getTime(int columnIndex)
                   throws SQLException
Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public final Time getTime(String columnName)
                   throws SQLException
Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public final Time getTime(int columnIndex,
                          Calendar cal)
                   throws SQLException
Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public final Time getTime(String columnName,
                          Calendar cal)
                   throws SQLException
Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTimestamp

public final Timestamp getTimestamp(int columnIndex)
                             throws SQLException
Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public final Timestamp getTimestamp(String columnName)
                             throws SQLException
Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public final Timestamp getTimestamp(int columnIndex,
                                    Calendar cal)
                             throws SQLException
Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public final Timestamp getTimestamp(String columnName,
                                    Calendar cal)
                             throws SQLException
Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getAsciiStream

public final InputStream getAsciiStream(int columnIndex)
                                 throws SQLException
Specified by:
getAsciiStream in interface ResultSet
Throws:
SQLException

getAsciiStream

public final InputStream getAsciiStream(String columnName)
                                 throws SQLException
Specified by:
getAsciiStream in interface ResultSet
Throws:
SQLException

getUnicodeStream

public final InputStream getUnicodeStream(int columnIndex)
                                   throws SQLException
Specified by:
getUnicodeStream in interface ResultSet
Throws:
SQLException

getUnicodeStream

public final InputStream getUnicodeStream(String columnName)
                                   throws SQLException
Specified by:
getUnicodeStream in interface ResultSet
Throws:
SQLException

getCharacterStream

public final Reader getCharacterStream(int columnIndex)
                                throws SQLException
Specified by:
getCharacterStream in interface ResultSet
Throws:
SQLException

getCharacterStream

public final Reader getCharacterStream(String columnName)
                                throws SQLException
Specified by:
getCharacterStream in interface ResultSet
Throws:
SQLException

getBinaryStream

public final InputStream getBinaryStream(int columnIndex)
                                  throws SQLException
Specified by:
getBinaryStream in interface ResultSet
Throws:
SQLException

getBinaryStream

public final InputStream getBinaryStream(String columnName)
                                  throws SQLException
Specified by:
getBinaryStream in interface ResultSet
Throws:
SQLException

getRef

public final Ref getRef(String colName)
                 throws SQLException
Specified by:
getRef in interface ResultSet
Throws:
SQLException

getRef

public final Ref getRef(int i)
                 throws SQLException
Specified by:
getRef in interface ResultSet
Throws:
SQLException

getObject

public final Object getObject(int columnIndex)
                       throws SQLException
Specified by:
getObject in interface ResultSet
Throws:
SQLException

getObject

public final Object getObject(String columnName)
                       throws SQLException
Specified by:
getObject in interface ResultSet
Throws:
SQLException

getObject

public final Object getObject(int i,
                              Map map)
                       throws SQLException
Specified by:
getObject in interface ResultSet
Throws:
SQLException

getObject

public final Object getObject(String colName,
                              Map map)
                       throws SQLException
Specified by:
getObject in interface ResultSet
Throws:
SQLException

getBlob

public final Blob getBlob(int i)
                   throws SQLException
Specified by:
getBlob in interface ResultSet
Throws:
SQLException

getBlob

public final Blob getBlob(String colName)
                   throws SQLException
Specified by:
getBlob in interface ResultSet
Throws:
SQLException

getClob

public final Clob getClob(int i)
                   throws SQLException
Specified by:
getClob in interface ResultSet
Throws:
SQLException

getClob

public final Clob getClob(String colName)
                   throws SQLException
Specified by:
getClob in interface ResultSet
Throws:
SQLException

getArray

public final Array getArray(String colName)
                     throws SQLException
Specified by:
getArray in interface ResultSet
Throws:
SQLException

getArray

public final Array getArray(int i)
                     throws SQLException
Specified by:
getArray in interface ResultSet
Throws:
SQLException

getURL

public final URL getURL(int columnIndex)
                 throws SQLException
Specified by:
getURL in interface ResultSet
Throws:
SQLException

getURL

public final URL getURL(String columnName)
                 throws SQLException
Specified by:
getURL in interface ResultSet
Throws:
SQLException

updateNull

public final void updateNull(int columnIndex)
                      throws SQLException
Specified by:
updateNull in interface ResultSet
Throws:
SQLException

updateNull

public final void updateNull(String columnName)
                      throws SQLException
Specified by:
updateNull in interface ResultSet
Throws:
SQLException

updateString

public final void updateString(int columnIndex,
                               String x)
                        throws SQLException
Specified by:
updateString in interface ResultSet
Throws:
SQLException

updateString

public final void updateString(String columnName,
                               String x)
                        throws SQLException
Specified by:
updateString in interface ResultSet
Throws:
SQLException

updateBoolean

public final void updateBoolean(int columnIndex,
                                boolean x)
                         throws SQLException
Specified by:
updateBoolean in interface ResultSet
Throws:
SQLException

updateBoolean

public final void updateBoolean(String columnName,
                                boolean x)
                         throws SQLException
Specified by:
updateBoolean in interface ResultSet
Throws:
SQLException

updateByte

public final void updateByte(int columnIndex,
                             byte x)
                      throws SQLException
Specified by:
updateByte in interface ResultSet
Throws:
SQLException

updateByte

public final void updateByte(String columnName,
                             byte x)
                      throws SQLException
Specified by:
updateByte in interface ResultSet
Throws:
SQLException

updateShort

public final void updateShort(int columnIndex,
                              short x)
                       throws SQLException
Specified by:
updateShort in interface ResultSet
Throws:
SQLException

updateShort

public final void updateShort(String columnName,
                              short x)
                       throws SQLException
Specified by:
updateShort in interface ResultSet
Throws:
SQLException

updateInt

public final void updateInt(int columnIndex,
                            int x)
                     throws SQLException
Specified by:
updateInt in interface ResultSet
Throws:
SQLException

updateInt

public final void updateInt(String columnName,
                            int x)
                     throws SQLException
Specified by:
updateInt in interface ResultSet
Throws:
SQLException

updateLong

public final void updateLong(int columnIndex,
                             long x)
                      throws SQLException
Specified by:
updateLong in interface ResultSet
Throws:
SQLException

updateLong

public final void updateLong(String columnName,
                             long x)
                      throws SQLException
Specified by:
updateLong in interface ResultSet
Throws:
SQLException

updateFloat

public final void updateFloat(int columnIndex,
                              float x)
                       throws SQLException
Specified by:
updateFloat in interface ResultSet
Throws:
SQLException

updateFloat

public final void updateFloat(String columnName,
                              float x)
                       throws SQLException
Specified by:
updateFloat in interface ResultSet
Throws:
SQLException

updateDouble

public final void updateDouble(int columnIndex,
                               double x)
                        throws SQLException
Specified by:
updateDouble in interface ResultSet
Throws:
SQLException

updateDouble

public final void updateDouble(String columnName,
                               double x)
                        throws SQLException
Specified by:
updateDouble in interface ResultSet
Throws:
SQLException

updateBigDecimal

public final void updateBigDecimal(int columnIndex,
                                   BigDecimal x)
                            throws SQLException
Specified by:
updateBigDecimal in interface ResultSet
Throws:
SQLException

updateBigDecimal

public final void updateBigDecimal(String columnName,
                                   BigDecimal x)
                            throws SQLException
Specified by:
updateBigDecimal in interface ResultSet
Throws:
SQLException

updateBytes

public final void updateBytes(int columnIndex,
                              byte[] x)
                       throws SQLException
Specified by:
updateBytes in interface ResultSet
Throws:
SQLException

updateBytes

public final void updateBytes(String columnName,
                              byte[] x)
                       throws SQLException
Specified by:
updateBytes in interface ResultSet
Throws:
SQLException

updateDate

public final void updateDate(int columnIndex,
                             Date x)
                      throws SQLException
Specified by:
updateDate in interface ResultSet
Throws:
SQLException

updateDate

public final void updateDate(String columnName,
                             Date x)
                      throws SQLException
Specified by:
updateDate in interface ResultSet
Throws:
SQLException

updateTime

public final void updateTime(int columnIndex,
                             Time x)
                      throws SQLException
Specified by:
updateTime in interface ResultSet
Throws:
SQLException

updateTime

public final void updateTime(String columnName,
                             Time x)
                      throws SQLException
Specified by:
updateTime in interface ResultSet
Throws:
SQLException

updateTimestamp

public final void updateTimestamp(int columnIndex,
                                  Timestamp x)
                           throws SQLException
Specified by:
updateTimestamp in interface ResultSet
Throws:
SQLException

updateTimestamp

public final void updateTimestamp(String columnName,
                                  Timestamp x)
                           throws SQLException
Specified by:
updateTimestamp in interface ResultSet
Throws:
SQLException

updateAsciiStream

public final void updateAsciiStream(int columnIndex,
                                    InputStream x,
                                    int length)
                             throws SQLException
Specified by:
updateAsciiStream in interface ResultSet
Throws:
SQLException

updateAsciiStream

public final void updateAsciiStream(String columnName,
                                    InputStream x,
                                    int length)
                             throws SQLException
Specified by:
updateAsciiStream in interface ResultSet
Throws:
SQLException

updateCharacterStream

public final void updateCharacterStream(int columnIndex,
                                        Reader x,
                                        int length)
                                 throws SQLException
Specified by:
updateCharacterStream in interface ResultSet
Throws:
SQLException

updateCharacterStream

public final void updateCharacterStream(String columnName,
                                        Reader reader,
                                        int length)
                                 throws SQLException
Specified by:
updateCharacterStream in interface ResultSet
Throws:
SQLException

updateBinaryStream

public final void updateBinaryStream(int columnIndex,
                                     InputStream x,
                                     int length)
                              throws SQLException
Specified by:
updateBinaryStream in interface ResultSet
Throws:
SQLException

updateBinaryStream

public final void updateBinaryStream(String columnName,
                                     InputStream x,
                                     int length)
                              throws SQLException
Specified by:
updateBinaryStream in interface ResultSet
Throws:
SQLException

updateRef

public final void updateRef(int columnIndex,
                            Ref x)
                     throws SQLException
Specified by:
updateRef in interface ResultSet
Throws:
SQLException

updateRef

public final void updateRef(String columnName,
                            Ref x)
                     throws SQLException
Specified by:
updateRef in interface ResultSet
Throws:
SQLException

updateObject

public final void updateObject(int columnIndex,
                               Object x)
                        throws SQLException
Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public final void updateObject(String columnName,
                               Object x)
                        throws SQLException
Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public final void updateObject(int columnIndex,
                               Object x,
                               int scale)
                        throws SQLException
Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public final void updateObject(String columnName,
                               Object x,
                               int scale)
                        throws SQLException
Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateBlob

public final void updateBlob(int columnIndex,
                             Blob x)
                      throws SQLException
Specified by:
updateBlob in interface ResultSet
Throws:
SQLException

updateBlob

public final void updateBlob(String columnName,
                             Blob x)
                      throws SQLException
Specified by:
updateBlob in interface ResultSet
Throws:
SQLException

updateClob

public final void updateClob(int columnIndex,
                             Clob x)
                      throws SQLException
Specified by:
updateClob in interface ResultSet
Throws:
SQLException

updateClob

public final void updateClob(String columnName,
                             Clob x)
                      throws SQLException
Specified by:
updateClob in interface ResultSet
Throws:
SQLException

updateArray

public final void updateArray(int columnIndex,
                              Array x)
                       throws SQLException
Specified by:
updateArray in interface ResultSet
Throws:
SQLException

updateArray

public final void updateArray(String columnName,
                              Array x)
                       throws SQLException
Specified by:
updateArray in interface ResultSet
Throws:
SQLException

clone

public Object clone()
Simply clones the instance with the default clone method. This creates a shallow copy of all fields and the clone will in fact just be another reference to the same underlying data. The independence of each cloned instance is consciously not respected since they rely on resources that can't be cloned.

Overrides:
clone in class Object
Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.