public class MapProperty<ENTITY,KEYFROM,KEYTO,VALUEFROM,VALUETO> extends AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>
| Type | Property and Description |
|---|---|
boolean |
containsUDT |
| Modifier and Type | Field and Description |
|---|---|
boolean |
emptyCollectionIfNull |
boolean |
frozen |
AbstractProperty<ENTITY,KEYFROM,KEYTO> |
keyProperty |
AbstractProperty<ENTITY,VALUEFROM,VALUETO> |
valueProperty |
fieldInfo, fieldName, schemaNameProvider, valueFromTypeToken, valueToTypeToken| Constructor and Description |
|---|
MapProperty(FieldInfo<ENTITY,Map<KEYFROM,VALUEFROM>> fieldInfo,
boolean frozen,
boolean emptyCollectionIfNull,
AbstractProperty<ENTITY,KEYFROM,KEYTO> keyProperty,
AbstractProperty<ENTITY,VALUEFROM,VALUETO> valueProperty) |
| Modifier and Type | Method and Description |
|---|---|
DataType |
buildType(Optional<CassandraOptions> cassandraOptions)
Build the Java driver DataType of this column given a CassandraOptions
containing a runtime SchemaNameProvider.
|
boolean |
containsUDTProperty() |
Map<KEYFROM,VALUEFROM> |
decodeFromGettable(GettableData gettableData)
Decode the given GettableData (Row, UDTValue, ...) to Java value value using Achilles codec system
|
Map<KEYFROM,VALUEFROM> |
decodeFromGettableInternal(GettableData gettableData) |
Map<KEYFROM,VALUEFROM> |
decodeFromRaw(Object o)
Decode the given raw object to Java value value using Achilles codec system
|
Map<KEYFROM,VALUEFROM> |
decodeFromRawInternal(Object o) |
KEYFROM |
decodeSingleKeyElement(KEYTO cassandraValue) |
VALUEFROM |
decodeSingleValueElement(VALUETO cassandraValue) |
void |
encodeFieldToUdt(ENTITY entity,
UDTValue udtValue,
Optional<CassandraOptions> cassandraOptions)
First extract all the values from the given entity
Then encode each of the extracted value into CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
Map<KEYTO,VALUETO> |
encodeFromJavaInternal(Map<KEYFROM,VALUEFROM> map,
Optional<CassandraOptions> cassandraOptions) |
Map<KEYTO,VALUETO> |
encodeFromRawInternal(Object o,
Optional<CassandraOptions> cassandraOptions) |
KEYTO |
encodeSingleKeyElement(KEYFROM javaValue)
Encode the single key element of the map to a CQL-compatible value using Achilles codec system
|
KEYTO |
encodeSingleKeyElement(KEYFROM javaValue,
Optional<CassandraOptions> cassandraOptions)
Encode the single key element of the map to a CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
VALUETO |
encodeSingleValueElement(VALUEFROM javaValue)
Encode the single value element of the map to a CQL-compatible value using Achilles codec system
|
VALUETO |
encodeSingleValueElement(VALUEFROM javaValue,
Optional<CassandraOptions> cassandraOptions)
Encode the single value element of the map to a CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
void |
encodeToSettable(Map<KEYTO,VALUETO> mapTo,
SettableData<?> settableData)
Encode the given Java value to CQL-compatible value using Achilles codec system into the given SettableData (Row, UDTValue ...)
|
List<AbstractUDTClassProperty<?>> |
getUDTClassProperties() |
void |
inject(info.archinnov.achilles.type.factory.BeanFactory factory) |
void |
inject(com.fasterxml.jackson.databind.ObjectMapper mapper) |
void |
inject(info.archinnov.achilles.type.SchemaNameProvider schemaNameProvider) |
void |
inject(UserTypeFactory userTypeFactory,
TupleTypeFactory tupleTypeFactory) |
void |
injectKeyspace(String keyspace) |
void |
injectRuntimeCodecs(Map<info.archinnov.achilles.type.codec.CodecSignature<?,?>,info.archinnov.achilles.type.codec.Codec<?,?>> runtimeCodecs) |
decodeField, encodeField, encodeField, encodeFieldToUdt, encodeFromJava, encodeFromJava, encodeFromRaw, encodeFromRaw, equals, getColumnForSelect, getDataType, getFieldValue, getJavaValue, hashCode, setField, toStringpublic boolean containsUDTProperty
containsUDTProperty in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public final AbstractProperty<ENTITY,KEYFROM,KEYTO> keyProperty
public final AbstractProperty<ENTITY,VALUEFROM,VALUETO> valueProperty
public final boolean frozen
public final boolean emptyCollectionIfNull
public KEYTO encodeSingleKeyElement(KEYFROM javaValue)
javaValue - public KEYTO encodeSingleKeyElement(KEYFROM javaValue, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
javaValue - cassandraOptions - public VALUETO encodeSingleValueElement(VALUEFROM javaValue)
javaValue - public VALUETO encodeSingleValueElement(VALUEFROM javaValue, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
javaValue - cassandraOptions - public void encodeToSettable(Map<KEYTO,VALUETO> mapTo, SettableData<?> settableData)
AbstractPropertyencodeToSettable in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public Map<KEYTO,VALUETO> encodeFromJavaInternal(Map<KEYFROM,VALUEFROM> map, Optional<CassandraOptions> cassandraOptions)
public Map<KEYTO,VALUETO> encodeFromRawInternal(Object o, Optional<CassandraOptions> cassandraOptions)
public Map<KEYFROM,VALUEFROM> decodeFromGettable(GettableData gettableData)
AbstractPropertydecodeFromGettable in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public Map<KEYFROM,VALUEFROM> decodeFromGettableInternal(GettableData gettableData)
public Map<KEYFROM,VALUEFROM> decodeFromRaw(Object o)
AbstractPropertydecodeFromRaw in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public DataType buildType(Optional<CassandraOptions> cassandraOptions)
AbstractProperty
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
public void encodeFieldToUdt(ENTITY entity, UDTValue udtValue, Optional<CassandraOptions> cassandraOptions)
AbstractProperty
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
static method to build such a CassandraOptions instanceencodeFieldToUdt in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public boolean containsUDTProperty()
containsUDTProperty in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public List<AbstractUDTClassProperty<?>> getUDTClassProperties()
getUDTClassProperties in class AbstractProperty<ENTITY,Map<KEYFROM,VALUEFROM>,Map<KEYTO,VALUETO>>public void inject(UserTypeFactory userTypeFactory, TupleTypeFactory tupleTypeFactory)
public void inject(com.fasterxml.jackson.databind.ObjectMapper mapper)
public void inject(info.archinnov.achilles.type.factory.BeanFactory factory)
public void injectRuntimeCodecs(Map<info.archinnov.achilles.type.codec.CodecSignature<?,?>,info.archinnov.achilles.type.codec.Codec<?,?>> runtimeCodecs)
public void injectKeyspace(String keyspace)
Copyright © 2012-2021. All Rights Reserved.