Commit Graph

1298 Commits

Author SHA1 Message Date
Mark Paluch
64d46da6a4 DATACASS-470 - Move Cassandra type resolution into MappingCassandraConverter.
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.
2020-03-23 15:20:44 +01:00
Mark Paluch
5b0e3f0c56 DATACASS-743 - Introduce ColumnTypeResolver.
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.
2020-03-23 10:58:37 +01:00
Mark Paluch
f2b806052c DATACASS-741 - Polishing.
Reflect impact of transient property usage in persistence constructor.
2020-03-19 15:21:12 +01:00
Mark Paluch
54f2d278a4 DATACASS-741 - Add support for @Value.
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;
    }
}
2020-03-19 15:15:13 +01:00
Mark Paluch
2a20fb8aa1 DATACASS-739 - Include custom conversions documentation from Commons. 2020-03-17 10:41:21 +01:00
Jens Schauder
d46824ff0d DATACASS-729 - After release cleanups. 2020-03-11 09:57:42 +01:00
Jens Schauder
ef1e5fb9ce DATACASS-729 - Prepare next development iteration. 2020-03-11 09:57:41 +01:00
Jens Schauder
626c5fc991 DATACASS-729 - Release version 3.0 M4 (Neumann). 2020-03-11 09:47:07 +01:00
Jens Schauder
963f92ff88 DATACASS-729 - Prepare 3.0 M4 (Neumann). 2020-03-11 09:46:29 +01:00
Jens Schauder
45fd1b5f9c DATACASS-729 - Updated changelog. 2020-03-11 09:46:20 +01:00
Mark Paluch
a6dabe9754 DATACASS-538 - Polishing.
Remove tests for methods that do not exist.
2020-03-10 10:41:58 +01:00
Mark Paluch
1a2f999e60 DATACASS-712 - Polishing.
Reformat code.
2020-03-10 10:05:43 +01:00
Mark Paluch
699e4ca168 DATACASS-712 - Adapt to query builder API for set at list index. 2020-03-10 10:05:21 +01:00
Mark Paluch
238eb5f771 DATACASS-736 - Polishing.
Deprecate CassandraReadTimeoutException.getWasDataReceived() and introduce wasDataPresent to align with ReadTimeoutException.
2020-03-10 09:58:03 +01:00
Mark Paluch
6fee29acb3 DATACASS-736 - Upgrade to Cassandra driver 4.5.0. 2020-03-10 09:50:56 +01:00
Mark Paluch
3dcdd78bf9 DATACASS-735 - Fix integer overflow in Update.increment/decrement.
We now avoid integer downcasting for increment/decrement operations and use the long value instead.
2020-03-02 09:30:29 +01:00
Mark Paluch
d38dbf049e DATACASS-716 - Updated changelog. 2020-02-26 11:55:04 +01:00
Mark Paluch
cfe954b1b9 DATACASS-715 - Updated changelog. 2020-02-26 11:31:48 +01:00
Mark Paluch
19d53037d5 DATACASS-718 - Polishing.
Reformat code. Consider integer types also for decrement.

Use more concise assertion for toString().

