Package org.springframework.data.neo4j.support

Examples of org.springframework.data.neo4j.support.MappingInfrastructureFactoryBean.afterPropertiesSet()


        final EntityTools<Node> nodeEntityTools = new EntityTools<Node>(nodeTypeRepresentationStrategy, nodeEntityStateFactory, nodeEntityInstantiator, mappingContext);
        final EntityTools<Relationship> relationshipEntityTools = new EntityTools<Relationship>(relationshipTypeRepresentationStrategy, relationshipEntityStateFactory, relationshipEntityInstantiator, mappingContext);

        entityPersister = new Neo4jEntityPersister(conversionService, nodeEntityTools, relationshipEntityTools, mappingContext, entityStateHandler);
        mappingContext.afterPropertiesSet();
        factoryBean.afterPropertiesSet();
        return factoryBean.getObject();
    }

    protected void setBasePackage(Neo4jMappingContext mappingContext) throws ClassNotFoundException {
        setBasePackage(mappingContext, getClass().getPackage().getName());
View Full Code Here


    public void testSavingTwiceResultsOnlyInOneTRSCall() throws Exception {
        GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
        ReferenceNodes.obtainReferenceNode(db,"root");
        MappingInfrastructureFactoryBean factoryBean = new MappingInfrastructureFactoryBean(db, null);
        factoryBean.setTypeRepresentationStrategy(TypeRepresentationStrategyFactory.Strategy.SubRef);
        factoryBean.afterPropertiesSet();
        Neo4jTemplate template = new Neo4jTemplate(factoryBean.getObject());
        Transaction tx = db.beginTx();
        Person person = template.save(new Person());
        person.setName("Bar");
        template.save(person);
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.