|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.mapping.loader.AbstractMappingLoader2
org.exolab.castor.mapping.loader.AbstractMappingLoader
org.exolab.castor.xml.XMLMappingLoader
public final class XMLMappingLoader
An XML implementation of mapping helper. Creates XML class descriptors from the mapping file.
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 |
Constructor Summary | |
---|---|
XMLMappingLoader(java.lang.ClassLoader loader)
Creates a new XMLMappingLoader. |
Method Summary | |
---|---|
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). |
Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader |
---|
checkFieldNameDuplicates, createClassDescriptors, createFieldDescriptors, createFieldHandler, createFieldHandlers, divideFieldDescriptors, findAccessor, getDepended, getExtended, getIdColumnIndex, getIdentityColumnNames, getInternalContext, getOrigin, getSourceType, isPrimitive, resolveType, setInternalContext |
Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader2 |
---|
addDescriptor, clear, descriptorIterator, getClassLoader, getDescriptor, getDescriptors, isAllowRedefinition, loadMapping, setAllowRedefinitions, setClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLMappingLoader(java.lang.ClassLoader loader)
loader
- the class loader to useMethod Detail |
---|
public 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 process
ClassDescriptor
created for the class mapping
MappingException
- ...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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |