incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <christophe.lomb...@gmail.com>
Subject Re: [jira] Updated: (GRFT-34) An initial code base for the mapping project.
Date Sun, 17 Jul 2005 09:12:14 GMT
2005/7/16, Oliver Kiessler <oliver.kiessler@gmail.com>:
> hi,
> 
> > first of all thank you for the valuable feedback.
> > What is the general feeling about this initial version?
> > Are we heading in the right direction?
> 
> I think the initial version is a little too complex. I would prefer a
> much simpler initial solution as christophe stated (simplified xml
> mapping syntax).
> 
> I'd prefer something like this (it's just pseudo xml...):
> 
> <class name="my.app.Test" jcrNodeType="graffito:Test">
>     <property name="myStringProperty" />
>     <property name="myComplexObject"
> jcrChildNodeType="graffito:myComplexObject" ... />
> </class>
> 
> <class name="my.app.MyComplexObject" jcrNodeType="graffito:myComplexObject">
>     <property name="myIntValue" jcrPropertyType="jcr:long" ... />
> 
> ....
> 
> </class>
>

Personnaly, I'm +1 with your idea. getter/setter are not necessary. I
prefer to use the bean properties directly. Sandro, when do you want
to use getter/setter instead of properties ?

 
> java class => jcr node
> java class property (primitive and String) => jcr property
> java class complex property (bean) => jcr child node with jcr properties
    (1) or a reference using a JCR ID. Eg. a Document can have a
ParentFolder property but this property is not a Document child node.
Is it make sense for you ?

> java class array property (primitive and String) => jcr multivalued property
> java class array property (bean) => jcr child node with n jcr child nodes
    Same idea as (1)

> java class collection property (bean) => jcr child node with n jcr child nodes
> 
    Same idea as (1)

In my point of view, an association tag is needed to make references
to a JCR node somewhere.

> I think we should go for an "convention over configuration" approach.
> Why specify that a java class property of type String maps to a jcr
> string property (we can use reflection to find out property
> types....)? You know what I mean? One should only add this information
> if it's break the convention.
> 
> > If nobody completely disagrees with it, I would try to get a solution
> > for the JAXB
> > issue on the basis of a general consensus.
> 
> -1 for JAXB
> 
> +1 for Commons-beanutils or XmlBeans (they have just released a new version 2.0)
Is it necessary to use xmlBeans ? Digester is not sufficiant. it is
quite simple to use.


> 
> > If that is finished I would like to integrate the suggestions in the
> > code base
> > and commit it in a new branch.
> 
> +1
> 
> regards,
> oliver
>

Mime
View raw message