Commit Graph

789 Commits

Author SHA1 Message Date
Mark Paluch
a596e1db4e DATACASS-395 - Polishing.
Add Javadoc and static constants of converters. Fix static final modifier keyword order.
2017-05-04 14:50:38 +02:00
Mark Paluch
8737126725 DATACASS-395 - Refactor to immutable converters.
Mutable ResultSet to List/Array converters are now immutable.
2017-05-04 14:38:47 +02:00
Christoph Strobl
438c6ae9e2 DATACASS-423 - Remove obsolete build profiles.
Remove Spring 4.x build profiles form travis.yml.
2017-05-04 14:26:18 +02:00
Mark Paluch
48120151fd DATACASS-367 - Drop Serializable requirement on Id types.
Id types for entities are no longer required to implement Serializable. This requirement originates from ancient ORM patterns and had never a technical requirements for Cassandra. Id types are required to map either directly or convert to a Cassandra-supported data type.
2017-05-03 17:56:56 +02:00
Mark Paluch
552c5464c4 DATACASS-441 - Adapt to API changes in repository interfaces.
Related ticket: DATACMNS-944.
2017-05-03 17:56:52 +02:00
Mark Paluch
fee427e46c DATACASS-440 - Remove support for JodaTime's deprecated DateMidnight.
Related ticket: DATACMNS-1014.
2017-05-03 08:36:28 +02:00
Mark Paluch
9679506278 DATACASS-439 - Polishing.
Refactor static converter instances to enum types with a single instance.
2017-04-26 13:59:35 +02:00
Mark Paluch
69e4ddd3cc DATACASS-439 - Remove deprecated types and members.
Removal of deprecated and obsolete types and members. Listeners became obsolete by providing AsynCqlTemplate/AsyncCassandraTemplate as async operations return futures that allow synchronization. Other types are not used anymore.
2017-04-26 13:45:08 +02:00
Mark Paluch
b5763bc696 DATACASS-434 - Remove own ConsistencyLevel and RetryPolicy types.
Remove own ConsistencyLevel and RetryPolicy types in favor of driver types.
2017-04-26 13:30:38 +02:00
Mark Paluch
b175953ff9 DATACASS-435 - Remove strict mode in BasicCassandraPersistentEntityMetadataVerifier.
Strict mode is no longer used. Switching to a lenient verification can be achieved with a custom verifier. Made VerifierMappingExceptions immutable by removing VerifierMappingExceptions.add(…).
2017-04-26 13:16:12 +02:00
Mark Paluch
f92ce6ebe8 DATACASS-438 - Adapt to moved CustomConversions to Spring Data Commons.
Introduce CassandraCustomConversions extending o.s.d.convert.CustomConversions.

Remove o.s.d.cassandra.convert.CustomConversions implementation and utility classes, extend CassandraCustomConversions. Replace references to o.s.d.c.c.CustomConversions with o.s.d.convert.CustomConversions. Adapt tests and MappingCassandraConverter to CassandraCustomConversions.

Related ticket: DATACMNS-1035.
2017-04-24 08:40:10 +02:00
Oliver Gierke
3991e2ef17 DATACASS-433 - Updated changelog. 2017-04-19 21:04:13 +02:00
Oliver Gierke
4a519655e3 DATACASS-432 - Updated changelog. 2017-04-19 20:01:42 +02:00
Mark Paluch
41dc6e739f DATACASS-430 - Polishing.
Move off deprecated API usage in tests.
2017-04-19 14:25:16 +02:00
Mark Paluch
dd697dff26 DATACASS-430 - Adopt changed Mono and Flux error handling API.
Replace Flux/Mono.onErrorResumeWith(…) with Flux/Mono.onErrorMap(…) and turn translateException into a method returning a mapping function instead of a Mono emitting the mapped exception.
2017-04-19 14:25:16 +02:00
Mark Paluch
352dfd6879 DATACASS-431 - Disable tests for ALTER TYPE support on Apache Cassandra 3.10.
Apache Cassandra does not allow altering column/field types since version 3.10. We don't run these tests anymore for version 3.10 and later.
2017-04-19 14:24:59 +02:00
Mark Paluch
0ff0f2348b DATACASS-429 - Assert compatibility with Duration type.
We now test compatibility with Apache Cassandra's duration type (introduced with Apache Cassandra 3.10). Duration requires a driver version >= 3.2.0 so we drop build profiles against earlier driver versions and use Apache Cassandra 3.10 for integration tests.
2017-04-19 14:24:59 +02:00
Mark Paluch
dfc53b635a DATACASS-424 - Upgrade to Cassandra driver 3.2.0.
Enforce frozen user types in collection types when creating tables and frozen user types when referencing a user type from another type. Previously, the driver returned frozen user-types and no interaction from our side was required. Move user-type specifics to UserTypeUtil.

