Commit Graph

765 Commits

Author SHA1 Message Date
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
Mark Paluch
690ebe5c99 DATACASS-402 - Extend exception translation for exceptions that map currently to CassandraUncategorizedException.
We now provide a more fine-grained exception translation for exceptions that previously mapped to CassandraUncategorizedException. Existing translation to more specific exception does not change. The following translation rules are introduced by this change:

* OverloadedException and BootstrappingException map to TransientDataAccessResourceException
* NoHostAvailableException, BusyPoolException, ConnectionException, BusyConnectionException map to CassandraConnectionFailureException
* QueryConsistencyException, FunctionExecutionException map to DataAccessResourceFailureException
2017-02-28 15:21:38 +01:00
Mark Paluch
e26f6a109b DATACASS-400 - Use custom conversion and UDT mapping with entity instantiator.
We now apply custom conversion and UDT mapping to the value provider that is used with entity instantiators. This allows entities to be instantiated with mapped UDTs and using custom conversion with properties that are provided using a constructor.

Previously, columns were not converted which caused a parameter mismatch so entities couldn't be instantiated.
2017-02-27 12:54:57 +01:00
Michael Hausegger
ff87fcc2c7 DATACASS-404 - Fix link to Jira in README.md.
Use spring.io domain instead of springframework.org.

Original pull request: #98.
2017-02-27 10:03:52 +01:00
John Blum
d0982dc119 DATACASS-330 - Review and apply additional polish. 2017-02-06 19:04:32 -08:00
Mark Paluch
4df8fd1fce DATACASS-330 - Polishing.
Move Reactive Session support to session package. Reorder fields according their visibility.
2017-02-06 19:04:25 -08:00
Mark Paluch
22e6e9ae9f DATACASS-330 - Add Session routing.
We now support Session routing with AbstractRoutingSessionFactory. Session routing is based on a map, keyed by a lookup key that is supplied by an implementing class upon Session lookup.

Extend JavaConfig to configure a SessionFactory bean and configure CqlTemplate and CassandraAdminTemplate accordingly.
2017-02-06 19:04:18 -08:00
Mark Paluch
68d61461cd DATACASS-330 - Add SessionFactory to CqlTemplate and AsyncCqlTemplate.
We now support SessionFactory to obtain Cassandra Session's on a per-request basis. CassandraAccessor is configured primarily with a SessionFactory now, the existing initialization configures a DefaultSessionFactory that returns the initially given Session instance.

Sessions should not be acquired directly by getSession but inside a callback-block so it's guaranteed to operate on the same session within a particular operation. That's especially relevant when preparing and executing prepared statements.

PreparedStatementCallback was changed in a breaking way as it now accepts additionally a Session to retain the session context.

Related ticket: DATACASS-32
2017-02-06 19:04:09 -08:00
Mark Paluch
7e33bf3bcf DATACASS-393 - Polishing.
Add override comments. Fix JavaDoc. Reformat code.
2017-02-01 11:54:12 +01:00
Mark Paluch
bc5262d633 DATACASS-393 - Remove references to Assert single-arg methods.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
2017-02-01 11:44:02 +01:00
Oliver Gierke
32ef958eca DATACASS-372 - Updated changelog. 2017-01-26 12:12:32 +01:00
Mark Paluch
15b9aa1aaf DATACASS-390 - Upgrade to Cassandra Driver 3.1.3. 2017-01-25 11:07:53 +01:00
Mark Paluch
fff664393e DATACASS-290 - Polishing.
Align declared type of CassandraCqlTemplateFactoryBean to CqlTemplate and the type of CassandraTemplateFactoryBean to CassandraTemplate to report consistent bean types. Add JavaDoc.

Original pull request: #76.
2017-01-25 10:28:17 +01:00
Mark Paluch
5ef647d21a DATACASS-290 - Support multiple Keyspaces using XML configuration.
We now support multiple Cassandra keyspaces by allowing multiple definitions of Sessions, Mapping Contexts, Converters and CassandraTemplates.
Added support for id attribute for converter and mapping context elements and adopt CassandraMappingBeanFactoryPostProcessor to scan with eager initialization for existing infrastructure components. We are lenient about the source (factory bean or concrete bean definition) for infrastructure beans (Session, Converter, Mapping Context, Template) and register only the necessary beans.

Original pull request: #76.
2017-01-25 10:27:14 +01:00