Commit Graph

778 Commits

Author SHA1 Message Date
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
Mark Paluch
d0c15c0265 DATACASS-416 - Polishing.
Add method override javadocs. Reformat code. Fix references to reactive Sorting repositories.
2017-03-14 17:15:40 +01:00
Mark Paluch
1da1c89fc0 DATACASS-416 - Add overrides on TypedIdCassandraRepository for methods returning Lists.
TypedIdCassandraRepository redeclares save() and findAll(…) methods returning List. Propagating the more specialized return type allows easier use of the collection result.
2017-03-14 17:10:39 +01:00
Mark Paluch
a458bc6e57 DATACASS-415 - Provide insert methods on TypedIdCassandraRepository.
We now provide insert(…) methods on TypedIdCassandraRepository for fine-grained control over insert/update behavior.
2017-03-14 17:07:34 +01:00
Mark Paluch
efe5c63145 DATACASS-396 - Polishing.
Add assertions to base repository methods. Rearrange method order.
2017-03-14 16:51:33 +01:00
Mark Paluch
125cdb8811 DATACASS-396 - Use single statements for to save/delete each item of a collection via CassandraRepository.
We now issue individual statements to save and delete each element of a collection of objects when used with CassandraRepository.save(Iterable) and CassandraRepository.delete(Iterable). Previously, the collection argument was considered an entity.

Save/delete do not use batch operations to prevent accidental wrong use of Cassandra batches.
2017-03-14 16:47:44 +01:00
Mark Paluch
abc3ec623c DATACASS-396 - Use single statements for to save/delete each item of a collection via CassandraRepository.
We now issue individual statements to save and delete each element of a collection of objects when used with CassandraRepository.save(Iterable) and CassandraRepository.delete(Iterable). Previously, the collection argument was considered an entity.

Save/delete do not use batch operations to prevent accidental wrong use of Cassandra batches.
2017-03-14 16:45:54 +01:00
Mark Paluch
465aebf7cd DATACASS-412 - Remove formatting config from the repository.
See https://github.com/spring-projects/spring-data-build/tree/master/etc/ide for most recent IDE settings.
2017-03-08 11:44:22 +01:00
Mark Paluch
414bb07ac8 DATACASS-406 - Polishing.
Extend year range in copyright headers. Reformat code. Add JavaDoc. Add ticket references to test methods. Remove unused code. Add guard to test to not call UserTypeResolver during type creation. Rename UserDataTypeProvider to DataTypeProvider and the individual constants to reflect what they provide.

Original pull request: #100.
2017-03-02 09:03:17 +01:00
Jens Schauder
ca60ca6433 DATACASS-406 - Support nested @UserDefinedType for schema creation.
Works for simple user defined types and those used in Lists or Sets.

It does not work yet for maps and other collection-like types.

Related tickets: DATACASS-409.

Original pull request: #100.
2017-03-02 08:41:58 +01:00
Mark Paluch
15f9169640 DATACASS-397 - Polishing.
Update copyright date range. Align ticket references in tests.

Original pull request: #94.
2017-02-28 17:10:21 +01:00
Lukasz Swiatek
1c455c1093 DATACASS-397 - Define id attribute in XML schema for converter type.
Add id attribute to XML schema for Spring Data Cassandra Namespace support. Rename CassandraMappingBeanFactoryPostProcessorTests to CassandraMappingBeanFactoryPostProcessorUnitTests to execute the test in the build.

Original pull request: #94.
2017-02-28 17:10:21 +01:00