Introduce compatibility code within the tests to build against different driver versions.
2017-04-19 14:24:59 +02:00
Oliver Gierke
ca32108d8b DATACASS-411 - Updated changelog. 2017-04-19 13:04:03 +02:00
Oliver Gierke
fec80a10ce DATACASS-410 - Updated changelog. 2017-04-19 11:50:42 +02:00
Mark Paluch
a430e808f0 DATACASS-420 - Do not insert null values.
We now no longer insert null values via CassandraOperations.insert(…). Inserting null values creates tombstones in Cassandra which are likely unwanted and impact performance. Omitting null values simply does not create values in Cassandra. Setting properties to null with UPDATE remains unchanged and updating an object containing null values will propagate all null values to Cassandra as part of the UPDATE clause.

SimpleCassandraRepository.save(…) needs to consider whether the entity is new or whether it consists only of primary key properties to propagate the optimization. New entities and entities consisting only of primary key columns are saved via INSERT. All other entities are saved via UPDATE.
2017-04-12 14:22:08 +02:00
Mark Paluch
6c9c65e04d DATACASS-427 - Upgrade to Reactor 3.1.0.
Migrate off removed Mono.then(…)/Mono.flatMap(…) methods to Mono.flatMap(…)/flatMapMany(…).
2017-04-12 08:50:07 +02:00
Oliver Gierke
2ebc6cbf36 DATACASS-391 - Updated changelog. 2017-04-10 14:22:26 +02:00
Oliver Gierke
ab80d9a7c1 DATACASS-392 - Updated changelog. 2017-04-10 14:21:33 +02:00
Oliver Gierke
e4ef1f90d3 DATACASS-373 - Updated changelog. 2017-04-10 14:21:14 +02:00
Oliver Gierke
254773336b DATACASS-327 - Updated changelog. 2017-04-10 14:20:28 +02:00
Oliver Gierke
e11e3f8c0e DATACASS-358 - After release cleanups. 2017-04-04 22:08:18 +02:00
Oliver Gierke
2eb1de1ebc DATACASS-358 - Prepare next development iteration. 2017-04-04 22:08:13 +02:00
Oliver Gierke
3b24832f4e DATACASS-358 - Release version 2.0 M2 (Kay). 2017-04-04 21:12:35 +02:00
Oliver Gierke
59ce85641c DATACASS-358 - Prepare 2.0 M2 (Kay). 2017-04-04 21:12:01 +02:00
Oliver Gierke
b81a93d7b4 DATACASS-358 - Updated changelog. 2017-04-04 21:11:52 +02:00
Christoph Strobl
550c1c3da1 DATACASS-398 - Polishing.
Use TestObserver fluent API style.

Original Pull Request: #95
2017-04-03 12:17:31 +02:00
Mark Paluch
4f6548e932 DATACASS-398 - Support RxJava 2 repositories.
Add RxJava 2 dependency. Add test to verify RxJava 2 interoperability.

