public class ListProperty<ENTITY,VALUEFROM,VALUETO> extends AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>> implements InjectBeanFactory
| Type | Property and Description |
|---|---|
boolean |
containsUDT |
| Modifier and Type | Field and Description |
|---|---|
boolean |
emptyCollectionIfNull |
boolean |
frozen |
AbstractProperty<ENTITY,VALUEFROM,VALUETO> |
valueProperty |
Class<?> |
valueToClass |
fieldInfo, fieldName, schemaNameProvider, valueFromTypeToken, valueToTypeToken| Constructor and Description |
|---|
ListProperty(FieldInfo<ENTITY,List<VALUEFROM>> fieldInfo,
boolean frozen,
boolean emptyCollectionIfNull,
Class<?> valueToClass,
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() |
List<VALUEFROM> |
decodeFromGettable(GettableData gettableData)
Decode the given GettableData (Row, UDTValue, ...) to Java value value using Achilles codec system
|
List<VALUEFROM> |
decodeFromGettableInternal(GettableData gettableData) |
List<VALUEFROM> |
decodeFromRaw(Object o)
Decode the given raw object to Java value value using Achilles codec system
|
List<VALUEFROM> |
decodeFromRawInternal(Object o) |
VALUEFROM |
decodeSingleElement(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.
|
List<VALUETO> |
encodeFromJavaInternal(List<VALUEFROM> list,
Optional<CassandraOptions> cassandraOptions) |
List<VALUETO> |
encodeFromRawInternal(Object o,
Optional<CassandraOptions> cassandraOptions) |
VALUETO |
encodeSingleElement(VALUEFROM javaValue)
Encode the single element of the list to a CQL-compatible value using Achilles codec system
|
VALUETO |
encodeSingleElement(VALUEFROM javaValue,
Optional<CassandraOptions> cassandraOptions)
Encode the single element of the list to a CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
void |
encodeToSettable(List<VALUETO> valueTos,
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,List<VALUEFROM>,List<VALUETO>>public final Class<?> valueToClass
public final AbstractProperty<ENTITY,VALUEFROM,VALUETO> valueProperty
public final boolean frozen
public final boolean emptyCollectionIfNull
public VALUETO encodeSingleElement(VALUEFROM javaValue)
javaValue - public VALUETO encodeSingleElement(VALUEFROM javaValue, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
javaValue - cassandraOptions - public void encodeToSettable(List<VALUETO> valueTos, SettableData<?> settableData)
AbstractPropertyencodeToSettable in class AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>>public List<VALUETO> encodeFromJavaInternal(List<VALUEFROM> list, Optional<CassandraOptions> cassandraOptions)
public List<VALUETO> encodeFromRawInternal(Object o, Optional<CassandraOptions> cassandraOptions)
public List<VALUEFROM> decodeFromGettable(GettableData gettableData)
AbstractPropertydecodeFromGettable in class AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>>public List<VALUEFROM> decodeFromGettableInternal(GettableData gettableData)
public List<VALUEFROM> decodeFromRaw(Object o)
AbstractPropertydecodeFromRaw in class AbstractProperty<ENTITY,List<VALUEFROM>,List<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,List<VALUEFROM>,List<VALUETO>>public boolean containsUDTProperty()
containsUDTProperty in class AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>>public List<AbstractUDTClassProperty<?>> getUDTClassProperties()
getUDTClassProperties in class AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>>public void inject(UserTypeFactory userTypeFactory, TupleTypeFactory tupleTypeFactory)
inject in interface InjectUserAndTupleTypeFactorypublic void inject(com.fasterxml.jackson.databind.ObjectMapper mapper)
inject in interface InjectJacksonMapperpublic void inject(info.archinnov.achilles.type.factory.BeanFactory factory)
inject in interface InjectBeanFactorypublic void injectRuntimeCodecs(Map<info.archinnov.achilles.type.codec.CodecSignature<?,?>,info.archinnov.achilles.type.codec.Codec<?,?>> runtimeCodecs)
injectRuntimeCodecs in interface InjectRuntimeCodecspublic void injectKeyspace(String keyspace)
injectKeyspace in interface InjectKeyspacepublic void inject(info.archinnov.achilles.type.SchemaNameProvider schemaNameProvider)
inject in interface InjectSchemaStrategyinject in class AbstractProperty<ENTITY,List<VALUEFROM>,List<VALUETO>>Copyright © 2012-2021. All Rights Reserved.