## org.eclipse.datatools.connectivity.oda.consumer.helper
Class OdaResultSet

    java.lang.Object
      org.eclipse.datatools.connectivity.oda.consumer.helper.OdaObject
          org.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
              org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSet

All Implemented Interfaces:
  IResultSet

Direct Known Subclasses:
  OdaRowSet

public class OdaResultSet
extends org.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
implements IResultSet

OdaResultSet is the Oda wrapper for result sets.

Method Summary
`void` `close()` Closes the cursor associated with this IResultSet.
`java.lang.Object` `findAndInvokeMethod(java.lang.String methodName, java.lang.Class[] parameterTypes, java.lang.Object[] args)`
`int` `findColumn(java.lang.String columnName)` Returns the column index of the specified column name.
`java.math.BigDecimal` `getBigDecimal(int index)` Gets the value of the designated column in the current row as a decimal.
`java.math.BigDecimal` `getBigDecimal(java.lang.String columnName)` Gets the value of the designated column in the current row as a decimal.
`java.lang.String` `getBigDecimalAsString(int index)`
`java.lang.String` `getBigDecimalAsString(java.lang.String columnName)`
`IBlob` `getBlob(int index)` Gets the value of the designated column in the current row as an IBlob object.
`IBlob` `getBlob(java.lang.String columnName)` Gets the value of the designated column in the current row as an IBlob object.
`IClob` `getClob(int index)` Gets the value of the designated column in the current row as an IClob object.
`IClob` `getClob(java.lang.String columnName)` Gets the value of the designated column in the current row as an IClob object.
`java.lang.String` `getClobAsString(int index)`
`java.lang.String` `getClobAsString(java.lang.String columnName)`
`java.sql.Date` `getDate(int index)` Gets the value of the designated column in the current row as a java.sql.Date.
`java.sql.Date` `getDate(java.lang.String columnName)` Gets the value of the designated column in the current row as a java.sql.Date.
`java.lang.String` `getDateAsString(int index)`
`java.lang.String` `getDateAsString(java.lang.String columnName)`
`double` `getDouble(int index)` Gets the value of the designated column in the current row as a double.
`double` `getDouble(java.lang.String columnName)` Gets the value of the designated column in the current row as a double.
`int` `getInt(int index)` Gets the value of the designated column in the current row as an int.
`int` `getInt(java.lang.String columnName)` Gets the value of the designated column in the current row as an int.
`java.lang.String` `getInterfaceName()`
`IResultSetMetaData` `getMetaData()` Returns the metadata associated with this IResultSet.
`int` `getRow()` Returns the current row's 1-based index position.
`java.lang.String` `getString(int index)` Gets the value of the designated column in the current row as a String.
`java.lang.String` `getString(java.lang.String columnName)` Gets the value of the designated column in the current row as a String.
`java.sql.Time` `getTime(int index)` Gets the value of the designated column in the current row as a java.sql.Time.
`java.sql.Time` `getTime(java.lang.String columnName)` Gets the value of the designated column in the current row as a java.sql.Time.
`java.lang.String` `getTimeAsString(int index)`
`java.lang.String` `getTimeAsString(java.lang.String columnName)`
`java.sql.Timestamp` `getTimestamp(int index)` Gets the value of the designated column in the current row as a java.sql.Timestamp.
`java.sql.Timestamp` `getTimestamp(java.lang.String columnName)` Gets the value of the designated column in the current row as a java.sql.Timestamp.
`java.lang.String` `getTimestampAsString(int index)`
`java.lang.String` `getTimestampAsString(java.lang.String columnName)`
`boolean` `next()` Moves the cursor down one row from its current position.
`void` `setMaxRows(int max)` Specifies the maximum number of rows that can be fetched from this result set.
`static void` `setThrowAndSetOdaException()`
`boolean` `wasNull()` Returns whether the value read from the previous get<type> method was invalid or null.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getMetaData

    public IResultSetMetaData getMetaData()
                                   throws OdaException

  Description copied from interface: `IResultSet`
  Returns the metadata associated with this IResultSet.

  Specified by:
    `getMetaData` in interface `IResultSet`
  Returns:
    the metadata for this IResultSet
  Throws:
    `OdaException` - if data source error occurs

