Package org.springframework.data.solr.core

Examples of org.springframework.data.solr.core.SolrTemplate.afterPropertiesSet()


  private SolrTemplate createTemplate(SolrServer solrServer) {

    SolrTemplate template = new SolrTemplate(solrServer);
    addSchemaCreationFeaturesIfEnabled(template);
    template.afterPropertiesSet();
    return template;
  }

  @Override
  public <T, ID extends Serializable> SolrEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) {
View Full Code Here


      if (this.solrOperations.getConverter() != null) {
        template.setMappingContext(this.solrOperations.getConverter().getMappingContext());
      }
      template.setSolrCore(SolrServerUtils.resolveSolrCoreName(metadata.getDomainType()));
      addSchemaCreationFeaturesIfEnabled(template);
      template.afterPropertiesSet();
      operations = template;
    }

    SimpleSolrRepository repository = new SimpleSolrRepository(getEntityInformation(metadata.getDomainType()),
        operations);
View Full Code Here

    EmbeddedSolrServerFactory factory = new EmbeddedSolrServerFactory(ResourceUtils.getURL(
        "classpath:org/springframework/data/solr").getPath());

    SolrTemplate template = new SolrTemplate(factory);
    template.afterPropertiesSet();
    return template;
  }

  @PreDestroy
  public void shutdown() {
View Full Code Here

  @Test(expected = IllegalArgumentException.class)
  public void testGetRepositoryOfUnmanageableType() {

    SolrTemplate template = new SolrTemplate(new HttpSolrServer("http://solrserver:8983/solr"), null);
    template.afterPropertiesSet();
    new SolrRepositoryFactory(template).getRepository(UnmanagedEntityRepository.class);
  }

  @SuppressWarnings("unchecked")
  private void initMappingContext() {
View Full Code Here

  private SolrRepositoryFactory factory;

  @Before
  public void setUp() {
    SolrTemplate template = new SolrTemplate(new HttpSolrServerFactory(solrServer));
    template.afterPropertiesSet();
    factory = new SolrRepositoryFactory(template);
  }

  @After
  public void tearDown() throws SolrServerException, IOException {
View Full Code Here

  @Before
  public void setUp() {
    repository = new ExampleSolrBeanRepository();
    SolrTemplate template = new SolrTemplate(solrServer, null);
    template.afterPropertiesSet();
    repository.setSolrOperations(template);
  }

  @Test
  public void testBeanLifecyle() {
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.