Package org.springframework.data.neo4j.support

Examples of org.springframework.data.neo4j.support.Infrastructure


    @Before
    public void setUp() throws Exception {
        // todo cleanup !!
        mappingContext = new Neo4jMappingContext();
        Infrastructure infrastructure = createInfrastructure(mappingContext);
        template = new Neo4jTemplate(infrastructure);
        conversionService = template.getConversionService();


        tx = template.getGraphDatabase().beginTx();
View Full Code Here


        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        try (Transaction tx = db.beginTx()) {
            AutoIndexer<Node> nodeAutoIndexer = db.index().getNodeAutoIndexer();
            nodeAutoIndexer.setEnabled(true);
            nodeAutoIndexer.startAutoIndexingProperty("foo");
            Infrastructure infrastructure = MappingInfrastructureFactoryBean.createDirect(db, null);
            Node node = db.createNode();
            node.setProperty("foo", "bar");
            infrastructure.getEntityRemover().remove(node);
            node = db.createNode();
            node.setProperty("foo", "bar");
            infrastructure.getGraphDatabase().remove(node);
            tx.success();
        }
    }
View Full Code Here

        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        try (Transaction tx = db.beginTx()) {
            AutoIndexer<Relationship> autoIndexer = db.index().getRelationshipAutoIndexer();
            autoIndexer.setEnabled(true);
            autoIndexer.startAutoIndexingProperty("foo");
            Infrastructure infrastructure = MappingInfrastructureFactoryBean.createDirect(db, null);
            final Node node = db.createNode();

            Relationship relationship = node.createRelationshipTo(node, DynamicRelationshipType.withName("KNOWS"));
            relationship.setProperty("foo", "bar");
            infrastructure.getEntityRemover().remove(relationship);

            relationship = node.createRelationshipTo(node, DynamicRelationshipType.withName("KNOWS"));
            relationship.setProperty("foo", "bar");
            infrastructure.getGraphDatabase().remove(relationship);
            tx.success();
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.support.Infrastructure

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.