org.castor.jdo.engine
Class SQLTypeConverters

java.lang.Object
  extended byorg.castor.jdo.engine.SQLTypeConverters

public final class SQLTypeConverters
extends java.lang.Object

Since:
1.0
Version:
$Revision: 5951 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Assaf Arkin, Bruce Snyder, Ralf Joachim

Nested Class Summary
static class SQLTypeConverters.Convertor
          Abstract class to convert from one type to another.
 
Method Summary
static TypeConvertor getConvertor(java.lang.Class fromType, java.lang.Class toType)
          Returns a type convertor.
static java.lang.String getFullDatePattern(java.lang.String pattern)
          Transforms short date format pattern into full format pattern for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFullDatePattern

public static java.lang.String getFullDatePattern(java.lang.String pattern)
Transforms short date format pattern into full format pattern for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").

Parameters:
pattern - The short pattern.
Returns:
The full pattern.

getConvertor

public static TypeConvertor getConvertor(java.lang.Class fromType,
                                         java.lang.Class toType)
                                  throws MappingException
Returns a type convertor. A type convertor can be used to convert an object from Java type fromType to Java type toType.

Parameters:
fromType - The Java type to convert from.
toType - The Java type to convert to.
Returns:
The TypeConverter to convert fromType into toType.
Throws:
MappingException - No suitable convertor was found.


Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com