Hi,

What about a 'serialization' utility to convert a Node to a Java
object and back? The node type could be anything, for example
nt:unstructured

Something like Apache Commons DB Utils (for JDBC):
http://commons.apache.org/dbutils/apidocs/org/apache/commons/dbutils/BeanProcessor.html

A utility class would be enough: JCRUtils
static <T> T readObject(Node sourceNode, Class<T> javaClass)
static void saveObject(Object javaObject, Node targetNode)

This tool would use reflection and map as many properties as it finds.
Nothing fancy, just enough to avoid hand-written 'serialization'.

Thomas


On 10/22/07, Lars Trieloff <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I do not think OCM is necessary for the type of applications I am
> thinking of building with microsling and it does not adhere too much
> to the nt:unstructured nature of JCR anyway.
>
> regards,
>
> Lars
>
> Am 22.10.2007 um 17:14 schrieb Bertrand Delacretaz:
>
> > Hi,
> >
> > I'm not sure if adding OCM mapping to microsling is worth the effort,
> > given that microsling is targeted at small apps.
> >
> > And more important, that might make understanding microsling quite
> > harder.
> >
> > Currently, microsling allows for mapped objects via the
> > Resource.getData() method.
> >
> > If we agree that that's enough to allow "big Sling" to use OCM as it
> > does now, I'd suggest dropping the OCM plan for microsling, i.e.
> > closing SLING-76 as "wont' fix".
> >
> > WDYT?
> >
> > -Bertrand
> >
>
>

Reply via email to