org.castor.cpa.persistence.convertor
Class TypeConvertorRegistry
java.lang.Object
org.castor.cpa.persistence.convertor.TypeConvertorRegistry
public final class TypeConvertorRegistry
extends java.lang.Object
Registry of type convertors.
$Revision: 7134 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
TypeConvertor | getConvertor(Class fromType, Class toType, String parameter) - Returns a type convertor initialized with parameter if specified.
|
TypeConvertorRegistry
public TypeConvertorRegistry(Configuration config)
Create a new registry instance of type convertors. The registry will be initialized
with all type convertors specified through TYPE_CONVERTORS property of given
configuration. The configuration get also passed to the type converters for them to
get any required property.
config
- The configuration to use.
getConvertor
public TypeConvertor getConvertor(Class fromType,
Class toType,
String parameter)
throws MappingException
Returns a type convertor initialized with parameter if specified. A type convertor
can be used to convert an object from Java type fromType to Java type
toType.
fromType
- The Java type to convert from.toType
- The Java type to convert to.parameter
- The parameter for the convertor (null if is not specified).
- The TypeConverter to convert fromType into toType.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com