org.apache.jackrabbit.ocm.mapper.impl
Class AbstractMapperImpl
java.lang.Object
org.apache.jackrabbit.ocm.mapper.impl.AbstractMapperImpl
- All Implemented Interfaces:
- Mapper
- Direct Known Subclasses:
- AnnotationMapperImpl, DigesterMapperImpl
public abstract class AbstractMapperImpl
- extends Object
- implements Mapper
Abstract class for Mapper
- Author:
- Lombart Christophe
TODO : Add more reference tests. For exemple, the mapper has to check if the class used for the elements
of a collectiondescriptor exists. For performance reasone, we can defined some optional validations.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
descriptorReader
protected DescriptorReader descriptorReader
mappingDescriptor
protected MappingDescriptor mappingDescriptor
rootClassDescriptors
protected Collection rootClassDescriptors
AbstractMapperImpl
public AbstractMapperImpl()
buildMapper
public void buildMapper()
solveReferences
protected List solveReferences(List errors)
validateDescriptors
protected List validateDescriptors(List errors,
Collection classDescriptors)
- Validate all class descriptors.
This method validates the toplevel ancestors and after the descendants.
Otherwise, we can have invalid settings in the class descriptors
- Parameters:
errors
- all errors found during the validation processclassDescriptors
- the ancestor classdescriptors
- Returns:
getErrorMessage
protected String getErrorMessage(List errors)
getClassDescriptorByClass
public ClassDescriptor getClassDescriptorByClass(Class clazz)
- Description copied from interface:
Mapper
- Get the mapping defition to be used for a specific java bean
- Specified by:
getClassDescriptorByClass
in interface Mapper
- Parameters:
clazz
- The java bean class
- Returns:
- The mapping class found for the desired java bean class
- See Also:
Mapper.getClassDescriptorByClass(java.lang.Class)
getClassDescriptorByNodeType
public ClassDescriptor getClassDescriptorByNodeType(String jcrNodeType)
- Description copied from interface:
Mapper
- Get the mapping defition to be used for a specific JCR node type
- Specified by:
getClassDescriptorByNodeType
in interface Mapper
- Parameters:
jcrNodeType
- the jcr node type
- Returns:
- The mapping class found for the desired java bean class
- See Also:
Mapper.getClassDescriptorByNodeType(String)
Copyright © 2004-2008 Apache Software Foundation. All Rights Reserved.