Package org.neo4j.kernel

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


        long node = inserter.createNode( properties );
        persons.add( node, properties );
        indexProvider.shutdown();
        inserter.shutdown();
        GraphDatabaseService graphDb = new EmbeddedGraphDatabase( path );
        Transaction tx = graphDb.beginTx();
        try
        {
            IndexManager indexManager = graphDb.index();
            Assert.assertFalse( indexManager.existsForRelationships( indexName ) );
            Assert.assertTrue( indexManager.existsForNodes( indexName ) );
View Full Code Here


    @Test
    public void testDatabaseLocking()
    {
        assumeTrue( Config.osIsWindows() );
        EmbeddedGraphDatabase db = new EmbeddedGraphDatabase( path );
        Transaction tx = db.beginTx();
        db.createNode();
        tx.success();
        tx.finish();
        assertTrue( new File( path + "\\lock" ).exists() );
        try
View Full Code Here

    public void testMultipleNeos()
    {
        String storePath = getStorePath( "test-neo2" );
        deleteFileOrDirectory( storePath );
        GraphDatabaseService graphDb2 = new EmbeddedGraphDatabase( storePath );
        Transaction tx2 = graphDb2.beginTx();
        getGraphDb().createNode();
        graphDb2.createNode();
        tx2.success();
        tx2.finish();
        graphDb2.shutdown();
View Full Code Here

  public static void main(String[] args) {
    System.out.println("Hello Neo4j!");
//    GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "target/data/test" );
    GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "/Users/trisberg/neo4j/imdb" );
    Transaction tx = graphDb.beginTx();

    tx = graphDb.beginTx();
    try {
      for (Node n : graphDb.getAllNodes()) {
        System.out.print("=> " + n.getId() + " :: ");
View Full Code Here

    System.out.println("Hello Neo4j!");
//    GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "target/data/test" );
    GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "/Users/trisberg/neo4j/imdb" );
    Transaction tx = graphDb.beginTx();

    tx = graphDb.beginTx();
    try {
      for (Node n : graphDb.getAllNodes()) {
        System.out.print("=> " + n.getId() + " :: ");
        for (String s : n.getPropertyKeys()) {
          System.out.print(" : " + s + " = " + n.getProperty(s));
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.