public abstract class AbstractProperty<ENTITY,VALUEFROM,VALUETO> extends Object implements InjectUserAndTupleTypeFactory, InjectBeanFactory, InjectJacksonMapper, InjectRuntimeCodecs, InjectKeyspace, InjectSchemaStrategy
| Type | Property and Description |
|---|---|
abstract boolean |
containsUDT |
| Modifier and Type | Field and Description |
|---|---|
FieldInfo<ENTITY,VALUEFROM> |
fieldInfo |
String |
fieldName |
protected Optional<info.archinnov.achilles.type.SchemaNameProvider> |
schemaNameProvider |
com.google.common.reflect.TypeToken<VALUEFROM> |
valueFromTypeToken |
com.google.common.reflect.TypeToken<VALUETO> |
valueToTypeToken |
| Modifier and Type | Method and Description |
|---|---|
abstract DataType |
buildType(Optional<CassandraOptions> cassandraOptions)
Build the Java driver DataType of this column given a CassandraOptions
containing a runtime SchemaNameProvider.
|
abstract boolean |
containsUDTProperty() |
void |
decodeField(GettableData gettableData,
ENTITY entity)
First extract the column value from the given GettableData (Row, UDTValue, ...)
Then call the setter on the given entity to set the value
|
VALUEFROM |
decodeFromGettable(GettableData gettableData)
Decode the given GettableData (Row, UDTValue, ...) to Java value value using Achilles codec system
|
VALUEFROM |
decodeFromRaw(Object o)
Decode the given raw object to Java value value using Achilles codec system
|
VALUETO |
encodeField(ENTITY entity)
Encode the field of the given entity into CQL-compatible value using Achilles codec system
|
VALUETO |
encodeField(ENTITY entity,
Optional<CassandraOptions> cassandraOptions)
Encode the field of the given entity into CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
void |
encodeFieldToUdt(ENTITY entity,
UDTValue udtValue)
First extract all the values from the given entity
Then encode each of the extracted value into CQL-compatible value using Achilles codec system
Finally set the encoded value to the given UDTValue instance
|
abstract 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.
|
VALUETO |
encodeFromJava(VALUEFROM javaValue)
Encode given java value to CQL-compatible value using Achilles codec system
|
VALUETO |
encodeFromJava(VALUEFROM javaValue,
Optional<CassandraOptions> cassandraOptions)
Encode given java value to CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
VALUETO |
encodeFromRaw(Object o)
Encode the given raw Java object to CQL-compatible value using Achilles codec system
|
VALUETO |
encodeFromRaw(Object o,
Optional<CassandraOptions> cassandraOptions)
Encode given java raw object to CQL-compatible value using Achilles codec system and a CassandraOptions
containing a runtime SchemaNameProvider.
|
abstract 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 ...)
|
boolean |
equals(Object o) |
String |
getColumnForSelect() |
DataType |
getDataType() |
VALUEFROM |
getFieldValue(ENTITY entity)
Call the getter on the given entity to get the value
|
VALUEFROM |
getJavaValue(ENTITY entity)
Get the raw value associated with this field from the given entity (non encoded)
|
abstract List<AbstractUDTClassProperty<?>> |
getUDTClassProperties() |
int |
hashCode() |
void |
inject(info.archinnov.achilles.type.SchemaNameProvider schemaNameProvider) |
void |
setField(ENTITY entity,
VALUEFROM value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitinjectinjectinjectinjectRuntimeCodecsinjectKeyspacepublic final String fieldName
public com.google.common.reflect.TypeToken<VALUEFROM> valueFromTypeToken
public com.google.common.reflect.TypeToken<VALUETO> valueToTypeToken
protected Optional<info.archinnov.achilles.type.SchemaNameProvider> schemaNameProvider
public VALUETO encodeFromJava(VALUEFROM javaValue)
javaValue - public VALUETO encodeFromJava(VALUEFROM javaValue, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
javaValue - cassandraOptions - public abstract void encodeToSettable(VALUETO valueto, SettableData<?> settableData)
valueto - settableData - public VALUETO encodeFromRaw(Object o)
o - public VALUETO encodeFromRaw(Object o, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
o - cassandraOptions - public VALUEFROM decodeFromGettable(GettableData gettableData)
gettableData - public VALUEFROM decodeFromRaw(Object o)
o - public abstract DataType buildType(Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
cassandraOptions - public VALUETO encodeField(ENTITY entity)
entity - public VALUETO encodeField(ENTITY entity, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
entity - public VALUEFROM getJavaValue(ENTITY entity)
entity - public void encodeFieldToUdt(ENTITY entity, UDTValue udtValue)
entity - udtValue - public abstract void encodeFieldToUdt(ENTITY entity, UDTValue udtValue, Optional<CassandraOptions> cassandraOptions)
CassandraOptions.withSchemaNameProvider(SchemaNameProvider provider)
static method to build such a CassandraOptions instanceentity - udtValue - public abstract boolean containsUDTProperty()
public abstract List<AbstractUDTClassProperty<?>> getUDTClassProperties()
public void decodeField(GettableData gettableData, ENTITY entity)
gettableData - entity - public VALUEFROM getFieldValue(ENTITY entity)
entity - public String getColumnForSelect()
public DataType getDataType()
public void inject(info.archinnov.achilles.type.SchemaNameProvider schemaNameProvider)
inject in interface InjectSchemaStrategyCopyright © 2012-2021. All Rights Reserved.