### close

    public void close()
               throws OdaException

  Description copied from interface: `IResultSet`
  Closes the cursor associated with this IResultSet.

  Specified by:
    `close` in interface `IResultSet`
  Throws:
    `OdaException` - if data source error occurs

### setMaxRows

    public void setMaxRows(int max)
                    throws OdaException

  Description copied from interface: `IResultSet`
  Specifies the maximum number of rows that can be fetched from this result set.
  An optional method.

  Specified by:
    `setMaxRows` in interface `IResultSet`
  Parameters:
    `max` - maximum number of rows that can be fetched from this IResultSet; zero means there is no limit. This value should not be greater than the maximum number of rows specified in the related IQuery.
  Throws:
    `OdaException` - if data source error occurs

### next

    public boolean next()
                 throws OdaException

  Description copied from interface: `IResultSet`
  Moves the cursor down one row from its current position.

  Specified by:
    `next` in interface `IResultSet`
  Returns:
    true, if next data row exists and the maxRows limit has not been reached.
  Throws:
    `OdaException` - if data source error occurs

### getRow

    public int getRow()
               throws OdaException

  Description copied from interface: `IResultSet`
  Returns the current row's 1-based index position.
  An optional method.

  Specified by:
    `getRow` in interface `IResultSet`
  Returns:
    current row's 1-based index position
  Throws:
    `OdaException` - if data source error occurs

### getString

    public java.lang.String getString(int index)
                               throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a String. An ODA runtime driver may or may not support getString() on a non-String type column. The format of the returned string is implementation-dependent.

  Specified by:
    `getString` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the string value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getString

    public java.lang.String getString(java.lang.String columnName)
                               throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a String. An ODA runtime driver may or may not support getString() on a non-String type column. The format of the returned string is implementation-dependent.

  Specified by:
    `getString` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the string value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs.

### getInt

    public int getInt(int index)
               throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an int.

  Specified by:
    `getInt` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the integer value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getInt

    public int getInt(java.lang.String columnName)
               throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an int.

  Specified by:
    `getInt` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the integer value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getDouble

    public double getDouble(int index)
                     throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a double.

  Specified by:
    `getDouble` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the double value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getDouble

    public double getDouble(java.lang.String columnName)
                     throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a double.

  Specified by:
    `getDouble` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the double value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getBigDecimal

    public java.math.BigDecimal getBigDecimal(int index)
                                       throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a decimal.

  Specified by:
    `getBigDecimal` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the decimal value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getBigDecimal

    public java.math.BigDecimal getBigDecimal(java.lang.String columnName)
                                       throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a decimal.

  Specified by:
    `getBigDecimal` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the decimal value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getDate

    public java.sql.Date getDate(int index)
                          throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Date.

  Specified by:
    `getDate` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the java.sql.Date value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getDate

    public java.sql.Date getDate(java.lang.String columnName)
                          throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Date.

  Specified by:
    `getDate` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the java.sql.Date value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getTime

    public java.sql.Time getTime(int index)
                          throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Time.

  Specified by:
    `getTime` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the java.sql.Time value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getTime

    public java.sql.Time getTime(java.lang.String columnName)
                          throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Time.

  Specified by:
    `getTime` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the java.sql.Time value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getTimestamp

    public java.sql.Timestamp getTimestamp(int index)
                                    throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Timestamp.

  Specified by:
    `getTimestamp` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    the java.sql.Timestamp value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getTimestamp

    public java.sql.Timestamp getTimestamp(java.lang.String columnName)
                                    throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as a java.sql.Timestamp.

  Specified by:
    `getTimestamp` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    the java.sql.Timestamp value in the specific column of the current row
  Throws:
    `OdaException` - if data source error occurs

### getBlob

    public IBlob getBlob(int index)
                  throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an IBlob object.

  Note: The driver must guarantee that the returned object and its BLOB data would remain valid and accessible until this result set is closed.

  Specified by:
    `getBlob` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    an IBlob object that represents the BLOB value in the specific column of the current row; or `null` if the specific column has null value
  Throws:
    `OdaException` - if data source error occurs

