org.springframework.data.gemfire.mapping
Class MappingPdxSerializer

java.lang.Object
  extended by org.springframework.data.gemfire.mapping.MappingPdxSerializer
All Implemented Interfaces:
com.gemstone.gemfire.pdx.PdxSerializer, Aware, ApplicationContextAware

public class MappingPdxSerializer
extends Object
implements com.gemstone.gemfire.pdx.PdxSerializer, ApplicationContextAware

PdxSerializer implementation that uses a GemfireMappingContext to read and write entities.


Constructor Summary
MappingPdxSerializer(GemfireMappingContext mappingContext, ConversionService conversionService)
          Creates a new MappingPdxSerializer using the given GemfireMappingContext and ConversionService.
 
Method Summary
 Object fromData(Class<?> type, com.gemstone.gemfire.pdx.PdxReader reader)
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setGemfireInstantiators(Map<Class<?>,org.springframework.data.convert.EntityInstantiator> gemfireInstantiators)
          Configures the EntityInstantiators to be used to create the instances to be read.
 boolean toData(Object value, com.gemstone.gemfire.pdx.PdxWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingPdxSerializer

public MappingPdxSerializer(GemfireMappingContext mappingContext,
                            ConversionService conversionService)
Creates a new MappingPdxSerializer using the given GemfireMappingContext and ConversionService.

Parameters:
mappingContext - must not be null.
conversionService - must not be null.
Method Detail

setGemfireInstantiators

public void setGemfireInstantiators(Map<Class<?>,org.springframework.data.convert.EntityInstantiator> gemfireInstantiators)
Configures the EntityInstantiators to be used to create the instances to be read.

Parameters:
gemfireInstantiators - must not be null.

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

fromData

public Object fromData(Class<?> type,
                       com.gemstone.gemfire.pdx.PdxReader reader)
Specified by:
fromData in interface com.gemstone.gemfire.pdx.PdxSerializer

toData

public boolean toData(Object value,
                      com.gemstone.gemfire.pdx.PdxWriter writer)
Specified by:
toData in interface com.gemstone.gemfire.pdx.PdxSerializer