MappingLoader
public final class JDOMappingLoader extends AbstractMappingLoader
AbstractMappingLoader.TypeInfoReference
EMPTY_ARGS, NAME, STRING_ARG, VALUE_OF
Constructor | Description |
---|---|
JDOMappingLoader(java.lang.ClassLoader loader) |
Creates an instance of
JDOMappingLoader , providing a
ClassLoader instance. |
Modifier and Type | Method | Description |
---|---|---|
protected ClassDescriptor |
createClassDescriptor(ClassMapping classMapping) |
|
protected FieldDescriptorImpl |
createFieldDesc(java.lang.Class javaClass,
FieldMapping fieldMap) |
Creates a single field descriptor.
|
static java.lang.String |
definition2param(java.lang.String sqlTypeDef) |
Extracts parameter for type convertor from the SQL type definition of the
form "SQL_TYPE_NAME[PARAMETER]".
|
static java.lang.String |
definition2type(java.lang.String sqlTypeDef) |
Extracts SQL type name from the the SQL type definition of the form
"SQL_TYPE_NAME[PARAMETER]".
|
protected FieldDescriptor |
findIdentityByName(java.util.List<FieldDescriptor> fldList,
java.lang.String idName,
java.lang.Class javaClass) |
|
BindingType |
getBindingType() |
|
protected java.lang.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(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) |
Walks through all fields of a descriptor and resolves relation
ClassDescriptor s by using mapping information or, if not
present, resolution by file to support generated
ClassDescriptor s. |
checkFieldNameDuplicates, createClassDescriptors, createFieldDescriptors, createFieldHandler, createFieldHandlers, divideFieldDescriptors, findAccessor, getDepended, getExtended, getIdColumnIndex, getIdentityColumnNames, getInternalContext, getOrigin, getSourceType, isPrimitive, resolveType, setInternalContext
addDescriptor, clear, getClassLoader, getDescriptor, getDescriptors, isAllowRedefinition, loadMapping, setAllowRedefinitions, setClassLoader
public JDOMappingLoader(java.lang.ClassLoader loader)
JDOMappingLoader
, providing a
ClassLoader
instance.loader
- A Custom ClassLoader
instance.public static java.lang.String definition2param(java.lang.String sqlTypeDef)
sqlTypeDef
- SQL type definition (e.g. char[01]).public static java.lang.String definition2type(java.lang.String sqlTypeDef)
sqlTypeDef
- SQL type definition (e.g. char[01]).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
MappingException
protected FieldDescriptor findIdentityByName(java.util.List<FieldDescriptor> fldList, java.lang.String idName, java.lang.Class javaClass) throws MappingException
MappingException
protected void resolveRelations(ClassDescriptor clsDesc)
ClassDescriptor
s by using mapping information or, if not
present, resolution by file to support generated
ClassDescriptor
s. Resolved ClassDescriptor
s will be
set as a field's descriptor.resolveRelations
in class AbstractMappingLoader
clsDesc
- The ClassDescriptor in focus.protected java.lang.String[] getSqlTypes(FieldMapping fieldMap)
protected TypeInfo getTypeInfo(java.lang.Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException
getTypeInfo
in class AbstractMappingLoader
MappingException
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.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com