jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Support for long multivalued properties
Date Fri, 16 Nov 2012 10:35:07 GMT
On 15.11.2012, at 16:30, Lukas Kahwe Smith <mls@pooteeweet.org> wrote:

>> Hm, this looks more like node "var" with properties "foo" set to "bar" and "ding"
set to "dong" to me.
> not really .. the same could be said about any multi valued property otherwise :)
> i guess hash maps are not a common pattern in Java, but they are quite common in scripting

I agree with Felix. Apache Sling has the very nice ValueMap interface [0], which does exactly
that. It's basically a map over the node, writing to properties (and also supporting deep
structures when using "child/one/two/prop" as key).

Also, one should be careful to not abstract away the JCR from the code and do automatic DAO
mappings or language-construct-to-datastore mappings. Because the repository structure should
live and work independent of a specific programming language, as you might want to access
it with other languages as well.

[0] http://sling.apache.org/apidocs/sling5/org/apache/sling/api/resource/ValueMap.html

View raw message