Spring Data Solr

org.springframework.data.solr.core.convert
Class SolrJConverter

java.lang.Object
  extended by org.springframework.data.solr.core.convert.SolrConverterBase
      extended by org.springframework.data.solr.core.convert.SolrJConverter
All Implemented Interfaces:
InitializingBean, EntityConverter<SolrPersistentEntity<?>,SolrPersistentProperty,Object,Map<String,?>>, EntityReader<Object,Map<String,?>>, EntityWriter<Object,Map<String,?>>, SolrConverter

public class SolrJConverter
extends SolrConverterBase
implements SolrConverter

Trivial implementation of SolrConverter delegating conversion to DocumentObjectBinder

Author:
Christoph Strobl

Constructor Summary
SolrJConverter()
           
 
Method Summary
 MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> getMappingContext()
           
<R> R
read(Class<R> type, Map<String,?> source)
           
<S,R> List<R>
read(org.apache.solr.common.SolrDocumentList source, Class<R> type)
          Read SolrDocumentList and convert to List of given type
 void write(Object source, Map sink)
           
 
Methods inherited from class org.springframework.data.solr.core.convert.SolrConverterBase
afterPropertiesSet, canConvert, convert, createAndWrite, getConversionService, getCustomConversions, getCustomWriteTargetType, hasCustomReadTarget, hasCustomWriteTarget, hasCustomWriteTarget, isSimpleType, registerCutomConverters, setCustomConversions, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.solr.core.convert.SolrConverter
write
 
Methods inherited from interface org.springframework.data.convert.EntityConverter
getConversionService
 

Constructor Detail

SolrJConverter

public SolrJConverter()
Method Detail

getMappingContext

public MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> getMappingContext()
Specified by:
getMappingContext in interface EntityConverter<SolrPersistentEntity<?>,SolrPersistentProperty,Object,Map<String,?>>

read

public <S,R> List<R> read(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,
                  Map<String,?> source)
Specified by:
read in interface EntityReader<Object,Map<String,?>>

write

public void write(Object source,
                  Map sink)
Specified by:
write in interface EntityWriter<Object,Map<String,?>>

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.