org.eclipse.datatools.connectivity.oda.util.manifest
Class DataTypeMapping

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.util.manifest.DataTypeMapping

public class DataTypeMapping
extends java.lang.Object

The data type mapping of a data provider's native data type to one or more ODA data types. A single native data type must be mapped to a primary ODA scalar data type. The driver can optionally provide a list of alternate ODA data types to which it is capable of converting the native data type.


Method Summary
 boolean canConvertToOdaType(int odaDataTypeCode)
          A convenient method to indicate whether the ODA data provider is capable of converting this mapping's native data type to the specified ODA data type code.
 int[] getAlternativeOdaDataTypeCodes()
          Returns the alternative ODA data type codes of the data type mapping, or an empty array if no alternative ODA data types exist.
 java.lang.String[] getAlternativeOdaDataTypes()
          Returns the alternative ODA data types of the data type mapping, or an empty array if no alternative ODA data types exist.
 java.lang.String getNativeType()
          Returns the native type name of the data type mapping.
 int getNativeTypeCode()
          Returns the native type code of the data type mapping.
 java.lang.String getOdaScalarDataType()
          Returns the primary ODA scalar data type that the native data type maps to
 int getOdaScalarDataTypeCode()
          Returns the primary ODA scalar data type code that the native data type maps to.
static int toOdaDataTypeCode(java.lang.String odaDataTypeLiteral)
          Converts an ODA data type literal value to its corresponding code value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNativeType

public java.lang.String getNativeType()
Returns the native type name of the data type mapping.

Returns:
the native type name.

getNativeTypeCode

public int getNativeTypeCode()
Returns the native type code of the data type mapping. Its value must match one of the data type codes returned in the driver's ODA interface implementation.

Returns:
the native type code.

getOdaScalarDataType

public java.lang.String getOdaScalarDataType()
Returns the primary ODA scalar data type that the native data type maps to

Returns:
the primary ODA scalar data type.

getOdaScalarDataTypeCode

public int getOdaScalarDataTypeCode()
Returns the primary ODA scalar data type code that the native data type maps to.

Returns:
the primary ODA scalar data type code.

getAlternativeOdaDataTypes

public java.lang.String[] getAlternativeOdaDataTypes()
Returns the alternative ODA data types of the data type mapping, or an empty array if no alternative ODA data types exist.

Returns:
the alternative ODA data types, or an empty array if no alternative ODA data types exist.

getAlternativeOdaDataTypeCodes

public int[] getAlternativeOdaDataTypeCodes()
Returns the alternative ODA data type codes of the data type mapping, or an empty array if no alternative ODA data types exist.

Returns:
the alternative ODA data type codes, or an empty array if no alternative ODA data types exist.

canConvertToOdaType

public boolean canConvertToOdaType(int odaDataTypeCode)
A convenient method to indicate whether the ODA data provider is capable of converting this mapping's native data type to the specified ODA data type code.

Parameters:
odaDataTypeCode - an ODA data type code
Returns:
true if the specified ODA data type can be converted from this mapping's native data type; false otherwise.

toOdaDataTypeCode

public static int toOdaDataTypeCode(java.lang.String odaDataTypeLiteral)
Converts an ODA data type literal value to its corresponding code value.

Parameters:
odaDataTypeLiteral - a literal value of an ODA data type
Returns:
corresponding ODA data type code value, or Types.NULL if specified literal value is not recognized


Copyright © 2007 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.