org.eclipse.emf.oda.ecore.impl
Class ResultSetMetaData

java.lang.Object
  extended by org.eclipse.emf.oda.ecore.impl.ResultSetMetaData
All Implemented Interfaces:
org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Direct Known Subclasses:
ResultSetMetaData.EClass, ResultSetMetaData.EDataType

public abstract class ResultSetMetaData
extends java.lang.Object
implements org.eclipse.datatools.connectivity.oda.IResultSetMetaData

Implementation of IResultSetMetaData for EMF ODA runtime driver.


Nested Class Summary
protected static class ResultSetMetaData.EClass
          Metadata for sets of results that contain instances of classes.
protected static class ResultSetMetaData.EDataType
          Metadata for sets of results that contain values of data types.
 
Field Summary
 
Fields inherited from interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
protected ResultSetMetaData()
           
 
Method Summary
protected  int checkBounds(int index)
          Checks that the specified index is within the appropriate bounds.
static org.eclipse.datatools.connectivity.oda.IResultSetMetaData create(EClassifier type)
          Creates result set metadata of the appropriate kind, depending on whether the specified type is a class or a data type.
protected abstract  EClassifier getColumnClassifier(int index)
           
 int getColumnDisplayLength(int index)
           
 java.lang.String getColumnLabel(int index)
           
 int getColumnType(int index)
           
 java.lang.String getColumnTypeName(int index)
           
 int getPrecision(int index)
           
 int getScale(int index)
           
 int isNullable(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
getColumnCount, getColumnName
 

Constructor Detail

ResultSetMetaData

protected ResultSetMetaData()
Method Detail

create

public static org.eclipse.datatools.connectivity.oda.IResultSetMetaData create(EClassifier type)
Creates result set metadata of the appropriate kind, depending on whether the specified type is a class or a data type.

Parameters:
type - the type of objects result set described by the new metadata
Returns:
result set metadata of the appropriate kind

checkBounds

protected int checkBounds(int index)
                   throws org.eclipse.datatools.connectivity.oda.OdaException
Checks that the specified index is within the appropriate bounds.

Parameters:
index - the 1-based index
Returns:
the index
Throws:
org.eclipse.datatools.connectivity.oda.OdaException - if index is not within the bounds

getColumnLabel

public java.lang.String getColumnLabel(int index)
                                throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getColumnLabel in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getColumnClassifier

protected abstract EClassifier getColumnClassifier(int index)
                                            throws org.eclipse.datatools.connectivity.oda.OdaException
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getColumnType

public int getColumnType(int index)
                  throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getColumnType in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getColumnTypeName

public java.lang.String getColumnTypeName(int index)
                                   throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getColumnTypeName in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getColumnDisplayLength

public int getColumnDisplayLength(int index)
                           throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getColumnDisplayLength in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getPrecision

public int getPrecision(int index)
                 throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getPrecision in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

getScale

public int getScale(int index)
             throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
getScale in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

isNullable

public int isNullable(int index)
               throws org.eclipse.datatools.connectivity.oda.OdaException
Specified by:
isNullable in interface org.eclipse.datatools.connectivity.oda.IResultSetMetaData
Throws:
org.eclipse.datatools.connectivity.oda.OdaException

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.