Package org.springframework.data.neo4j.support.schema

Examples of org.springframework.data.neo4j.support.schema.SchemaIndexProvider


                    }
                });
        factoryBean.setNodeEntityStateFactory(nodeEntityStateFactory);
        factoryBean.setRelationshipEntityStateFactory(relationshipEntityStateFactory);

        mappingContext.setEntityIndexCreator(new DefaultEntityIndexCreator(new IndexProviderImpl(graphDatabase), new SchemaIndexProvider(graphDatabase),true));
        mappingContext.setSimpleTypeHolder(null);
        setBasePackage(mappingContext);

        nodeEntityInstantiator = new NodeEntityInstantiator(entityStateHandler);
        relationshipEntityInstantiator = new RelationshipEntityInstantiator(entityStateHandler);
View Full Code Here


        }
    }

    @Test
    public void mergeNode() throws Exception {
        new SchemaIndexProvider(graphDatabase).createIndex("user","name",true);
        try (Transaction tx = graphDatabase.beginTx()) {
            final Node node = graphDatabase.merge("user", "name", "David", map("name", "David"), null);
            final Node node2 = graphDatabase.merge("user", "name", "David", map("name", "David"), null);
            assertEquals("David",node.getProperty("name"));
            assertEquals(node,node2);
View Full Code Here

        }
    }

    @Test
    public void mergeNodeWithLabel() throws Exception {
        new SchemaIndexProvider(graphDatabase).createIndex("user","name",true);
        try (Transaction tx = graphDatabase.beginTx()) {
            final Node node = graphDatabase.merge("user", "name", "David", map("name", "David"), asList("person"));
            assertEquals("David",node.getProperty("name"));
            assertEquals(2, IteratorUtil.count(node.getLabels()));
            for (Label label : node.getLabels()) {
View Full Code Here

    private ResultConverter resultConverter;
    private SchemaIndexProvider schemaIndexProvider;

    public SpringCypherRestGraphDatabase(RestAPI api){
      super(api);
        schemaIndexProvider = new SchemaIndexProvider(this);
    }
View Full Code Here

    private ResultConverter resultConverter;
    private SchemaIndexProvider schemaIndexProvider;

    public SpringRestGraphDatabase( RestAPI api){
      super(api);
        schemaIndexProvider = new SchemaIndexProvider(this);
    }
View Full Code Here

        this(delegate,null);
    }
    public DelegatingGraphDatabase(final GraphDatabaseService delegate, ResultConverter resultConverter) {
        this.delegate = delegate;
        this.resultConverter = resultConverter;
        this.schemaIndexProvider = new SchemaIndexProvider(this);
    }
View Full Code Here

            this.resultConverter = new EntityResultConverter<Object, Object>(conversionService);
        }
        this.graphDatabase.setResultConverter(resultConverter);
        this.cypherQueryExecutor = new CypherQueryExecutor(graphDatabase.queryEngine(resultConverter));
        if (schemaIndexProvider == null) {
            schemaIndexProvider = new SchemaIndexProvider(graphDatabase);
        }
        if (this.indexProvider == null) {
            this.indexProvider = new IndexProviderImpl(graphDatabase);
        }
        if (this.typeSafetyPolicy == null) {
View Full Code Here

        return new IndexProviderImpl(graphDatabase());
    }

    @Bean
    public SchemaIndexProvider schemaIndexProvider() throws Exception {
        return new SchemaIndexProvider(graphDatabase());
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.support.schema.SchemaIndexProvider

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.