Package org.neo4j.test

Examples of org.neo4j.test.TestGraphDatabaseFactory


* Only for documentation. If you need to change this class, change the code in README.md as well please.
*/
public class JustForDocs {

    private void justForDocs() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase(); //only for demo, use your own persistent one!
        TransactionExecutor executor = new SimpleTransactionExecutor(database);

        executor.executeInTransaction(new VoidReturningCallback() {
            @Override
            public void doInTx(GraphDatabaseService database) {
View Full Code Here


            }
        });
    }

    private void justForDocs2() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase(); //only for demo, use your own persistent one!

        List<String> nodeNames = Arrays.asList("Name1", "Name2", "Name3")//there will be many more

        int batchSize = 10;
        BatchTransactionExecutor executor = new IterableInputBatchTransactionExecutor<>(database, batchSize, nodeNames, new UnitOfWork<String>() {
View Full Code Here

        executor.execute();
    }

    private void justForDocs5() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase(); //only for demo, use your own persistent one!

        BatchTransactionExecutor executor = new IterableInputBatchTransactionExecutor<>(
                database,
                1000,
                new TransactionCallback<Iterable<Node>>() {
View Full Code Here

    }

    public LocalTestServer(String hostname, int port) {
        this.port = port;
        this.hostname = hostname;
        graphDatabase = (GraphDatabaseAPI) new TestGraphDatabaseFactory().newImpermanentDatabase();
    }
View Full Code Here

  private static MatrixDataGraph mdg;
    private Transaction tx;

    @BeforeClass
        public static void beforeClass() {
                graphDb =  new TestGraphDatabaseFactory().newImpermanentDatabase();
                mdg = new MatrixDataGraph(graphDb).createNodespace();
        }
View Full Code Here

            setBasePackage("org.springframework.data.neo4j.repository","org.springframework.data.neo4j.model");
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

            setBasePackage(SimpleTypeArrayEntity.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

            setBasePackage(EnumEntity.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

            setBasePackage(SimpleTypeEntity.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

            setBasePackage(DateEntity.class.getPackage().getName());
        }

        @Bean
        GraphDatabaseService graphDatabaseService() {
            return new TestGraphDatabaseFactory().newImpermanentDatabase();
        }
View Full Code Here

TOP

Related Classes of org.neo4j.test.TestGraphDatabaseFactory

Copyright © 2018 www.massapicom. 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.