|
||||||||||
| 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 |
|---|
| Nested classes/interfaces inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader |
|---|
AbstractMappingLoader.TypeInfoReference |
| Constructor Summary | |
|---|---|
XMLMappingLoader(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(Class javaClass,
FieldMapping fieldMap)
Creates a single field descriptor. |
protected FieldDescriptor |
findIdentityByName(List fldList,
String idName,
Class javaClass)
|
BindingType |
getBindingType()
|
protected TypeInfo |
getTypeInfo(Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap)
|
void |
loadMapping(MappingRoot mapping,
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(ClassLoader loader)
loader - the class loader to use| Method Detail |
|---|
public BindingType getBindingType()
public void loadMapping(MappingRoot mapping,
Object param)
throws MappingException
loadMapping in class AbstractMappingLoadermapping - 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 AbstractMappingLoaderclassMapping - the class mapping information to process
ClassDescriptor created for the class mapping
MappingException - ...
protected final FieldDescriptor findIdentityByName(List fldList,
String idName,
Class javaClass)
protected final void resolveRelations(ClassDescriptor clsDesc)
resolveRelations in class AbstractMappingLoader
protected FieldDescriptorImpl createFieldDesc(Class javaClass,
FieldMapping fieldMap)
throws MappingException
AbstractMappingLoaderFieldDescriptor. Implementations may extend this class to create a more
suitable descriptor.
createFieldDesc in class AbstractMappingLoaderjavaClass - 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 files
protected TypeInfo getTypeInfo(Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap)
throws MappingException
getTypeInfo in class AbstractMappingLoaderMappingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||