Class MappingSolrConverter

java.lang.Object
org.springframework.data.solr.core.convert.SolrConverterBase
org.springframework.data.solr.core.convert.MappingSolrConverter
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.data.convert.EntityConverter<SolrPersistentEntity<?>,SolrPersistentProperty,Object,org.apache.solr.common.SolrDocumentBase>, org.springframework.data.convert.EntityReader<Object,org.apache.solr.common.SolrDocumentBase>, org.springframework.data.convert.EntityWriter<Object,org.apache.solr.common.SolrDocumentBase>, SolrConverter

public class MappingSolrConverter extends SolrConverterBase implements SolrConverter, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Implementation of SolrConverter to read/write SolrDocument/ SolrInputDocument.
  • Constructor Details

  • Method Details

    • getMappingContext

      public org.springframework.data.mapping.context.MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> getMappingContext()
      Specified by:
      getMappingContext in interface org.springframework.data.convert.EntityConverter<SolrPersistentEntity<?>,SolrPersistentProperty,Object,org.apache.solr.common.SolrDocumentBase>
    • read

      public <S, R> List<R> read(@Nullable org.apache.solr.common.SolrDocumentList source, Class<R> type)
      Description copied from interface: SolrConverter
      Read SolrDocumentList and convert to List of given type
      Specified by:
      read in interface SolrConverter
      Returns:
      empty list if source == null || source.isEmpty()
    • read

      public <R> R read(Class<R> type, org.apache.solr.common.SolrDocumentBase source)
      Specified by:
      read in interface org.springframework.data.convert.EntityReader<Object,org.apache.solr.common.SolrDocumentBase>
    • read

      @Nullable protected <S> S read(org.springframework.data.util.TypeInformation<S> targetTypeInformation, @Nullable org.apache.solr.common.SolrDocumentBase source)
    • getValue

      @Nullable protected Object getValue(SolrPersistentProperty property, Object source, Object parent)
    • write

      public void write(Object source, org.apache.solr.common.SolrDocumentBase target)
      Specified by:
      write in interface org.springframework.data.convert.EntityWriter<Object,org.apache.solr.common.SolrDocumentBase>
    • write

      protected void write(Object source, org.apache.solr.common.SolrDocumentBase target, SolrPersistentEntity<?> entity)
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException