org.exolab.castor.jdo.engine

Class JDOMappingLoader

public final class JDOMappingLoader extends AbstractMappingLoader

A JDO implementation of mapping helper. Creates JDO class descriptors from the mapping file.

Version: $Revision: 6305 $ $Date: 2006-04-13 07:37:49 -0600 (Thu, 13 Apr 2006) $

Author: Assaf Arkin

Constructor Summary
JDOMappingLoader(ClassLoader loader)
Method Summary
protected ClassDescriptorcreateDescriptor(ClassMapping clsMap)
protected FieldDescriptorcreateFieldDesc(Class javaClass, FieldMapping fieldMap)
static Stringdefinition2param(String sqlTypeDef)
Extracts parameter for type convertor from the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]".
static Stringdefinition2type(String sqlTypeDef)
Extracts SQL type name from the the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]".
BindingTypegetBindingType()
protected String[]getSqlTypes(FieldMapping fieldMap)
Parse the sql type attribute to build an array of types, needed to support whitespace inside parameterized types (see Bug 1045)
protected TypeInfogetTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)
protected voidloadMappingInternal(MappingRoot mapping, Object param)

Constructor Detail

JDOMappingLoader

public JDOMappingLoader(ClassLoader loader)

Method Detail

createDescriptor

protected ClassDescriptor createDescriptor(ClassMapping clsMap)

createFieldDesc

protected FieldDescriptor createFieldDesc(Class javaClass, FieldMapping fieldMap)

definition2param

public static String definition2param(String sqlTypeDef)
Extracts parameter for type convertor from the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]". If the type is not parameterized, returns null.

Parameters: sqlTypeDef SQL type definition (e.g. char[01]).

Returns: Parameter (e.g. "01") or null if not parameterized.

definition2type

public static String definition2type(String sqlTypeDef)
Extracts SQL type name from the the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]".

Parameters: sqlTypeDef SQL type definition (e.g. char[01]).

Returns: SQL type name (e.g. "char").

getBindingType

public BindingType getBindingType()

getSqlTypes

protected String[] getSqlTypes(FieldMapping fieldMap)
Parse the sql type attribute to build an array of types, needed to support whitespace inside parameterized types (see Bug 1045)

getTypeInfo

protected TypeInfo getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)

loadMappingInternal

protected void loadMappingInternal(MappingRoot mapping, Object param)
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com