We now use a configurable NamingStrategy to configure how table, user-defined type and column names are derived if the name is not expicitly configured. The default naming strategy uses the type/property name. Naming strategies allow customization with a transformation function (all lower-case/upper case, prepending/appending and more) and strategies can be provided by a custom implementation.
All DataType-resolution functionality is now encapsulated in ColumnTypeResolver and all DataType-related methods (getDataType(), getTupleType(), getUserType()) were migrated into ColumnTypeResolver. DataType resolution requires always a converter context to apply registered converters so this concern cannot be handled entirely on the mapping level.
Related to type resolution also schema object derivation (create table/index/user type) functionality was moved from CassandraMappingContext into SchemaFactory as schema object derivation requires the converter registrations.
We now resolve column types by using ColumnTypeResolver that encapsulates type lookups that previously were spread across different areas of the converter. We consistently apply type resolution for singular properties and collection/Map-like properties.
The `@Value` annotation can now be used on constructor parameters to evaluate expressions to obtain constructor values. The root object refers to a Row, UdtValue or TupleValue depending from which source the object gets materialized.
class WithValue {
final @Id String id;
final @Transient String firstname;
public WithValue(String id, @Value("#root.getString(1)") String firstname) {
this.id = id;
this.firstname = firstname;
}
}
Joda-Time and ThreeTenBackport converters are now deprecated in favor of JSR-310 (java.time) support. These converters are now in maintenance mode without receiving future enhancements.
We now no longer register duplicate converters but rather use a ConverterConfiguration to avoid JSR-310/Joda Time/ThreeTenBackport values to be converted to java.util.Date.
Remove also native time marker support as with JSR-310 usage this functionality is no longer required.
Fix broken tests.
Fix compiler warnings.
Replace incorrect use of FindBugs @NonNull and @Nullable annotations with equivalent Spring annoations.
Edit Javadoc.
Format source code.
Optimize imports.
We now allow configuration of the execution profile and serial consistency through QueryOptions and CassandraAccessor/ReactiveCqlTemplate. Settings are applied on a per-Statement basis. The newly ExecutionProfileResolver can resolve the profile either from a profile name or a DriverExecutionProfile object for more flexibility.
With this change, we removed the support for setting a RetryPolicy directly as the new driver 4 does not support a direct configuration of the RetryPolicy. Instead, the RetryPolicy is configured through an execution profile.