Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.exolab.castor.mapping.loader.AbstractMappingLoader2
org.exolab.castor.mapping.loader.AbstractMappingLoader
org.exolab.castor.jdo.engine.JDOMappingLoader
public final class JDOMappingLoader
extends AbstractMappingLoader
Nested Class Summary |
Nested classes/interfaces inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader | |
AbstractMappingLoader.TypeInfoReference |
Field Summary |
Fields inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader | |
EMPTY_ARGS , STRING_ARG , VALUE_OF |
Constructor Summary | |
|
Method Summary | |
protected ClassDescriptor |
|
protected AbstractFieldDescriptor |
|
static String |
|
static String |
|
protected FieldDescriptor |
|
BindingType | |
protected String[] |
|
protected TypeInfo |
|
void |
|
protected void |
|
Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader | |
checkFieldNameDuplicates , createClassDescriptor , createClassDescriptors , createFieldDesc , createFieldDescriptors , createFieldHandler , createFieldHandlers , divideFieldDescriptors , findAccessor , getDepended , getExtended , getIdColumnIndex , getIdentityColumnNames , getInternalContext , getOrigin , getSourceType , getTypeInfo , isPrimitive , loadMapping , resolveRelations , resolveType , setInternalContext |
Methods inherited from class org.exolab.castor.mapping.loader.AbstractMappingLoader2 | |
addDescriptor , clear , descriptorIterator , getClassLoader , getDescriptor , isAllowRedefinition , loadMapping , setAllowRedefinitions , setClassLoader |
public JDOMappingLoader(ClassLoader loader)
Constructs a new mapping helper. This constructor is used by a derived class.
- Parameters:
loader
- The class loader to use, null for the default
protected ClassDescriptor createClassDescriptor(ClassMapping clsMap) throws MappingException
- Overrides:
- createClassDescriptor in interface AbstractMappingLoader
protected AbstractFieldDescriptor createFieldDesc(Class javaClass, FieldMapping fieldMap) throws MappingException
Creates a single field descriptor. The field mapping is used to create a new stockFieldDescriptor
. Implementations may extend this class to create a more suitable descriptor.
- Overrides:
- createFieldDesc in interface AbstractMappingLoader
- Parameters:
javaClass
- The class to which the field belongs.fieldMap
- 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.
public static String definition2param(String sqlTypeDef)
Extracts parameter for type convertor from the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]". If the type is not parameterized, returns null.
- Parameters:
sqlTypeDef
- SQL type definition (e.g. char[01]).
- Returns:
- Parameter (e.g. "01") or null if not parameterized.
public static String definition2type(String sqlTypeDef)
Extracts SQL type name from the the SQL type definition of the form "SQL_TYPE_NAME[PARAMETER]".
- Parameters:
sqlTypeDef
- SQL type definition (e.g. char[01]).
- Returns:
- SQL type name (e.g. "char").
protected FieldDescriptor findIdentityByName(List fldList, String idName, Class javaClass) throws MappingException
public BindingType getBindingType()
- Specified by:
- getBindingType in interface MappingLoader
protected String[] getSqlTypes(FieldMapping fieldMap)
Parse the sql type attribute to build an array of types, needed to support whitespace inside parameterized types (see Bug 1045).
protected TypeInfo getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException
- Overrides:
- getTypeInfo in interface AbstractMappingLoader
public void loadMapping(MappingRoot mapping, Object param) throws MappingException
- Overrides:
- loadMapping in interface AbstractMappingLoader
protected void resolveRelations(ClassDescriptor clsDesc)
- Overrides:
- resolveRelations in interface AbstractMappingLoader