code: private void createUUIDConstraint() {
  
  		// add UUID uniqueness constraint
  		try (final Session session = driver.session()) {
  
  			// this call may fail silently (e.g. if the index does not exist yet)
  			try (final org.neo4j.driver.v1.Transaction tx = session.beginTransaction()) {
  
  				tx.run("DROP INDEX ON :NodeInterface(id)");
  				tx.success();
  
  			} catch (Throwable t) { }
  
  			// this call may NOT fail silently, hence we don't catch any exceptions
  			try (final org.neo4j.driver.v1.Transaction tx = session.beginTransaction()) {
  
  				tx.run("CREATE CONSTRAINT ON (node:NodeInterface) ASSERT node.id IS UNIQUE");
  				tx.success();
  			}
  		}
  	}
docs: ----- private methods -----