title: how to implement getOrCreateNodeWithUniqueFactory method right
body: <p>OK,
  I built the whole program in <a href="http://architects.dzone.com/articles/and-now-something-completely" rel="nofollow">http://architects.dzone.com/articles/and-now-something-completely</a>
  and everything works fine except the function: <code>getOrCreateNodeWithUniqueFactory()</code></p>
  
  <p>(
  its mean when I make a new node without checking whether it already exists then it works but it's not my goal my goal is when the entity exists not to create a new Node.
  )  </p>
  
  <p>so i checked here <a href="http://docs.neo4j.org/chunked/milestone/tutorials-java-embedded-unique-nodes.html#tutorials-java-embedded-unique-get-or-create-with-factory" rel="nofollow">http://docs.neo4j.org/chunked/milestone/tutorials-java-embedded-unique-nodes.html#tutorials-java-embedded-unique-get-or-create-with-factory</a></p>
  
  <p>now i have three options but I like the option of first or second (Cypher and unique constraints or UniqueFactory )</p>
  
  <p>I can not figure out whether all lines of code each example should be in the same scope (same function) or in two separate functions 
  and If necessary in two separate functions, when I call each of them?</p>