org.eclipse.datatools.connectivity.oda.consumer.helper
Class OdaResultSetMetaData

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaObject
      extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
          extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSetMetaData
All Implemented Interfaces:
IResultSetMetaData

public class OdaResultSetMetaData
extends org.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
implements IResultSetMetaData

OdaResultSetMetaData is the Oda wrapper for result set metadata.


Field Summary
 
Fields inherited from interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Method Summary
 java.lang.Object findAndInvokeMethod(java.lang.String methodName, java.lang.Class[] parameterTypes, java.lang.Object[] args)
           
 int getColumnCount()
          Returns the number of columns in the corresponding IResultSet object.
 int getColumnDisplayLength(int index)
          Returns the display length of the specific column.
 java.lang.String getColumnLabel(int index)
          Returns the designated column's suggested title for use in the column heading and/or display name.
 java.lang.String getColumnName(int index)
          Returns the name of the specific column.
 int getColumnType(int index)
          Returns the data provider specific code of the column's data type.
 java.lang.String getColumnTypeName(int index)
          Returns the data provider specific name of the column's data type.
 int getPrecision(int index)
          Returns the maximum number of decimal digits of the specific column.
 int getScale(int index)
          Returns the maximum number of digits to the right of the decimal point of the specific column.
 int isNullable(int index)
          Indicates the nullability of values in the designated column.
static void setThrowAndSetOdaException()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColumnCount

public int getColumnCount()
                   throws OdaException
Description copied from interface: IResultSetMetaData
Returns the number of columns in the corresponding IResultSet object.

Specified by:
getColumnCount in interface IResultSetMetaData
Returns:
number of columns.
Throws:
OdaException - if data source error occurs.

getColumnName

public java.lang.String getColumnName(int index)
                               throws OdaException
Description copied from interface: IResultSetMetaData
Returns the name of the specific column.

Specified by:
getColumnName in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the column name.
Throws:
OdaException - if data source error occurs.

getColumnLabel

public java.lang.String getColumnLabel(int index)
                                throws OdaException
Description copied from interface: IResultSetMetaData
Returns the designated column's suggested title for use in the column heading and/or display name.

Specified by:
getColumnLabel in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the column's suggested title.
Throws:
OdaException - if data source error occurs.

getColumnType

public int getColumnType(int index)
                  throws OdaException
Description copied from interface: IResultSetMetaData
Returns the data provider specific code of the column's data type. The valid values are implementation-specific.

Specified by:
getColumnType in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the native data type code of the column.
Throws:
OdaException - if data source error occurs.

getColumnTypeName

public java.lang.String getColumnTypeName(int index)
                                   throws OdaException
Description copied from interface: IResultSetMetaData
Returns the data provider specific name of the column's data type.

Specified by:
getColumnTypeName in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the native data type name of the column.
Throws:
OdaException - if data source error occurs.

getColumnDisplayLength

public int getColumnDisplayLength(int index)
                           throws OdaException
Description copied from interface: IResultSetMetaData
Returns the display length of the specific column.

Specified by:
getColumnDisplayLength in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the column display length.
Throws:
OdaException - if data source error occurs.

getPrecision

public int getPrecision(int index)
                 throws OdaException
Description copied from interface: IResultSetMetaData
Returns the maximum number of decimal digits of the specific column. This method should only apply to numeric data types; however, it is up to an ODA data provider to determine those data types that are applicable. The maximum precision allowed on a data type may vary depending on the data provider.
An optional method.

Specified by:
getPrecision in interface IResultSetMetaData
Parameters:
index - column number (1-based).
Returns:
the column precision, or -1 if not applicable.
Throws:
OdaException - if data source error occurs.

getScale

public int getScale(int index)
             throws OdaException
Description copied from interface: IResultSetMetaData
Returns the maximum number of digits to the right of the decimal point of the specific column. This method should only apply to numeric data types, however, it is up to an ODA data provider to determine those data types that are applicable. The maximum scale allowed on a data type may vary depending on the data provider.
An optional method.

Specified by:
getScale in interface IResultSetMetaData
Parameters:
index - column number.
Returns:
the column scale, or -1 if not applicable.
Throws:
OdaException - if data source error occurs.

isNullable

public int isNullable(int index)
               throws OdaException
Description copied from interface: IResultSetMetaData
Indicates the nullability of values in the designated column.
An optional method.

Specified by:
isNullable in interface IResultSetMetaData
Parameters:
index - column number
Returns:
the nullability status of the specified column;
one of columnNoNulls,
          columnNullable,
          columnNullableUnknown.
Throws:
OdaException - if data source error occurs.

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 © 2005 Actuate Corp. All rights reserved.