jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: Assign null to a Date property
Date Sat, 24 May 2008 07:22:04 GMT
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).

BR, Julian

Mime
View raw message