Package org.springframework.data.elasticsearch.core.mapping

Examples of org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext


  }

  @Test
  public void shouldReturnMappingContextWithWhichItWasInitialized() {
    // given
    MappingContext mappingContext = new SimpleElasticsearchMappingContext();
    MappingElasticsearchConverter converter = new MappingElasticsearchConverter(mappingContext);
    // then
    assertThat(converter.getMappingContext(), is(notNullValue()));
    assertThat(converter.getMappingContext(), is(sameInstance(mappingContext)));
  }
View Full Code Here


  }

  @Test
  public void shouldReturnDefaultConversionService() {
    // given
    MappingElasticsearchConverter converter = new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext());
    // when
    ConversionService conversionService = converter.getConversionService();
    // then
    assertThat(conversionService, is(notNullValue()));
  }
View Full Code Here

  }

  public ElasticsearchTemplate(Client client, ElasticsearchConverter elasticsearchConverter, ResultsMapper resultsMapper) {
    this.client = client;
    this.elasticsearchConverter = (elasticsearchConverter == null) ? new MappingElasticsearchConverter(
        new SimpleElasticsearchMappingContext()) : elasticsearchConverter;
    this.resultsMapper = (resultsMapper == null) ? new DefaultResultMapper(this.elasticsearchConverter.getMappingContext()) : resultsMapper;
  }
View Full Code Here

        this(client, null);
    }

    public ElasticsearchTemplate(Client client, ElasticsearchConverter elasticsearchConverter) {
        this.client = client;
        this.elasticsearchConverter = (elasticsearchConverter == null)? new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext()) : elasticsearchConverter ;
    }
View Full Code Here

    }

    @Test
    public void shouldReturnMappingContextWithWhichItWasInitialized(){
        //given
        MappingContext mappingContext = new SimpleElasticsearchMappingContext();
        MappingElasticsearchConverter converter = new MappingElasticsearchConverter(mappingContext);
        //then
        assertThat(converter.getMappingContext(), is(notNullValue()));
        assertThat(converter.getMappingContext(), is(sameInstance(mappingContext)));
    }
View Full Code Here

    }

    @Test
    public void shouldReturnDefaultConversionService(){
        //given
        MappingElasticsearchConverter converter = new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext());
        //when
        ConversionService conversionService = converter.getConversionService();
        //then
        assertThat(conversionService, is(notNullValue()));
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext

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.