Original pull request: #169.
2020-02-17 10:34:31 +01:00
chema
6409835432 DATACASS-718 - Fix Integer Overflow in Update.toString().
Original pull request: #169.
2020-02-17 10:34:31 +01:00
Mark Paluch
fd1d22fef5 DATACASS-719 - After release cleanups. 2020-02-12 15:04:22 +01:00
Mark Paluch
0a7dcb937e DATACASS-719 - Prepare next development iteration. 2020-02-12 15:04:21 +01:00
Mark Paluch
8ac95e2da3 DATACASS-719 - Release version 3.0 M3 (Neumann). 2020-02-12 14:47:16 +01:00
Mark Paluch
a4a58a626c DATACASS-719 - Prepare 3.0 M3 (Neumann). 2020-02-12 14:46:56 +01:00
Mark Paluch
4d70d8e6d3 DATACASS-719 - Updated changelog. 2020-02-12 14:46:49 +01:00
Mark Paluch
f00cde15e1 DATACASS-728 - Deprecate Joda-Time and ThreeTenBackport support.
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.
2020-02-12 10:48:57 +01:00
Mark Paluch
84cd36ab18 DATACASS-722 - Add support for CqlDuration. 2020-02-07 12:48:35 +01:00
Mark Paluch
636fb14452 DATACASS-727 - Clean up converter registration.
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.
2020-02-07 12:48:35 +01:00
John Blum
c6de9dc003 DATACASS-721 - Replace incorrect use of FindBugs @NonNull and @Nullable annotations with equivalent Spring annotations. 2020-02-05 15:18:43 -08:00
John Blum
c4786458dc DATACASS-726 - Upgrade to DataStax Java Driver 4.4.
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.
2020-02-05 14:59:37 -08:00
John Blum
1021026943 DATACASS-725 - Upgrade to Apache Cassandra 3.11.5. 2020-02-05 09:22:11 -08:00
John Blum
0ff66f37a9 DATACASS-721 - Cleanup all compiler warnings.
Fix Javadoc.

Remove incorrect useage of FindBugs @NonNull and @Nullable annotations and replace with equivalent Spring annotations.
2020-02-05 09:19:46 -08:00
John Blum
5c7d16ef4c DATACASS-721 - Apply additional code polish. 2020-01-31 17:15:23 -08:00
Mark Paluch
461975cf1a DATACASS-722 - Relax test plan for LWT tests.
LWT tests are now simplified and to not attempt to issue another query as Cassandra becomes eventually consistent.
2020-01-29 11:33:02 +01:00
Mark Paluch
f29cededbb DATACASS-722 - Move off deprecated EntityInstantiators.
We now use the newly introduced EntityInstantiator at o.s.d.mapping.model and moved off the deprecated one in o.s.d.convert.
2020-01-29 11:29:34 +01:00
John Blum
6bf448adac DATACASS-721 - Refactor codebase around uses of the new DataStax 4.x Driver API. 2020-01-21 21:24:23 -08:00
Mark Paluch
c341025138 DATACASS-708 - Allow configuration of execution profile and serial consistency per statement.
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.
2020-01-17 13:26:35 +01:00
Mark Paluch
a3e66c3f67 DATACASS-717 - After release cleanups. 2020-01-17 09:47:50 +01:00
Mark Paluch
2d7d49937d DATACASS-717 - Prepare next development iteration. 2020-01-17 09:47:49 +01:00
Mark Paluch
cb480e3472 DATACASS-717 - Release version 3.0 M2 (Neumann). 2020-01-17 09:39:03 +01:00
Mark Paluch
6e944b0854 DATACASS-717 - Prepare 3.0 M2 (Neumann). 2020-01-17 09:38:43 +01:00
Mark Paluch
eb8ef64561 DATACASS-717 - Updated changelog. 2020-01-17 09:38:35 +01:00
Mark Paluch
848eed31a0 DATACASS-692 - After release cleanups. 2020-01-16 16:11:55 +01:00
Mark Paluch
b47669e7fd DATACASS-692 - Prepare next development iteration. 2020-01-16 16:11:54 +01:00
Mark Paluch
99d50096cd DATACASS-692 - Release version 3.0 M1 (Neumann). 2020-01-16 16:05:23 +01:00
Mark Paluch
dbc101488b DATACASS-692 - Prepare 3.0 M1 (Neumann). 2020-01-16 16:05:03 +01:00
Mark Paluch
478f82c898 DATACASS-692 - Updated changelog. 2020-01-16 16:05:00 +01:00
Mark Paluch
71c6851bb7 DATACASS-656 - Guard tests for unsupported Cassandra versions. 2020-01-15 14:57:35 +01:00
Mark Paluch
9dc4f17260 DATACASS-699 - Polishing.
Javadoc tweaks.
2020-01-15 14:41:12 +01:00
Mark Paluch
cce8d54898 DATACASS-656 - Extend test matrix on TravisCI to use latest 2.2, 3.0 and 3.11 Cassandra versions.
Guard tests for unsupported Cassandra versions.
2020-01-15 14:41:11 +01:00