Class AbstractCassandraConverter
java.lang.Object
org.springframework.data.cassandra.core.convert.AbstractCassandraConverter
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,CassandraConverter
,org.springframework.data.convert.EntityConverter<CassandraPersistentEntity<?>,
,CassandraPersistentProperty, Object, Object> org.springframework.data.convert.EntityReader<Object,
,Object> org.springframework.data.convert.EntityWriter<Object,
Object>
- Direct Known Subclasses:
MappingCassandraConverter
public abstract class AbstractCassandraConverter
extends Object
implements CassandraConverter, org.springframework.beans.factory.InitializingBean
Base class for
CassandraConverter
implementations. Sets up a ConversionService
and populates basic
converters.- Author:
- Alex Shvid, Matthew T. Adams, Mark Paluch
- See Also:
-
InitializingBean
CassandraConverter
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCassandraConverter
(org.springframework.core.convert.ConversionService conversionService) Create a newAbstractCassandraConverter
using the givenConversionService
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
org.springframework.core.convert.ConversionService
org.springframework.data.convert.CustomConversions
Returns theCustomConversions
for this converter.void
setCustomConversions
(org.springframework.data.convert.CustomConversions conversions) Registers the given custom conversions with the converter.void
setInstantiators
(org.springframework.data.mapping.model.EntityInstantiators instantiators) RegistersEntityInstantiators
to customize entity instantiation.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.cassandra.core.convert.CassandraConverter
convertToColumnType, convertToColumnType, convertToColumnType, getCodecRegistry, getColumnTypeResolver, getId, getMappingContext, getProjectionFactory, project, write
Methods inherited from interface org.springframework.data.convert.EntityReader
read
Methods inherited from interface org.springframework.data.convert.EntityWriter
write
-
Constructor Details
-
AbstractCassandraConverter
protected AbstractCassandraConverter(org.springframework.core.convert.ConversionService conversionService) Create a newAbstractCassandraConverter
using the givenConversionService
.
-
-
Method Details
-
setInstantiators
public void setInstantiators(org.springframework.data.mapping.model.EntityInstantiators instantiators) RegistersEntityInstantiators
to customize entity instantiation.- Parameters:
instantiators
- must not be null.
-
getConversionService
public org.springframework.core.convert.ConversionService getConversionService()- Specified by:
getConversionService
in interfaceorg.springframework.data.convert.EntityConverter<CassandraPersistentEntity<?>,
CassandraPersistentProperty, Object, Object>
-
setCustomConversions
public void setCustomConversions(org.springframework.data.convert.CustomConversions conversions) Registers the given custom conversions with the converter. -
getCustomConversions
public org.springframework.data.convert.CustomConversions getCustomConversions()Description copied from interface:CassandraConverter
Returns theCustomConversions
for this converter.- Specified by:
getCustomConversions
in interfaceCassandraConverter
- Returns:
- will never be null.
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-