jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tako Schotanus" <quinte...@gmail.com>
Subject Re: 3.1.3.1 Removing Items
Date Mon, 23 Jul 2007 21:59:02 GMT
On 7/23/07, Mark Waschkowski <mwaschkowski@gmail.com> wrote:
>
> Hi Alexandru,
>
>
> Quite obviously, the java language supports any object variables being set
> to null, and the some of the apis also supports setting of null values,
> for
> example: http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html.
> The
> key is not removed, just the value.


I'm don't think you can compare the two, a HashMap is a completely different
beast from a JCR.
A HashMap imposes no restrictions on the data that can be stored inside it
for one thing.
What would you do with a mandatory property for example?
Will you allow it to contain a null value? I think not because I would
expect a mandatory property to hold a "real" value.
But if it can't contain null isn't it in fact exactly the same as not having
the property at all?
By definition you'd have to extend this idea to non-mandatory properties as
well because if we think the current situation (where setValue(null) is the
same as a remove()) is confusing think about a system where mandatory and
non-mandatory items have different semantics!

Cheers,
 -Tako

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message