public interface CassandraConverter extends EntityConverter<CassandraPersistentEntity<?>,CassandraPersistentProperty,Object,Object>
Modifier and Type | Method and Description |
---|---|
<T> Optional<Object> |
convertToColumnType(Optional<T> obj)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
<T> Optional<Object> |
convertToColumnType(Optional<T> obj,
TypeInformation<?> typeInformation)
Converts the given object into a value Cassandra will be able to store natively in a column.
|
CustomConversions |
getCustomConversions()
Returns the
CustomConversions registered in the CassandraConverter . |
Object |
getId(Object object,
CassandraPersistentEntity<?> entity)
Returns the Id for an entity.
|
CassandraMappingContext |
getMappingContext() |
void |
write(Object source,
Object sink,
CassandraPersistentEntity<?> entity)
|
getConversionService
read
write
CustomConversions getCustomConversions()
CustomConversions
registered in the CassandraConverter
.CustomConversions
.CassandraMappingContext getMappingContext()
getMappingContext
in interface EntityConverter<CassandraPersistentEntity<?>,CassandraPersistentProperty,Object,Object>
Object getId(Object object, CassandraPersistentEntity<?> entity)
Id
or
PrimaryKey
IdMapId
for composite
PrimaryKeyColumn
Id'sPrimaryKey
using a
PrimaryKeyClass
object
- must not be null.entity
- must not be null.<T> Optional<Object> convertToColumnType(Optional<T> obj)
obj
- Object
to convert; must not be null.<T> Optional<Object> convertToColumnType(Optional<T> obj, TypeInformation<?> typeInformation)
obj
- Object
to convert; must not be null.typeInformation
- TypeInformation
used to describe the object type; may be null.void write(Object source, Object sink, CassandraPersistentEntity<?> entity)
source
- the source, may be null.sink
- must not be null.entity
- must not be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.