org.eclipse.datatools.connectivity.oda.impl
Class SimpleResultSetMetaData

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.impl.SimpleResultSetMetaData
All Implemented Interfaces:
IResultSetMetaData

public class SimpleResultSetMetaData
extends java.lang.Object
implements IResultSetMetaData

Default implementation of IResultSetMetaData for a simple ODA runtime driver.


Field Summary
 
Fields inherited from interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
SimpleResultSetMetaData()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResultSetMetaData

public SimpleResultSetMetaData()
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.
See Also:
IResultSetMetaData.getColumnCount()

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.
See Also:
IResultSetMetaData.getColumnName(int)

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.
See Also:
IResultSetMetaData.getColumnLabel(int)

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.
See Also:
IResultSetMetaData.getColumnType(int)

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.
See Also:
IResultSetMetaData.getColumnTypeName(int)

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.
See Also:
IResultSetMetaData.getColumnDisplayLength(int)

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.
See Also:
IResultSetMetaData.getPrecision(int)

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.
See Also:
IResultSetMetaData.getScale(int)

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.
See Also:
IResultSetMetaData.isNullable(int)


Copyright © 2005 Actuate Corp. All rights reserved.