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

java.lang.Object
  extended by org.eclipse.emf.oda.ecore.impl.DataTypes

public final class DataTypes
extends java.lang.Object

Defines the data types that are supported by EMF ODA runtime driver.


Field Summary
static int noNulls
           
static int nullable
           
static int nullableUnknown
           
 
Constructor Summary
DataTypes()
           
 
Method Summary
static int getDisplayLength(EClassifier type)
          Returns the display length of the specified type.
static int getPrecision(EClassifier type)
          Returns the maximum number of decimal digits of the specified type.
static int getScale(EClassifier type)
          Returns the maximum number of digits to the right of the decimal point of the specified type.
static int getType(EClassifier type)
          Returns the data provider specific code of the specified type.
static java.lang.String getTypeName(EClassifier type)
          Returns the data provider specific name of the specified type.
static int isNullable(EClassifier type)
          Returns whether null values are allowed for the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nullableUnknown

public static final int nullableUnknown
See Also:
Constant Field Values

noNulls

public static final int noNulls
See Also:
Constant Field Values

nullable

public static final int nullable
See Also:
Constant Field Values
Constructor Detail

DataTypes

public DataTypes()
Method Detail

getDisplayLength

public static int getDisplayLength(EClassifier type)
Returns the display length of the specified type.

Parameters:
type - the type
Returns:
the column display length, or -1 if unknown
See Also:
IResultSetMetaData.getColumnDisplayLength(int)

isNullable

public static int isNullable(EClassifier type)
Returns whether null values are allowed for the specified type.

Parameters:
type - the type
Returns:
the nullability of the type
See Also:
IParameterMetaData.isNullable(int), IResultSetMetaData.isNullable(int)

getPrecision

public static int getPrecision(EClassifier type)
Returns the maximum number of decimal digits of the specified type.

Parameters:
type - the type
Returns:
the type precision, or -1 if not applicable
See Also:
IParameterMetaData.getPrecision(int), IResultSetMetaData.getPrecision(int)

getScale

public static int getScale(EClassifier type)
Returns the maximum number of digits to the right of the decimal point of the specified type.

Parameters:
type - the type
Returns:
the type scale, or -1 if not applicable
See Also:
IParameterMetaData.getScale(int), IResultSetMetaData.getScale(int)

getType

public static int getType(EClassifier type)
                   throws org.eclipse.datatools.connectivity.oda.OdaException
Returns the data provider specific code of the specified type.

Parameters:
type - the type
Returns:
the native data type code of the type
Throws:
org.eclipse.datatools.connectivity.oda.OdaException - if data source error occurs
See Also:
IParameterMetaData.getParameterType(int), IResultSetMetaData.getColumnType(int)

getTypeName

public static java.lang.String getTypeName(EClassifier type)
                                    throws org.eclipse.datatools.connectivity.oda.OdaException
Returns the data provider specific name of the specified type.

Parameters:
type - the type
Returns:
the native data type name of the type
Throws:
org.eclipse.datatools.connectivity.oda.OdaException - if data source error occurs
See Also:
IParameterMetaData.getParameterTypeName(int), IResultSetMetaData.getColumnTypeName(int)

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