MappingLoader
public final class XMLMappingLoader extends AbstractMappingLoader
Modifier and Type | Class | Description |
---|---|---|
(package private) class |
XMLMappingLoader.IdentityConvertor |
A special TypeConvertor that simply returns the object
given.
|
AbstractMappingLoader.TypeInfoReference
NAME
Constructor | Description |
---|---|
XMLMappingLoader(java.lang.ClassLoader loader) |
Creates a new XMLMappingLoader.
|
Modifier and Type | Method | Description |
---|---|---|
protected ClassDescriptor |
createClassDescriptor(ClassMapping classMapping) |
To create the class descriptor for the given class mapping.
|
protected FieldDescriptorImpl |
createFieldDesc(java.lang.Class javaClass,
FieldMapping fieldMap) |
Creates a single field descriptor.
|
protected FieldDescriptor |
findIdentityByName(java.util.List fldList,
java.lang.String idName,
java.lang.Class javaClass) |
|
BindingType |
getBindingType() |
|
protected TypeInfo |
getTypeInfo(java.lang.Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap) |
|
void |
loadMapping(MappingRoot mapping,
java.lang.Object param) |
Loads the mapping from the specified mapping object if not loaded previously.
|
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).
|
checkFieldNameDuplicates, createClassDescriptors, createFieldDescriptors, createFieldHandler, createFieldHandlers, divideFieldDescriptors, findAccessor, getDepended, getExtended, getIdColumnIndex, getIdentityColumnNames, getInternalContext, getOrigin, getSourceType, isPrimitive, resolveType, setInternalContext
addDescriptor, clear, getClassLoader, getDescriptor, getDescriptors, isAllowRedefinition, loadMapping, setAllowRedefinitions, setClassLoader
public XMLMappingLoader(java.lang.ClassLoader loader)
loader
- the class loader to usepublic BindingType getBindingType()
public void loadMapping(MappingRoot mapping, java.lang.Object param) throws MappingException
loadMapping
in class AbstractMappingLoader
mapping
- The mapping information.param
- Arbitrary parameter that can be used by subclasses.MappingException
- The mapping file is invalid.protected ClassDescriptor createClassDescriptor(ClassMapping classMapping) throws MappingException
createClassDescriptor
in class AbstractMappingLoader
classMapping
- the class mapping information to processClassDescriptor
created for the class mappingMappingException
- ...protected final FieldDescriptor findIdentityByName(java.util.List fldList, java.lang.String idName, java.lang.Class javaClass)
protected final void resolveRelations(ClassDescriptor clsDesc)
resolveRelations
in class AbstractMappingLoader
protected FieldDescriptorImpl createFieldDesc(java.lang.Class javaClass, FieldMapping fieldMap) throws MappingException
AbstractMappingLoader
FieldDescriptor
. Implementations may extend this class to create a more
suitable descriptor.createFieldDesc
in class AbstractMappingLoader
javaClass
- The class to which the field belongs.fieldMap
- The field mapping information.MappingException
- The field or its accessor methods are not
found, not accessible, not of the specified type, etc.public void setLoadPackageMappings(boolean loadPackageMappings)
loadPackageMappings
- a boolean that enables or
disables the loading of package specific mapping filesprotected TypeInfo getTypeInfo(java.lang.Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException
getTypeInfo
in class AbstractMappingLoader
MappingException
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com