public class UDTProperty<ENTITY,UDT_META extends AbstractUDTClassProperty<A>,A> extends AbstractProperty<ENTITY,A,UDTValue> implements InjectUserAndTupleTypeFactory, InjectBeanFactory, InjectKeyspace
| Type | Property and Description |
|---|---|
boolean |
containsUDT |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.reflect.TypeToken<UDTValue> |
UDT_VALUE_TYPE_TOKEN |
UDT_META |
udtClassProperty |
Class<A> |
valueClass |
fieldInfo, fieldName, schemaNameProvider, valueFromTypeToken, valueToTypeToken| Constructor and Description |
|---|
UDTProperty(FieldInfo<ENTITY,A> fieldInfo,
Class<A> valueClass,
UDT_META udtClassProperty) |
| Modifier and Type | Method and Description |
|---|---|
UserType |
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(UDTValue udt,
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, decodeFromGettable, decodeFromRaw, encodeField, encodeField, encodeFieldToUdt, encodeFromJava, encodeFromJava, encodeFromRaw, encodeFromRaw, equals, getColumnForSelect, getDataType, getFieldValue, getJavaValue, hashCode, setField, toStringpublic boolean containsUDTProperty
containsUDTProperty in class AbstractProperty<ENTITY,A,UDTValue>public static final com.google.common.reflect.TypeToken<UDTValue> UDT_VALUE_TYPE_TOKEN
public final UDT_META extends AbstractUDTClassProperty<A> udtClassProperty
public void encodeToSettable(UDTValue udt, SettableData<?> settableData)
AbstractPropertyencodeToSettable in class AbstractProperty<ENTITY,A,UDTValue>public UserType buildType(Optional<CassandraOptions> cassandraOptions)
AbstractProperty
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
buildType in class AbstractProperty<ENTITY,A,UDTValue>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,A,UDTValue>public boolean containsUDTProperty()
containsUDTProperty in class AbstractProperty<ENTITY,A,UDTValue>public List<AbstractUDTClassProperty<?>> getUDTClassProperties()
getUDTClassProperties in class AbstractProperty<ENTITY,A,UDTValue>public void inject(UserTypeFactory userTypeFactory, TupleTypeFactory tupleTypeFactory)
inject in interface InjectUserAndTupleTypeFactorypublic void inject(info.archinnov.achilles.type.factory.BeanFactory factory)
inject in interface InjectBeanFactorypublic void injectKeyspace(String keyspace)
injectKeyspace in interface InjectKeyspacepublic void inject(com.fasterxml.jackson.databind.ObjectMapper mapper)
inject in interface InjectJacksonMapperpublic void injectRuntimeCodecs(Map<info.archinnov.achilles.type.codec.CodecSignature<?,?>,info.archinnov.achilles.type.codec.Codec<?,?>> runtimeCodecs)
injectRuntimeCodecs in interface InjectRuntimeCodecspublic void inject(info.archinnov.achilles.type.SchemaNameProvider schemaNameProvider)
inject in interface InjectSchemaStrategyinject in class AbstractProperty<ENTITY,A,UDTValue>Copyright © 2012-2021. All Rights Reserved.