Class AbstractCassandraConverter
java.lang.Object
org.springframework.data.cassandra.core.convert.AbstractCassandraConverter
- All Implemented Interfaces:
InitializingBean
,CassandraConverter
,EntityConverter<CassandraPersistentEntity<?>,
,CassandraPersistentProperty, Object, Object> EntityReader<Object,
,Object> EntityWriter<Object,
Object>
- Direct Known Subclasses:
MappingCassandraConverter
public abstract class AbstractCassandraConverter
extends Object
implements CassandraConverter, InitializingBean
Base class for
CassandraConverter
implementations. Sets up a ConversionService
and populates basic
converters.- Author:
- Alex Shvid, Matthew T. Adams, Mark Paluch
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCassandraConverter
(ConversionService conversionService) Create a newAbstractCassandraConverter
using the givenConversionService
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns theCustomConversions
for this converter.void
setCustomConversions
(CustomConversions conversions) Registers the given custom conversions with the converter.void
setInstantiators
(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
Create a newAbstractCassandraConverter
using the givenConversionService
.
-
-
Method Details
-
setInstantiators
RegistersEntityInstantiators
to customize entity instantiation.- Parameters:
instantiators
- must not be null.
-
getConversionService
- Specified by:
getConversionService
in interfaceEntityConverter<CassandraPersistentEntity<?>,
CassandraPersistentProperty, Object, Object>
-
setCustomConversions
Registers the given custom conversions with the converter. -
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 interfaceInitializingBean
-