jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Strasser <tobias.stras...@gmail.com>
Subject Re: getString for multi-valued properties
Date Sun, 27 Feb 2005 11:59:00 GMT
> Is this a feature or a bug?
this works as specified:

see 6.2.4:
[...]
Property.getValue()
[...]
If this property is multi-valued, this method throws a ValueFormatException

> if (p.getDefinition().isMultiple()) {
>                 Value[] values = p.getValues();
> 
> Is this the way how to do it?
correct.

> Just being curious, why does Value or Property of the "cqfs" implementation
> not implement the "toString()" method for convenience?
in general, the toString() should only be used for debugging purposos,
giving a human readable description about the object. IMO, it should
not modify the state of the object (e.g. read a stream, modify fields)
or throw uncaught exceptions. so the toString() of a value or property
should not return the content of the value if it would modify the
state..

btw: the Value or Property is implemented by the jcr api and
jackrabbit. this has nothing to do with 'cqfs'.

cheers, tobi

-- 
------------------------------------------< tobias.strasser@day.com >---
Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97 
-----------------------------------------------< http://www.day.com >---

Mime
View raw message