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
-
Constructor Summary
ConstructorsConstructorDescriptionMappingSolrConverter(org.springframework.data.mapping.context.MappingContext<? extends SolrPersistentEntity<?>, SolrPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.mapping.context.MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> protected ObjectgetValue(SolrPersistentProperty property, Object source, Object parent) <R> R<S,R> List<R> ReadSolrDocumentListand convert toListof given typeprotected <S> Sread(org.springframework.data.util.TypeInformation<S> targetTypeInformation, org.apache.solr.common.SolrDocumentBase source) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidprotected voidwrite(Object source, org.apache.solr.common.SolrDocumentBase target, SolrPersistentEntity<?> entity) Methods inherited from class org.springframework.data.solr.core.convert.SolrConverterBase
afterPropertiesSet, canConvert, convert, createAndWrite, getConversionService, getCustomConversions, getCustomWriteTargetType, hasCustomReadTarget, hasCustomWriteTarget, hasCustomWriteTarget, isSimpleType, registerCustomConverters, setCustomConversions, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.convert.EntityConverter
getConversionServiceMethods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSetMethods inherited from interface org.springframework.data.solr.core.convert.SolrConverter
write
-
Constructor Details
-
MappingSolrConverter
public MappingSolrConverter(org.springframework.data.mapping.context.MappingContext<? extends SolrPersistentEntity<?>, SolrPersistentProperty> mappingContext)
-
-
Method Details
-
getMappingContext
public org.springframework.data.mapping.context.MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> getMappingContext()- Specified by:
getMappingContextin interfaceorg.springframework.data.convert.EntityConverter<SolrPersistentEntity<?>,SolrPersistentProperty, Object, org.apache.solr.common.SolrDocumentBase>
-
read
Description copied from interface:SolrConverterReadSolrDocumentListand convert toListof given type- Specified by:
readin interfaceSolrConverter- Returns:
- empty list if
source == null || source.isEmpty()
-
read
- Specified by:
readin interfaceorg.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
-
write
- Specified by:
writein interfaceorg.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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-