incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <>
Subject Re: OCM - Inheritance & Interface
Date Fri, 10 Feb 2006 09:59:52 GMT
On 2/9/06, Alexandru Popescu <> wrote:
> #: Christophe Lombart changed the world a bit at a time by saying (astral date: 2/9/2006
10:21 PM) :#

> Considering that the class-descriptor element is quite simple at this moment and that
in Java we
> have only single class inheritance, I would rather see "extends" as an attribute in class-descriptor.


> Another problem that I see at this moment is: when defining a class mapping and considering
> inheritance too, we have to deal with 2 hierarchies: Java hierarchy and also node type
hierarchy. I
> think it is not possible to define a Java hierarchy that is persisted on different/unreleated
> types. What I am trying to say is: if B extends A, B is of type node:b and A is node:a
than node:b
> must inherit from node:a.
Yes, the node type manager (under construction by Oliver) can manage this .

> At the first glance the part about the query should work. Still, I don't see how you
will be able to
> decide after fetching the nodes which object to instantiate: ContentImpl or FolderImpl?
How can you
> decide it? Considering that both classes can be persisted to the same node type, than
I cannot see a
> way to differentiate them. Reading a node property set and deciding upon this if a ContentImpl
> FolderImpl must be initialize is not gonna work.

No, both classes are not persisted to the same node type.
Following my previous example,
Folder is mapped to the node type : graffito:folder
Content is mapped to the node type : graffito:content

both node types inherit from graffito:cmsobject.

Of course, this solution doesn't works with  nt:unstructured.

> > 2/ Interface  : I don't understand why mixin node types should be use.
> > Java interface have not some attributes. So, I don't see how it can be
> > set into the JCR node type hierarchy.
> > I think we can also reuse the extent-class element but more
> > modification in the current code is required. Still thinking about
> > that.
> >
> I am not sure about this point :-S.
> ./alex
> --
> .w( the_mindstorm )p.
> >
> >
> > --
> > Best regards,
> >
> > Christophe
> >

Best regards,


View raw message