Original Pull Request: #95
2017-04-03 12:17:08 +02:00
John Blum
05d2a38848 DATACASS-422 - Fix the CassandraRepositoryConfigurationExtension class which does not correctly override the renamed SDC RepositoryConfigurationExtenstionSupport.getRepositoryFactoryBeanClassName() method. 2017-03-24 12:24:20 -07:00
John Blum
0b7be71a7b DATACASS-421 - Remove relative path to Spring Data Build parent POM. 2017-03-24 11:51:18 -07:00
Mark Paluch
f49e7207ef DATACASS-419 - Polishing.
Reorder dependencies.
2017-03-24 14:57:50 +01:00
Mark Paluch
455d3f82fc DATACASS-419 - Remove unused dependency declarations.
Remove el-api and cdi-api from Spring CQL. Remove jsr250-api, el-api, validation-api and hibernate-validator from Spring Data Cassandra.
2017-03-24 14:56:34 +01:00
Mark Paluch
acbb3ba5f9 DATACASS-368 - Migrate reactive tests from TestSubscriber to StepVerifier.
Replace TestSubscriber and .block() calls in test with StepVerifier.
2017-03-24 14:38:56 +01:00
Mark Paluch
ed7565273e DATACASS-418 - Remove Jackson 1 usage. 2017-03-24 10:57:52 +01:00
Mark Paluch
8597589ce3 DATACASS-389 - Reformat and reorganize imports. 2017-03-24 09:18:40 +01:00
Oliver Gierke
01e0372905 DATACASS-389 - Adapt to API changes after Mockito 2.7 upgrade. 2017-03-24 09:18:40 +01:00
Mark Paluch
c9bb49fad4 DATACASS-389 - Adapt to API changes in Spring Data Commons. 2017-03-24 09:18:39 +01:00
Mark Paluch
83a64f316e DATACASS-398 - Simplify CustomConversions. 2017-03-24 09:18:39 +01:00
Mark Paluch
49bbd872d5 DATACASS-389 - Java 8 cleanup.
Add deprecations. Remove unused classes. Replace explicit type arguments with diamond operator. Replace imperative for-loops with stream/forEach (functional approach). Replace anonymous inner classes with lambdas. Replace <code>…</code> with {@code}.
2017-03-24 09:18:39 +01:00
Mark Paluch
e69a17e6d6 DATACASS-389 - Adopt Spring Data Commons changes. 2017-03-24 09:18:39 +01:00
Mark Paluch
dc866df2d2 DATACASS-417 - Allow configuration of cql-template-ref for cassandra:template elements.
We now support configuration of a CqlTemplate reference when creating CassandraTemplate via XML namespace configuration. Configuring a reference allows reusing an existing CqlOperations instance via CassandraTemplateFactoryBean. Additionally, CassandraTemplateFactoryBean now supports setting a SessionFactory.

	<cql:template id="my-cql-template" />
	<cassandra:template cql-template-ref="my-cql-template"/>
2017-03-15 14:23:01 +01:00
Mark Paluch
dce904d15e DATACASS-401 - Polishing.
Add author tags. Extend years in license header. Add ticket references. Reformat code.

Original pull request: #96.
2017-03-15 13:40:12 +01:00
Mateusz Szymczak
52b7f0f58d DATACASS-401 - Fix bean name for CassandraTemplate instances using XML namespace configuration.
We now use the correct bean name `cassandraTemplate` when configuring a CassandraTemplate instance via XML namespace support. Previously, the bean name defaulted to `cqlTemplate`. CassandraTemplate and CqlTemplate no longer share the same type hierarchy but are separated since 2.0.x.

Original pull request: #96.
Related ticket: DATACASS-292.
2017-03-15 13:40:06 +01:00
Mark Paluch
77971cf281 DATACASS-413 - Polishing.
Move test classes from o.s.d.c.t.integration to o.s.d.c.convert.
2017-03-14 18:20:22 +01:00
Mark Paluch
172e9fc897 DATACASS-413 - Convert collection elements to property type when reading collections.
We now consider the element type and property component type when reading Cassandra collections (sets and lists). Inspecting every collection element regarding its source and target type allows a fine grained conversion of elements to the target type.

Previously, we just applied conversion if custom converters were registered. This change also considers the declared collection type of the property.
2017-03-14 18:20:18 +01:00