org.exolab.castor.xml

Class XMLMappingLoader

Implemented Interfaces:
MappingLoader

public final class XMLMappingLoader
extends AbstractMappingLoader

An XML implementation of mapping helper. Creates XML class descriptors from the mapping file.
Version:
$Revision: 6305 $ $Date: 2006-02-23 01:37:50 -0700 (Thu, 23 Feb 2006) $
Authors:
Keith Visco
Assaf Arkin

Nested Class Summary

(package private) class
XMLMappingLoader.IdentityConvertor
A special TypeConvertor that simply returns the object given.

Nested classes/interfaces inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader

AbstractMappingLoader.TypeInfoReference

Field Summary

Fields inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader

EMPTY_ARGS, NO_DESCRIPTOR, STRING_ARG, VALUE_OF

Constructor Summary

XMLMappingLoader(ClassLoader loader)
Creates a new XMLMappingLoader

Method Summary

protected ClassDescriptor
createDescriptor(ClassMapping clsMap)
protected FieldDescriptor
createFieldDesc(Class javaClass, FieldMapping fieldMap)
BindingType
getBindingType()
protected TypeInfo
getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)
protected void
resolveRelations(ClassDescriptor clsDesc)
void
setLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files).

Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader

createDescriptor, createFieldDesc, createFieldHandler, findAccessor, getIdentityColumnNames, getSourceType, getTypeInfo, isPrimitive, loadMappingInternal, resolveRelations, resolveType

Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader2

addDescriptor, clear, descriptorIterator, getClassLoader, getDescriptor, isAllowRedefinition, loadMapping, loadMappingInternal, setAllowRedefinitions, setClassLoader

Constructor Details

XMLMappingLoader

public XMLMappingLoader(ClassLoader loader)
Creates a new XMLMappingLoader

Method Details

createDescriptor

protected ClassDescriptor createDescriptor(ClassMapping clsMap)
            throws MappingException
Overrides:
createDescriptor in interface AbstractMappingLoader

createFieldDesc

protected FieldDescriptor createFieldDesc(Class javaClass,
                                          FieldMapping fieldMap)
            throws MappingException
Overrides:
createFieldDesc in interface AbstractMappingLoader

getBindingType

public BindingType getBindingType()
Specified by:
getBindingType in interface MappingLoader

getTypeInfo

protected TypeInfo getTypeInfo(Class fieldType,
                               CollectionHandler colHandler,
                               FieldMapping fieldMap)
            throws MappingException
Overrides:
getTypeInfo in interface AbstractMappingLoader

resolveRelations

protected void resolveRelations(ClassDescriptor clsDesc)
Overrides:
resolveRelations in interface AbstractMappingLoader

setLoadPackageMappings

public void setLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files).
Parameters:
loadPackageMappings - a boolean that enables or disables the loading of package specific mapping files

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