org.exolab.castor.jdo.engine
Class JDOMappingLoader
java.lang.Object
org.exolab.castor.mapping.loader.MappingLoader
org.exolab.castor.jdo.engine.JDOMappingLoader
- All Implemented Interfaces:
- MappingResolver
- public class JDOMappingLoader
- extends MappingLoader
A JDO implementation of mapping helper. Creates JDO class descriptors
from the mapping file.
- Version:
- $Revision: 1.24 $ $Date: 2001/10/29 23:58:26 $
- Author:
- Assaf Arkin
Constructor Summary |
JDOMappingLoader(java.lang.ClassLoader loader,
java.io.PrintWriter logWriter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDOMappingLoader
public JDOMappingLoader(java.lang.ClassLoader loader,
java.io.PrintWriter logWriter)
createDescriptor
protected ClassDescriptor createDescriptor(ClassMapping clsMap)
throws MappingException
- Description copied from class:
MappingLoader
- Creates a new descriptor. The class mapping information is used
to create a new stock
ClassDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
- Overrides:
createDescriptor
in class MappingLoader
- Parameters:
clsMap
- The class mapping information
- Throws:
MappingException
- An exception indicating why mapping for
the class cannot be created
getTypeInfo
protected TypeInfo getTypeInfo(java.lang.Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap)
throws MappingException
- Overrides:
getTypeInfo
in class MappingLoader
- Throws:
MappingException
createFieldDesc
protected FieldDescriptor createFieldDesc(java.lang.Class javaClass,
FieldMapping fieldMap)
throws MappingException
- Description copied from class:
MappingLoader
- Creates a single field descriptor. The field mapping is used to
create a new stock
FieldDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
- Overrides:
createFieldDesc
in class MappingLoader
- Parameters:
javaClass
- The class to which the field belongsfieldMap
- The field mapping information
- Returns:
- The field descriptor
- Throws:
MappingException
- The field or its accessor methods are not
found, not accessible, not of the specified type, etc
loadMapping
public void loadMapping(MappingRoot mapping,
java.lang.Object param)
throws MappingException
- Description copied from class:
MappingLoader
- Loads the mapping from the specified mapping object. Calls
MappingLoader.createDescriptor(org.exolab.castor.mapping.xml.ClassMapping)
to create each descriptor and MappingLoader.addDescriptor(org.exolab.castor.mapping.ClassDescriptor)
to store it. Also loads all the included mapping
files.
- Overrides:
loadMapping
in class MappingLoader
- Parameters:
mapping
- The mapping informationparam
- Arbitrary parameter that can be used by subclasses
- Throws:
MappingException
- The mapping file is invalid
Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com