Examples of beginTx()


Examples of org.neo4j.kernel.AbstractGraphDatabase.beginTx()

          tx.commit();
        }
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      graphDb.beginTx();
      count = 0;
    }
    return count;
  }
View Full Code Here

Examples of org.neo4j.kernel.EmbeddedGraphDatabase.beginTx()

    displayRelationship(r05);

    /* Perform selections on the graph database */
    System.out.println("\n*** MEMBERS RELATIONSHIPS SELECTION ***");
    // Use a transaction for selections because it's required by Neo4J...
    Transaction transaction = graphDatabase.beginTx();

    // Find a node according to a property value (search for Tony member)
    System.out.println("** Find a node according to a property value (search for Tony member)");
    Iterable<Node> members = graphDatabase.getAllNodes();
    long tonyId = -1;
View Full Code Here

Examples of org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase.beginTx()

    {
        DbRepresentation someData = createSomeData();
        GraphDatabaseService readGraphDb = new EmbeddedReadOnlyGraphDatabase( PATH );
        assertEquals( someData, DbRepresentation.of( readGraphDb ) );

        Transaction tx = readGraphDb.beginTx();
        try
        {
            readGraphDb.createNode();
        }
        catch ( ReadOnlyDbException e )
View Full Code Here

Examples of org.springframework.data.neo4j.core.GraphDatabase.beginTx()

    assertThat(repository, is(notNullValue()));

    Person person = null;
    Person result = null;

    try (Transaction tx = database.beginTx()) {
      repository.deleteAll();

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.