org.teiid.connector.api
Class TypeFacility

java.lang.Object
  extended by org.teiid.connector.api.TypeFacility

public abstract class TypeFacility
extends java.lang.Object


Nested Class Summary
static class TypeFacility.RUNTIME_NAMES
           
static interface TypeFacility.RUNTIME_TYPES
           
 
Constructor Summary
TypeFacility()
           
 
Method Summary
abstract  java.lang.Object convertDate(java.util.Date date, java.util.TimeZone initial, java.util.Calendar target, java.lang.Class targetType)
          Convert the given date to a target type, optionally adjusting its display for a given target Calendar.
abstract  java.lang.Object convertToRuntimeType(java.lang.Object value)
          Convert the given value to the closest runtime type see TypeFacility.RUNTIME_TYPES
static java.lang.Class<?> getDataTypeClass(java.lang.String type)
          Get the Class constant for the given String type name
static int getSQLTypeFromRuntimeType(java.lang.Class<?> type)
          Get the SQL type for the given runtime type Class constant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFacility

public TypeFacility()
Method Detail

getDataTypeClass

public static java.lang.Class<?> getDataTypeClass(java.lang.String type)
Get the Class constant for the given String type name


getSQLTypeFromRuntimeType

public static final int getSQLTypeFromRuntimeType(java.lang.Class<?> type)
Get the SQL type for the given runtime type Class constant

Parameters:
type -
Returns:

convertToRuntimeType

public abstract java.lang.Object convertToRuntimeType(java.lang.Object value)
Convert the given value to the closest runtime type see TypeFacility.RUNTIME_TYPES

Parameters:
value -
Returns:

convertDate

public abstract java.lang.Object convertDate(java.util.Date date,
                                             java.util.TimeZone initial,
                                             java.util.Calendar target,
                                             java.lang.Class targetType)
Convert the given date to a target type, optionally adjusting its display for a given target Calendar.

Parameters:
date -
initial -
target -
targetType -
Returns:


Copyright © 2009. All Rights Reserved.