org.castor.jdo.engine

Class SQLTypeConverters

public final class SQLTypeConverters extends 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
abstract static classSQLTypeConverters.Convertor
Abstract class to convert from one type to another.
Method Summary
static TypeConvertorgetConvertor(Class fromType, Class toType)
Returns a type convertor.
static StringgetFullDatePattern(String pattern)
Transforms short date format pattern into full format pattern for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").

Method Detail

getConvertor

public static TypeConvertor getConvertor(Class fromType, Class toType)
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.

getFullDatePattern

public static String getFullDatePattern(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.

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