public class ComputedProperty<ENTITY,VALUEFROM,VALUETO> extends AbstractProperty<ENTITY,VALUEFROM,VALUETO>
| Type | Property and Description |
|---|---|
boolean |
containsUDT |
| Modifier and Type | Field and Description |
|---|---|
ComputedColumnInfo |
computedColumnInfo |
fieldInfo, fieldName, schemaNameProvider, valueFromTypeToken, valueToTypeToken| Constructor and Description |
|---|
ComputedProperty(FieldInfo<ENTITY,VALUEFROM> fieldInfo,
java.util.function.Function<GettableData,VALUETO> extractor,
info.archinnov.achilles.type.codec.Codec<VALUEFROM,VALUETO> valueCodec) |
| 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() |
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.
|
void |
encodeToSettable(VALUETO valueto,
SettableData<?> settableData)
Encode the given Java value to CQL-compatible value using Achilles codec system into the given SettableData (Row, UDTValue ...)
|
String |
getColumnForSelect() |
List<AbstractUDTClassProperty<?>> |
getUDTClassProperties() |
void |
inject(info.archinnov.achilles.type.factory.BeanFactory factory) |
void |
inject(com.fasterxml.jackson.databind.ObjectMapper mapper) |
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) |
String |
toString() |
decodeField, decodeFromGettable, decodeFromRaw, encodeField, encodeField, encodeFieldToUdt, encodeFromJava, encodeFromJava, encodeFromRaw, encodeFromRaw, equals, getDataType, getFieldValue, getJavaValue, hashCode, inject, setFieldpublic boolean containsUDTProperty
containsUDTProperty in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>public final ComputedColumnInfo computedColumnInfo
public ComputedProperty(FieldInfo<ENTITY,VALUEFROM> fieldInfo, java.util.function.Function<GettableData,VALUETO> extractor, info.archinnov.achilles.type.codec.Codec<VALUEFROM,VALUETO> valueCodec)
public void encodeToSettable(VALUETO valueto, SettableData<?> settableData)
AbstractPropertyencodeToSettable in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>public DataType buildType(Optional<CassandraOptions> cassandraOptions)
AbstractProperty
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
buildType in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>public String getColumnForSelect()
getColumnForSelect in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>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,VALUEFROM,VALUETO>public boolean containsUDTProperty()
containsUDTProperty in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>public List<AbstractUDTClassProperty<?>> getUDTClassProperties()
getUDTClassProperties in class AbstractProperty<ENTITY,VALUEFROM,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 String toString()
toString in class AbstractProperty<ENTITY,VALUEFROM,VALUETO>public void injectKeyspace(String keyspace)
Copyright © 2012-2021. All Rights Reserved.