You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by fa...@finantix.com on 2003/01/16 17:36:24 UTC
Question: interfaces as persistent classes with multiple inheritance and
associations
Hi all,
I hope that this has not been asked before, by searching on the list
I didn't find so far a similar question in the previous messages.
I have a business model (UML) where multiple inheritance is widely
used. In Java, business objects are represented as interfaces (they
can optimally reflect the multiple inheritance hierarchy) and the classes
of the persistence model that implements them are using delegation.
Java interfaces have JavaBean-style get/set properties that
correspond to data and to associations with other interfaces.
Reading docs I can understand that "persistent" interfaces are possible
in OJB, but is it possible to describe this multiple inheritance graph?
How should it be mapped? Should I put an "extent" element naming
the derived interface in each of inherited interfaces descriptors?
Thanks in advance for any replies.
Fabio T.
Re: Question: interfaces as persistent classes with multiple inheritance
and associations
Posted by Thomas Mahler <th...@apache.org>.
Hi Fabio,
fabio.tudone@finantix.com wrote:
> Hi all,
>
> I hope that this has not been asked before, by searching on the list
> I didn't find so far a similar question in the previous messages.
>
> I have a business model (UML) where multiple inheritance is widely
> used. In Java, business objects are represented as interfaces (they
> can optimally reflect the multiple inheritance hierarchy) and the classes
> of the persistence model that implements them are using delegation.
>
> Java interfaces have JavaBean-style get/set properties that
> correspond to data and to associations with other interfaces.
>
> Reading docs I can understand that "persistent" interfaces are possible
> in OJB, but is it possible to describe this multiple inheritance graph?
You are lucky. The <extent> tag allows to define such a graph!
> How should it be mapped? Should I put an "extent" element naming
> the derived interface in each of inherited interfaces descriptors?
correct!
cheers,
Thomas
>
> Thanks in advance for any replies.
>
> Fabio T.
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>