jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Row (Queryresult) vs. Multivalue properties
Date Wed, 23 Feb 2011 15:00:50 GMT
On 23.02.11 15:12, "Seidel. Robert" <Robert.Seidel@aeb.de> wrote:
>I'm missing a public Value[] getValues(String columnName) method at the
>row interface. To get the values from a multivalue property I have to go
>over the node, get the property and cann then access the values.
>Is this work as intended or were the multi value properties simply not
>considered when designing the Row interface?

IIUC, the row interface was designed for a simpler SQL-like result, which
only knows single-values (simpler because you don't have to "worry" about
the Node interface). It basically just wraps Nodes in a simpler way. This
makes sense for Xpath and SQL-1 queries, where you'd typically use the
getNodes() NodeIterator with Xpath and getRows() with SQL.

Thus one could think that getNodes() is "superior", however, practically,
there are some virtual results, such as the jackrabbit-specific
"rep:excerpt", which you will only find in the row-based results. Also,
with JCR 2.0 and SQL-2, you can have multiple subresults based on the
selectors, and you can only read them out via the Rows

Hence for full feature completeness you'd get the rows, and get the
underlying Node via getNode()/getNode(selector), if your queries require
access to both.


Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel

View raw message