jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: [ocm] mapping selection
Date Wed, 26 Sep 2007 07:25:34 GMT
Right now, I don't see a problem. That looks even better . Can you check if
the different possiblities are cover in the unit tests ?


On 9/26/07, Felix Meschberger <fmeschbe@gmail.com> wrote:
> Hi,
> When a node is mapped by calling the ObjectConverter.getObject(Session,
> Class, String) method and no discriminator property is configured the
> ObjectConverterImpl class tries to find a "best" mapping for the
> effective node. This is done by walking the class descriptor hierarchy
> starting at the descriptor for the selected class until a mapping for
> the node type is found.
> In case the class descriptor hierarchy is incomplete because an
> improperly defined class descriptor would actually perfectly map the
> node but is not declared to extend (or implement) its parent
> classes/interfaces, the hierarchy walk down will not find the mapping
> and thus in the end, the originally requested class will be
> instantiated. If the class is abstract or an interface this of course
> fails.
> If an exact class descriptor for the node type would be looked up
> directly, the mapping might be found immediately and the class of the
> descriptor can be verified it actually is assignement compatible with
> the requested class. If this would fail, we could still walk the
> hierarchy to see, whether we find another classdescriptor. What do you
> think of this modification to the algorithm ?
> Regards
> Felix

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message