### getBlob

    public IBlob getBlob(java.lang.String columnName)
                  throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an IBlob object.

  Note: The driver must guarantee that the returned object and its BLOB data would remain valid and accessible until this result set is closed.

  Specified by:
    `getBlob` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    an IBlob object that represents the BLOB value in the specific column of the current row; or `null` if the specific column has null value
  Throws:
    `OdaException` - if data source error occurs

### getClob

    public IClob getClob(int index)
                  throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an IClob object.

  Note: The driver must guarantee that the returned object and its CLOB data would remain valid and accessible until this result set is closed.

  Specified by:
    `getClob` in interface `IResultSet`
  Parameters:
    `index` - column number (1-based)
  Returns:
    an IClob object that represents the CLOB value in the specific column of the current row; or `null` if the specific column has null value
  Throws:
    `OdaException` - if data source error occurs

### getClob

    public IClob getClob(java.lang.String columnName)
                  throws OdaException

  Description copied from interface: `IResultSet`
  Gets the value of the designated column in the current row as an IClob object.

  Note: The driver must guarantee that the returned object and its CLOB data would remain valid and accessible until this result set is closed.

  Specified by:
    `getClob` in interface `IResultSet`
  Parameters:
    `columnName` - column name
  Returns:
    an IClob object that represents the CLOB value in the specific column of the current row; or `null` if the specific column has null value
  Throws:
    `OdaException` - if data source error occurs

### wasNull

    public boolean wasNull()
                    throws OdaException

  Description copied from interface: `IResultSet`
  Returns whether the value read from the previous get<type> method was invalid or null. This needs to be called immediately after the call to a get<type> method.

  Specified by:
    `wasNull` in interface `IResultSet`
  Returns:
    true, if the previous get<type> call was invalid or null
  Throws:
    `OdaException` - if data source error occurs

### findColumn

    public int findColumn(java.lang.String columnName)
                   throws OdaException

  Description copied from interface: `IResultSet`
  Returns the column index of the specified column name.

  Specified by:
    `findColumn` in interface `IResultSet`
  Parameters:
    `columnName` - name of the column
  Returns:
    column index (1-based)
  Throws:
    `OdaException` - if data source error occurs

### getBigDecimalAsString

    public java.lang.String getBigDecimalAsString(int index)
                                           throws OdaException

  Throws:
    `OdaException`

### getBigDecimalAsString

    public java.lang.String getBigDecimalAsString(java.lang.String columnName)
                                           throws OdaException

  Throws:
    `OdaException`

### getDateAsString

    public java.lang.String getDateAsString(int index)
                                     throws OdaException

  Throws:
    `OdaException`

### getDateAsString

    public java.lang.String getDateAsString(java.lang.String columnName)
                                     throws OdaException

  Throws:
    `OdaException`

### getTimeAsString

    public java.lang.String getTimeAsString(int index)
                                     throws OdaException

  Throws:
    `OdaException`

### getTimeAsString

    public java.lang.String getTimeAsString(java.lang.String columnName)
                                     throws OdaException

  Throws:
    `OdaException`

### getTimestampAsString

    public java.lang.String getTimestampAsString(int index)
                                          throws OdaException

  Throws:
    `OdaException`

### getTimestampAsString

    public java.lang.String getTimestampAsString(java.lang.String columnName)
                                          throws OdaException

  Throws:
    `OdaException`

### getClobAsString

    public java.lang.String getClobAsString(int index)
                                     throws OdaException

  Throws:
    `OdaException`

### getClobAsString

    public java.lang.String getClobAsString(java.lang.String columnName)
                                     throws OdaException

  Throws:
    `OdaException`

### getInterfaceName

    public java.lang.String getInterfaceName()

### setThrowAndSetOdaException

    public static void setThrowAndSetOdaException()

### findAndInvokeMethod

    public java.lang.Object findAndInvokeMethod(java.lang.String methodName,
                                                java.lang.Class[] parameterTypes,
                                                java.lang.Object[] args)
                                         throws java.lang.NoSuchMethodException,
                                                java.lang.IllegalAccessException,
                                                java.lang.reflect.InvocationTargetException,
                                                OdaException

  Throws:
    `java.lang.NoSuchMethodException`
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `OdaException`

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.