You can also do
node.getProperty("name",default)
e.g.
node.getProperty("name",null)
or
node.getProperty("name","")
to get the default value back instead of an exception.
Am 04.03.2014 um 16:39 schrieb AL Wad <[email protected]>:
> Thank you Chris,
>
>
> So every set should be like
> if (node.hasProperty("propLabel") &&
> node.getProperty("propLabel").equals("propValueToCheck") )
> node.setProperty("propLabel", "whatever");
>
>
> Verbous but no try/catch.
> I'll take that although checking for null is more java
>
> Thank you
>
> Jérôme
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.