jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Assign null to a Date property
Date Sat, 24 May 2008 07:32:50 GMT
On 5/24/08, Julian Reschke <julian.reschke@gmx.de> wrote:
> Tobias Bocanegra wrote:
>
> > ...
> > // writing the property:
> > if (date == null) {
> >  if (node.hasProperty("xyz")) {
> >    node.getProperty("xyz").remove();
> >  }
> > } else {
> >   node.setProperty("xyz", date);
> > }
> >
>  > ...
>
>  ...which is equivalent to:
>
>   node.setProperty("xyz", date);
>
>  (yes, for date==null the property is removed).
oh yes, right.
thanks for clarifying this.

regards, toby

Mime
View raw message