code: public Node getNodeFromEntity(Object entity, Object key, GraphDatabaseService graphDb, EntityMetadata m,
              boolean isUpdate)
      {
  
          // Construct top level node first, making sure unique ID in the index
          Node node = null;
          if (!isUpdate)
          {
              node = getOrCreateNodeWithUniqueFactory(entity, key, m, graphDb);
          }
          else
          {
  
              node = searchNode(key, m, graphDb, true);
          }
  
          if (node != null)
          {
              populateNodeProperties(entity, m, node);
          }
  
          return node;
      }
docs: Fetches(and converts) {@link Node} instance from Entity object If it's a
  update operation, node is searched and attributes populated Otherwise
  Node is created into database (replacing any existing node) with
  attributes populated
  
  @param id