public final class XMLMappingLoader extends AbstractMappingLoader
AbstractMappingLoader.TypeInfoReferenceNAME| Constructor and Description |
|---|
XMLMappingLoader(ClassLoader loader)
Creates a new XMLMappingLoader.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
checkFieldNameDuplicates, createClassDescriptors, createFieldDescriptors, createFieldHandler, createFieldHandlers, divideFieldDescriptors, findAccessor, getDepended, getExtended, getIdColumnIndex, getIdentityColumnNames, getInternalContext, getOrigin, getSourceType, isPrimitive, resolveType, setInternalContextaddDescriptor, clear, getClassLoader, getDescriptor, getDescriptors, isAllowRedefinition, loadMapping, setAllowRedefinitions, setClassLoaderpublic XMLMappingLoader(ClassLoader loader)
loader - the class loader to usepublic 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 processClassDescriptor created for the class mappingMappingException - ...protected final FieldDescriptor findIdentityByName(List fldList, String idName, Class javaClass)
protected final void resolveRelations(ClassDescriptor clsDesc)
resolveRelations in class AbstractMappingLoaderprotected 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 filesprotected TypeInfo getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException
getTypeInfo in class AbstractMappingLoaderMappingExceptionCopyright © 2016. All rights reserved.