jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Esnault <f...@legisway.com>
Subject RE: Query - Row - multivalued properties
Date Wed, 13 Jun 2007 07:21:52 GMT
Thanks, I figured out we had to use the node (saw a post in a mailing list from Jukka Zitting).
What surprises me is that JSR 170 does not allow the getValues(String propName) mechanism.
It's quite heavy imo to get one of the property, get the associated node then get the property

No plan to change this? Am I alone to think this is strange and/or heavy?

Frédéric Esnault - Ingénieur R&D

-----Message d'origine-----
De : Marcel Reutegger [mailto:marcel.reutegger@gmx.net] 
Envoyé : mercredi 13 juin 2007 09:18
À : users@jackrabbit.apache.org
Objet : Re: Query - Row - multivalued properties

Frédéric Esnault wrote:
> How are we supposed to get the property values?

you need to get the node either through the NodeIterator on the QueryResult or 
using the jcr:path column and then retrieve the node using the session. once you 
have the node use node.getProperty(propName).getValues()

> The Row interface proposes the methods :
> getValues() : returns all the values;
> getValue(String prop_name) : return the value of the property name given as a
> parameter.

this is not jackrabbit specific but defined in the jsr 170 specification.


View raw message