public class MappingCassandraConverter extends AbstractCassandraConverter implements ApplicationContextAware, BeanClassLoaderAware
| Constructor and Description |
|---|
MappingCassandraConverter()
Create a new
MappingCassandraConverter with a CassandraMappingContext. |
MappingCassandraConverter(CassandraMappingContext mappingContext)
Create a new
MappingCassandraConverter with the given CassandraMappingContext. |
| Modifier and Type | Method and Description |
|---|---|
Object |
convertToColumnType(Object obj)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
Object |
convertToColumnType(Object value,
ColumnType columnType)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry |
getCodecRegistry()
Returns the configured
CodecRegistry. |
ColumnTypeResolver |
getColumnTypeResolver()
|
Object |
getId(Object object,
CassandraPersistentEntity<?> entity)
Returns the Id for an entity.
|
CassandraMappingContext |
getMappingContext() |
UserTypeResolver |
getUserTypeResolver()
Returns the configured
UserTypeResolver. |
<R> R |
read(Class<R> type,
Object row) |
<R> R |
readRow(Class<R> type,
com.datastax.oss.driver.api.core.cql.Row row)
Read a
Row into the requested target type. |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setCodecRegistry(com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry codecRegistry)
Sets the
CodecRegistry. |
void |
setUserTypeResolver(UserTypeResolver userTypeResolver)
Sets the
UserTypeResolver. |
void |
write(Object source,
Object sink) |
void |
write(Object source,
Object sink,
CassandraPersistentEntity<?> entity)
|
afterPropertiesSet, getConversionService, getCustomConversions, setCustomConversions, setInstantiatorsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertToColumnTypepublic MappingCassandraConverter()
MappingCassandraConverter with a CassandraMappingContext.public MappingCassandraConverter(CassandraMappingContext mappingContext)
MappingCassandraConverter with the given CassandraMappingContext.mappingContext - must not be null.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setCodecRegistry(com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry codecRegistry)
CodecRegistry.codecRegistry - must not be null.public com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry getCodecRegistry()
CodecRegistry.getCodecRegistry in interface CassandraConverterCodecRegistry.public void setUserTypeResolver(UserTypeResolver userTypeResolver)
UserTypeResolver.userTypeResolver - must not be null.public UserTypeResolver getUserTypeResolver()
UserTypeResolver.UserTypeResolver.public CassandraMappingContext getMappingContext()
getMappingContext in interface CassandraConvertergetMappingContext in interface EntityConverter<CassandraPersistentEntity<?>,CassandraPersistentProperty,Object,Object>public ColumnTypeResolver getColumnTypeResolver()
CassandraConvertergetColumnTypeResolver in interface CassandraConverterColumnTypeResolverpublic <R> R read(Class<R> type, Object row)
read in interface EntityReader<Object,Object>public <R> R readRow(Class<R> type, com.datastax.oss.driver.api.core.cql.Row row)
Row into the requested target type.type - must not be null.row - must not be null.public Object convertToColumnType(Object obj)
CassandraConverterconvertToColumnType in interface CassandraConverterobj - Object to convert; must not be null.public Object convertToColumnType(Object value, ColumnType columnType)
CassandraConverterconvertToColumnType in interface CassandraConvertervalue - Object to convert; must not be null.columnType - ColumnType used to describe the object type; must not be null.public void write(Object source, Object sink)
write in interface EntityWriter<Object,Object>public void write(Object source, Object sink, CassandraPersistentEntity<?> entity)
CassandraConverterwrite in interface CassandraConvertersource - the source, must not be null.sink - must not be null.entity - must not be null.public Object getId(Object object, CassandraPersistentEntity<?> entity)
CassandraConverterId or
PrimaryKey IdMapId for composite PrimaryKeyColumn
Id'sPrimaryKey using a
PrimaryKeyClassgetId in interface CassandraConverterobject - must not be null.entity - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.