incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <>
Subject Re: [jira] Updated: (GRFT-34) An initial code base for the mapping project.
Date Thu, 14 Jul 2005 21:25:16 GMT
2005/7/14, Sandro Böhme <>:
> >Now, I'm reviewing the mapping file (JavaToJcrMapping.xml). Here is my
> >comments :
> >
> >* Why it is necessary to delcare the read/write methods ? Why not to
> >something like that :
> >       <subitemMapping  beanProperty="description"
> >          jcrPropertyDefinition name="graffito:description"
> >"requiredType="jcrString" />
> >
> >      If you have the bean property, it is possible to find the
> >get/set methods.
> >      By this way, it is less verbose. Commons BeanUtil can help to
> >set/get the values.
> >
> >
> The reason was, to be able to map POJO's but I like your idea.
> Also in this matter, I would like to add your idea as an additional
> feature. The user would not need to specify the read/write methods
> and he can specify the bean property instead. Is it ok to leave
> the read/write as an alternative for POJO's in you opinion?

> >* We have to defined some associations tags or another solution to
> >solve the following issue : Eg. In the mapping for CmsObject, there is
> >a subitemMapping entry for the ParentFolder. ParentFolder is not a
> >subitem of CmsObject. In real application, Folder contains a
> >collection of CmsObjects. So, an association tag (with a ID/path) can
> >be interesting for such case. If a javabean propoperty is an object,
> >it can be a subitem or a reference to another object somewhere in the
> >repository (parent node, ...)
> >
> >
> >
> Do you mean a link from a "mapping managed node" to an arbitrary node in
> the repository
> not managed by the mapping framework? What would be the Java
> representation of such a
> node?

No this is not that ! I mean the mapping file is not correct,
ParentFolder is not a subitem of a CmsObject. ParentFolder property is
defined in the CmsObject just to have a reference to its associated
Folder. In fact, it is the inverse situation : a collection of
CmsObject should be defined as Folder subitems. That's why an
association tag can be defined for this kind of  situation.

Another question : How is the mapping file for the following situation : 
A Folder can contains some pages which can contains some articles.


View raw message