public interface CassandraConverter extends org.springframework.data.convert.EntityConverter<CassandraPersistentEntity<?>,CassandraPersistentProperty,Object,Object>
| Modifier and Type | Method and Description |
|---|---|
Object |
convertToColumnType(Object value)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
Object |
convertToColumnType(Object value,
ColumnType typeDescriptor)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
default Object |
convertToColumnType(Object value,
org.springframework.data.util.TypeInformation<?> typeInformation)
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
CodecRegistry registered in the CassandraConverter. |
ColumnTypeResolver |
getColumnTypeResolver()
|
org.springframework.data.convert.CustomConversions |
getCustomConversions()
Returns the
CustomConversions for this converter. |
Object |
getId(Object object,
CassandraPersistentEntity<?> entity)
Returns the Id for an entity.
|
CassandraMappingContext |
getMappingContext() |
org.springframework.data.projection.ProjectionFactory |
getProjectionFactory()
Returns the
ProjectionFactory for this converter. |
<R> R |
project(org.springframework.data.projection.EntityProjection<R,?> descriptor,
com.datastax.oss.driver.api.core.cql.Row row)
Apply a projection to
Row and return the projection return type R. |
void |
write(Object source,
Object sink,
CassandraPersistentEntity<?> entity)
|
org.springframework.data.projection.ProjectionFactory getProjectionFactory()
ProjectionFactory for this converter.org.springframework.data.convert.CustomConversions getCustomConversions()
CustomConversions for this converter.com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry getCodecRegistry()
CodecRegistry registered in the CassandraConverter.CodecRegistry.CassandraMappingContext getMappingContext()
getMappingContext in interface org.springframework.data.convert.EntityConverter<CassandraPersistentEntity<?>,CassandraPersistentProperty,Object,Object>ColumnTypeResolver getColumnTypeResolver()
ColumnTypeResolver<R> R project(org.springframework.data.projection.EntityProjection<R,?> descriptor,
com.datastax.oss.driver.api.core.cql.Row row)
Row and return the projection return type R.
Non-projecting descriptors fall back to regular
object materialization.R - descriptor - the projection descriptor, must not be null.row - must not be null.R.@Nullable Object getId(Object object, CassandraPersistentEntity<?> entity)
Id or
PrimaryKey IdMapId for composite PrimaryKeyColumn
Id'sPrimaryKey using a
PrimaryKeyClassobject - must not be null.entity - must not be null.Object convertToColumnType(Object value)
value - Object to convert; must not be null.default Object convertToColumnType(Object value, org.springframework.data.util.TypeInformation<?> typeInformation)
value - Object to convert; must not be null.typeInformation - TypeInformation used to describe the object type; must not be null.Object convertToColumnType(Object value, ColumnType typeDescriptor)
value - Object to convert; must not be null.typeDescriptor - ColumnType used to describe the object type; must not be null.void write(Object source, Object sink, CassandraPersistentEntity<?> entity)
source - the source, must not be null.sink - must not be null.entity - must not be null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.