jxDBCon 0.9z

org.sourceforge.jxdbcon
Class AbstractResultSet

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.AbstractResultSet
All Implemented Interfaces:
ResultSet
Direct Known Subclasses:
AbstractResultSetRO, AbstractResultSetRW

public abstract class AbstractResultSet
extends Object
implements ResultSet

AbstractResultSet implements generics of the ResultSet interface. The get/update functions delegate to their corresponding calls in AbstractType.

Version:
$Revision: 1.13 $, $Date: 2002/04/24 21:06:02 $
Author:
Keve Müller

Field Summary
protected  int fetchDirection
          Fetch direction.
protected  int fetchSize
          Fetch size.
protected  boolean isClosed
          Closed flag.
protected  ConversionContext resContext
          The conversion context.
protected  Object resData
          The current row's data.
protected  AbstractType[] resTypes
          The column's types.
private  int resultSetType
          Scroll type.
 
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
 
Constructor Summary
protected AbstractResultSet(int fetchDirection, int resultSetType, ConversionContext resContext, AbstractType[] resTypes)
          Construct the ResultSet.
 
Method Summary
 void clearWarnings()
           
 void close()
           
 void finalize()
          Close the ResultSet, if it was left open.
 int findColumn(String columnName)
          Find a column by name.
 Array getArray(int columnIndex)
           
 Array getArray(String columnName)
           
 InputStream getAsciiStream(int columnIndex)
           
 InputStream getAsciiStream(String columnName)
           
 BigDecimal getBigDecimal(int columnIndex)
           
 BigDecimal getBigDecimal(String columnName)
           
 InputStream getBinaryStream(int columnIndex)
           
 InputStream getBinaryStream(String columnName)
           
 Blob getBlob(int columnIndex)
           
 Blob getBlob(String columnName)
           
 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 columnIndex)
           
 Clob getClob(String columnName)
           
 ConversionContext getContext()
           
 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()
           
 float getFloat(int columnIndex)
           
 float getFloat(String columnName)
           
 int getInt(int columnIndex)
           
 int getInt(String columnName)
           
 long getLong(int columnIndex)
           
 long getLong(String columnName)
           
 Object getObject(int columnIndex)
           
 Object getObject(int columnIndex, Map map)
           
 Object getObject(String columnName)
           
 Object getObject(String columnName, Map map)
           
 Ref getRef(int columnIndex)
           
 Ref getRef(String columnName)
           
 short getShort(int columnIndex)
           
 short getShort(String columnName)
           
 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()
           
 AbstractType getType(int columnIndex)
           
 URL getURL(int columnIndex)
           
 URL getURL(String columnName)
           
 SQLWarning getWarnings()
           
 void setFetchDirection(int direction)
           
 void setFetchSize(int rows)
           
 boolean wasNull()
          Return the wasNull flag.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, deleteRow, first, getBigDecimal, getBigDecimal, getConcurrency, getCursorName, getMetaData, getRow, getStatement, getUnicodeStream, getUnicodeStream, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp
 

Field Detail

fetchDirection

protected int fetchDirection
Fetch direction.


fetchSize

protected int fetchSize
Fetch size.


isClosed

protected boolean isClosed
Closed flag.


resContext

protected ConversionContext resContext
The conversion context.


resData

protected Object resData
The current row's data.


resTypes

protected AbstractType[] resTypes
The column's types.


resultSetType

private int resultSetType
Scroll type.

Constructor Detail

AbstractResultSet

protected AbstractResultSet(int fetchDirection,
                            int resultSetType,
                            ConversionContext resContext,
                            AbstractType[] resTypes)
Construct the ResultSet.

Method Detail

clearWarnings

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

close

public void close()
Specified by:
close in interface ResultSet

finalize

public final void finalize()
                    throws Throwable
Close the ResultSet, if it was left open.

Overrides:
finalize in class Object
Throwable
See Also:
close()

findColumn

public int findColumn(String columnName)
               throws SQLException
Find a column by name. Extending classes should override this method. This implementation iterates over the ResultSetMetaData object returned by getMetaData.

Specified by:
findColumn in interface ResultSet
SQLException

getArray

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

getArray

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

getAsciiStream

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

getAsciiStream

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

getBigDecimal

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

getBigDecimal

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

getBinaryStream

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

getBinaryStream

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

getBlob

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

getBlob

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

getBoolean

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

getBoolean

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

getByte

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

getByte

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

getBytes

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

getBytes

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

getCharacterStream

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

getCharacterStream

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

getClob

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

getClob

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

getContext

public final ConversionContext getContext()

getDate

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

getDate

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

getDate

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

getDate

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

getDouble

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

getDouble

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

getFetchDirection

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

getFetchSize

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

getFloat

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

getFloat

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

getInt

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

getInt

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

getLong

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

getLong

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

getObject

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

getObject

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

getObject

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

getObject

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

getRef

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

getRef

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

getShort

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

getShort

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

getString

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

getString

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

getTime

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

getTime

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

getTime

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

getTime

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

getTimestamp

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

getTimestamp

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

getTimestamp

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

getTimestamp

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

getType

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

getType

public final AbstractType getType(int columnIndex)

getURL

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

getURL

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

getWarnings

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

setFetchDirection

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

setFetchSize

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

wasNull

public final boolean wasNull()
                      throws SQLException
Return the wasNull flag.

Specified by:
wasNull in interface ResultSet
SQLException

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.