org.eclipse.datatools.enablement.oda.ws.impl
Class ResultSetMetaData

java.lang.Object
  extended by org.eclipse.datatools.enablement.oda.ws.impl.ResultSetMetaData
All Implemented Interfaces:
IResultSetMetaData

public class ResultSetMetaData
extends java.lang.Object
implements IResultSetMetaData

This class implements the org.eclipse.datatools.connectivity.oda.IResultSetMetaData interface.


Field Summary
 
Fields inherited from interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
ResultSetMetaData()
           
 
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

ResultSetMetaData

public ResultSetMetaData()
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, or -1 if unknown.
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.