Examples of Neo4jMappingContext


Examples of org.springframework.data.neo4j.mapping.Neo4JMappingContext

  Neo4JMappingContext context;

  @Before
  public void setUp() {
    context = new Neo4JMappingContext();
    context.setInitialEntitySet(Collections.singleton(Person.class));
    context.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.data.neo4j.mapping.Neo4JMappingContext

    return aspect;
  }

    @Bean
    public Neo4JMappingContext mappingContext() {
        return new Neo4JMappingContext();
    }
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

  @Bean public Neo4jTemplate neo4jTemplate() throws IOException {
    return new Neo4jTemplate(graphDatabaseService());
  }

  @Bean public Neo4jMappingContext neo4jMappingContext() {
    return new Neo4jMappingContext();
  }
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

    private Neo4jMappingContext mappingContext;
    private Neo4jPersistentEntityImpl<?> personType;

    @Before
    public void setUp() throws Exception {
        mappingContext = new Neo4jMappingContext();
        personType = mappingContext.getPersistentEntity(Person.class);
    }
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

  AuditingEventListener listener;

  @Before
  public void setUp() {

    handler = spy(new IsNewAwareAuditingHandler(new Neo4jMappingContext()));
    listener = new AuditingEventListener(new ObjectFactory<IsNewAwareAuditingHandler>() {

      @Override
      public IsNewAwareAuditingHandler getObject() throws BeansException {
        return handler;
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

    final static String CLASS_NAME = Person.class.getSimpleName();

    @Before
    public void setUp() {
        Neo4jMappingContext context = new Neo4jMappingContext();
        Neo4jTemplate template = Mockito.mock(Neo4jTemplate.class);
        finishMock(template);
        this.query = new CypherQueryBuilder(context, Person.class, template);
        this.trsSpecificExpectedQuery = null;
    }
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

    @Override
    public void afterPropertiesSet() {
        Assert.notNull(template, "Neo4jTemplate must not be null!");

        if (neo4jMappingContext == null) {
            Neo4jMappingContext context = new Neo4jMappingContext();
            context.initialize();
            this.neo4jMappingContext = context;
        }
        setMappingContext(neo4jMappingContext);

        super.afterPropertiesSet();
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

   * @see org.springframework.data.repository.cdi.CdiRepositoryBean#create(javax.enterprise.context.spi.CreationalContext, java.lang.Class)
   */
  @Override
  protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType, Object customImplementation) {

    Neo4jMappingContext neo4jMapCtx = new Neo4jMappingContext();
    Neo4jTemplate neo4jTemplate = new Neo4jTemplate(getDependencyInstance(graphDatabase, GraphDatabase.class));

    GraphRepositoryFactory factory = new GraphRepositoryFactory(neo4jTemplate, neo4jMapCtx);
    return factory.getRepository(repositoryType, customImplementation);
  }
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

    @Override
    public void afterPropertiesSet() {
        try {
        if (this.mappingContext == null) {
            this.mappingContext = new Neo4jMappingContext();
        }
        if (this.isNewStrategyFactory == null) {
            this.isNewStrategyFactory = new MappingContextIsNewStrategyFactory(mappingContext);
        }
        if (this.graphDatabaseService == null && graphDatabase instanceof DelegatingGraphDatabase) {
View Full Code Here

Examples of org.springframework.data.neo4j.support.mapping.Neo4jMappingContext

    Neo4jMappingContext context;
    private VariableContext variableContext;

    @Before
    public void setUp() {
        context = new Neo4jMappingContext();
        context.setInitialEntitySet(Collections.singleton(Person.class));
        context.initialize();
        variableContext = new VariableContext();
    }
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.