Commit Graph

343 Commits

Author SHA1 Message Date
Mark Paluch
2dd83238af DATACASS-705 - Introduce FactoryBean for SessionFactory.
We now provide SessionFactoryFactoryBean as factory bean and initializer for a SessionFactory.

<cassandra:session-factory>
	<cassandra:script
			location="my/scripts/schema.cql"/>
</cassandra:session-factory>

Original pull request: #167.
2020-01-08 11:46:21 +01:00
Mark Paluch
efb5b4b5d4 DATACASS-705 - Polishing.
Use consistently -ref.

Original pull request: #167.
2020-01-08 11:46:17 +01:00
Mark Paluch
119c0b499a DATACASS-703 - Move Keyspace initialization from CassandraClusterFactoryBean to CassandraCqlSessionFactoryBean.
Original pull request: #167.
2020-01-08 11:46:14 +01:00
Jens Schauder
7bd67eecfd DATACASS-702 - Updated changelog. 2019-12-04 14:32:42 +01:00
Jens Schauder
bfc48fedd3 DATACASS-701 - Updated changelog. 2019-12-04 12:09:44 +01:00
Mark Paluch
5aa269ac58 DATACASS-698 - Updated changelog. 2019-11-18 12:43:25 +01:00
Mark Paluch
3e7e062dab DATACASS-697 - Updated changelog. 2019-11-18 12:16:26 +01:00
Christoph Strobl
daddb04d38 DATACASS-691 - Updated changelog. 2019-11-04 15:39:53 +01:00
Christoph Strobl
0051a2f14d DATACASS-690 - Updated changelog. 2019-11-04 10:34:49 +01:00
Mark Paluch
1a66333a05 DATACASS-682 - Prepare 2.2 GA (Moore). 2019-09-30 15:50:43 +02:00
Mark Paluch
8d5489e048 DATACASS-682 - Updated changelog. 2019-09-30 15:50:38 +02:00
Mark Paluch
6fcea63902 DATACASS-681 - Updated changelog. 2019-09-30 11:16:16 +02:00
Mark Paluch
75f4d76324 DATACASS-688 - Add documentation for Kotlin support. 2019-09-27 12:12:22 +02:00
Mark Paluch
b5c34d8d89 DATACASS-683 - Prepare 2.2 RC3 (Moore). 2019-09-06 10:10:12 +02:00
Mark Paluch
f7c10e80a9 DATACASS-683 - Updated changelog. 2019-09-06 10:10:03 +02:00
Mark Paluch
ba822d1b05 DATACASS-670 - Prepare 2.2 RC2 (Moore). 2019-08-05 15:35:05 +02:00
Mark Paluch
992816c763 DATACASS-670 - Updated changelog. 2019-08-05 15:34:58 +02:00
Mark Paluch
25d8a3e1c3 DATACASS-669 - Updated changelog. 2019-08-05 11:34:28 +02:00
Mark Paluch
45662fa361 DATACASS-658 - Updated changelog. 2019-08-05 11:08:59 +02:00
Mark Paluch
ca1e57d0c3 DATACASS-676 - Fix custom conversion registration example. 2019-07-26 11:42:42 +02:00
Mark Paluch
b3a63f6a67 DATACASS-4 - Polishing.
Fix anchor for entity callbacks.
2019-07-01 15:17:59 +02:00
Mark Paluch
993a82f088 DATACASS-672 - Polishing.
Reflect dropped Serializable requirement on primary key classes in documentation.
2019-07-01 12:30:46 +02:00
Mark Paluch
f8d87e24bd DATACASS-611 - Add query derivation for delete queries.
We now support query derivation for delete queries using delete…By in method declarations.

interface PersonRepository extends Repository<Person, String> {

  void deleteWithoutResultByLastname(String lastname);

  boolean deleteByLastname(String lastname);
}
2019-06-18 17:20:41 +02:00
Mark Paluch
4f93fb830b DATACASS-454 - Extend @Query to declare idempotent CQL queries.
String-based queries can now be marked as idempotent. Also, SELECT queries defined via @Query are also considered idempotent to make these retryable.

interface PersonRepository extends Repository<Person, String> {

    @Query("SELECT * FROM person WHERE lastname = ?0;") // idempotent by default
    Person findByLastname(String lastname);

    @Query(value = "UPDATE person SET lastname = ?0", idempotent = Query.Idempotency.IDEMPOTENT)
    void updatePerson(String name);

}
2019-06-18 15:03:24 +02:00
Christoph Strobl
eca9a2e5c4 DATACASS-649 - Prepare 2.2 RC1 (Moore). 2019-06-14 14:43:17 +02:00
Christoph Strobl
4d787f5dd2 DATACASS-649 - Updated changelog. 2019-06-14 14:43:09 +02:00
Christoph Strobl
7d97ba7d9b DATACASS-657 - Updated changelog. 2019-06-14 13:27:14 +02:00
Mark Paluch
86c47e80f8 DATACASS-4 - Add support for auditing.
We now support auditing using Spring's IsNewAwareAuditingHandler. Entities that are saved are processed before persisting these through auditing EntityCallbacks.

@Table
class Entity {

  @Id Long id;

  @CreatedDate
  LocalDateTime created;

  @LastModifiedDate
  LocalDateTime modified;

   // …
}

@EnableCassandraAuditing
@Configuration
class MyConfiguration extends AbstractReactiveCassandraConfiguration {

 // …
}
2019-06-07 16:00:54 +02:00
Chaouki Dhib
664ba968f0 DATACASS-660 - Fix typo regarding the usage of Query objects.
Original pull request: #161.
2019-06-03 13:57:43 +02:00
Chaouki Dhib
249aa5e304 DATACASS-660 - Fix typo regarding the usage of Query objects.
Original pull request: #160.
2019-05-29 14:21:31 +02:00
Mark Paluch
64e722b7d1 DATACASS-654 - Updated changelog. 2019-05-13 18:19:06 +02:00
Mark Paluch
272db101fa DATACASS-653 - Updated changelog. 2019-05-13 14:59:26 +02:00
Mark Paluch
f4e5860907 DATACASS-650 - Prepare 2.2 M4 (Moore). 2019-05-13 11:59:04 +02:00
Mark Paluch
ff3c95a9cc DATACASS-650 - Updated changelog. 2019-05-13 11:58:55 +02:00
Oliver Drotbohm
af60d1518d DATACASS-644 - Updated changelog. 2019-05-10 14:18:12 +02:00
Oliver Drotbohm
c162f2ecd3 DATACASS-646 - Updated changelog. 2019-05-10 12:57:23 +02:00
Christoph Strobl
283d3d2355 DATACASS-635 - Prepare 2.2 M3 (Moore). 2019-04-11 11:23:56 +02:00
Christoph Strobl
f286ef9c46 DATACASS-635 - Updated changelog. 2019-04-11 11:23:50 +02:00
Oliver Drotbohm
021503677d DATACASS-626 - Updated changelog. 2019-04-01 20:56:25 +02:00
Oliver Drotbohm
5e1ce2467c DATACASS-621 - Updated changelog. 2019-04-01 19:36:56 +02:00
Oliver Drotbohm
4622eef441 DATACASS-643 - Updated changelog. 2019-04-01 18:52:15 +02:00
Oliver Drotbohm
865291bdf0 DATACASS-620 - Updated changelog. 2019-04-01 18:49:24 +02:00
Mark Paluch
7934da03fb DATACASS-641 - Fix documentation for java.util.UUID type mapping.
Since 2.0, java.util.UUID maps by default to uuid instead of timeuuid. Documentation now reflects this change.
2019-03-27 10:23:19 +01:00
Spring Operator
42cc65aaab DATACASS-640 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 672 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

Original Pull Request: #156
2019-03-22 11:12:49 +01:00
Spring Operator
5b0db4531c DATACASS-640 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://www.prowaveconsulting.com (200) with 1 occurrences could not be migrated:
   ([https](https://www.prowaveconsulting.com) result SSLHandshakeException).
* [ ] http://www.scispike.com (200) with 1 occurrences could not be migrated:
   ([https](https://www.scispike.com) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://cassandra.apache.org/doc/cql3/CQL.html (404) with 2 occurrences migrated to:
  https://cassandra.apache.org/doc/cql3/CQL.html ([https](https://cassandra.apache.org/doc/cql3/CQL.html) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://cassandra.apache.org/ with 2 occurrences migrated to:
  https://cassandra.apache.org/ ([https](https://cassandra.apache.org/) result 200).
* [ ] http://cassandra.apache.org/doc/latest/getting_started/index.html with 3 occurrences migrated to:
  https://cassandra.apache.org/doc/latest/getting_started/index.html ([https](https://cassandra.apache.org/doc/latest/getting_started/index.html) result 200).
* [ ] http://docs.datastax.com/en/landing_page/doc/landing_page/current.html with 2 occurrences migrated to:
  https://docs.datastax.com/en/landing_page/doc/landing_page/current.html ([https](https://docs.datastax.com/en/landing_page/doc/landing_page/current.html) result 200).
* [ ] http://docs.spring.io/spring/docs/ with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/ ([https](https://docs.spring.io/spring/docs/) result 200).
* [ ] http://pivotal.io/ with 1 occurrences migrated to:
  https://pivotal.io/ ([https](https://pivotal.io/) result 200).
* [ ] http://projectreactor.io/docs/core/release/reference/ with 1 occurrences migrated to:
  https://projectreactor.io/docs/core/release/reference/ ([https](https://projectreactor.io/docs/core/release/reference/) result 200).
* [ ] http://projects.spring.io/ with 1 occurrences migrated to:
  https://projects.spring.io/ ([https](https://projects.spring.io/) result 200).
* [ ] http://projects.spring.io/spring-data-cassandra/ with 3 occurrences migrated to:
  https://projects.spring.io/spring-data-cassandra/ ([https](https://projects.spring.io/spring-data-cassandra/) result 200).
* [ ] http://projects.spring.io/spring-framework/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-framework/ ([https](https://projects.spring.io/spring-framework/) result 200).
* [ ] http://repo.spring.io/milestone/org/springframework/data/ with 2 occurrences migrated to:
  https://repo.spring.io/milestone/org/springframework/data/ ([https](https://repo.spring.io/milestone/org/springframework/data/) result 200).
* [ ] http://spring.io with 1 occurrences migrated to:
  https://spring.io ([https](https://spring.io) result 200).
* [ ] http://spring.io/blog with 2 occurrences migrated to:
  https://spring.io/blog ([https](https://spring.io/blog) result 200).
* [ ] http://spring.io/docs with 1 occurrences migrated to:
  https://spring.io/docs ([https](https://spring.io/docs) result 200).
* [ ] http://spring.io/tools/sts with 2 occurrences migrated to:
  https://spring.io/tools/sts ([https](https://spring.io/tools/sts) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-data with 3 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-data ([https](https://stackoverflow.com/questions/tagged/spring-data) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-data-cassandra with 3 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-data-cassandra ([https](https://stackoverflow.com/questions/tagged/spring-data-cassandra) result 200).
* [ ] http://start.spring.io/ with 2 occurrences migrated to:
  https://start.spring.io/ ([https](https://start.spring.io/) result 200).
* [ ] http://twitter.com/SpringData with 1 occurrences migrated to:
  https://twitter.com/SpringData ([https](https://twitter.com/SpringData) result 200).
* [ ] http://vertx.io/docs/vertx-reactive-streams/java/ with 1 occurrences migrated to:
  https://vertx.io/docs/vertx-reactive-streams/java/ ([https](https://vertx.io/docs/vertx-reactive-streams/java/) result 200).
* [ ] http://wiki.apache.org/cassandra/HintedHandoff with 1 occurrences migrated to:
  https://wiki.apache.org/cassandra/HintedHandoff ([https](https://wiki.apache.org/cassandra/HintedHandoff) result 200).
* [ ] http://wiki.apache.org/cassandra/Operations with 3 occurrences migrated to:
  https://wiki.apache.org/cassandra/Operations ([https](https://wiki.apache.org/cassandra/Operations) result 200).
* [ ] http://wiki.apache.org/cassandra/StorageConfiguration with 1 occurrences migrated to:
  https://wiki.apache.org/cassandra/StorageConfiguration ([https](https://wiki.apache.org/cassandra/StorageConfiguration) result 200).
* [ ] http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling with 6 occurrences migrated to:
  https://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling ([https](https://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling) result 200).
* [ ] http://www.google.com/search?q=nosoql+acronym with 1 occurrences migrated to:
  https://www.google.com/search?q=nosoql+acronym ([https](https://www.google.com/search?q=nosoql+acronym) result 200).
* [ ] http://www.reactive-streams.org/ with 1 occurrences migrated to:
  https://www.reactive-streams.org/ ([https](https://www.reactive-streams.org/) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* [ ] http://www.springframework.org/schema/data/repository/spring-repository.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/data/repository/spring-repository.xsd ([https](https://www.springframework.org/schema/data/repository/spring-repository.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool.xsd ([https](https://www.springframework.org/schema/tool/spring-tool.xsd) result 200).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://datastax.com/ with 1 occurrences migrated to:
  https://datastax.com/ ([https](https://datastax.com/) result 301).
* [ ] http://docs.spring.io/spring-data/cassandra/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/cassandra/docs/current/api/ ([https](https://docs.spring.io/spring-data/cassandra/docs/current/api/) result 301).
* [ ] http://docs.spring.io/spring-data/cassandra/docs/current/reference/html/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/cassandra/docs/current/reference/html/ ([https](https://docs.spring.io/spring-data/cassandra/docs/current/reference/html/) result 301).
* [ ] http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html with 2 occurrences migrated to:
  https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html ([https](https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html with 4 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html) result 301).
* [ ] http://forum.spring.io/forum/spring-projects/data/nosql with 1 occurrences migrated to:
  https://forum.spring.io/forum/spring-projects/data/nosql ([https](https://forum.spring.io/forum/spring-projects/data/nosql) result 301).
* [ ] http://help.github.com/forking/ with 1 occurrences migrated to:
  https://help.github.com/forking/ ([https](https://help.github.com/forking/) result 301).
* [ ] http://projects.spring.io/spring-data with 2 occurrences migrated to:
  https://projects.spring.io/spring-data ([https](https://projects.spring.io/spring-data) result 301).
* [ ] http://projects.spring.io/spring-data-cassandra with 1 occurrences migrated to:
  https://projects.spring.io/spring-data-cassandra ([https](https://projects.spring.io/spring-data-cassandra) result 301).
* [ ] http://www.datastax.com/what-we-offer/products-services/support with 1 occurrences migrated to:
  https://www.datastax.com/what-we-offer/products-services/support ([https](https://www.datastax.com/what-we-offer/products-services/support) result 301).
* [ ] http://www.springframework.org/schema/cql/spring-cql.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/cql/spring-cql.xsd ([https](https://www.springframework.org/schema/cql/spring-cql.xsd) result 301).
* [ ] http://www.springframework.org/schema/data/cassandra/spring-cassandra.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/data/cassandra/spring-cassandra.xsd ([https](https://www.springframework.org/schema/data/cassandra/spring-cassandra.xsd) result 301).
* [ ] http://www.threeten.org/threetenbp with 1 occurrences migrated to:
  https://www.threeten.org/threetenbp ([https](https://www.threeten.org/threetenbp) result 301).
* [ ] http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html with 1 occurrences migrated to:
  https://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html ([https](https://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html) result 302).
* [ ] http://repo.spring.io/libs-milestone with 2 occurrences migrated to:
  https://repo.spring.io/libs-milestone ([https](https://repo.spring.io/libs-milestone) result 302).
* [ ] http://repo.spring.io/libs-snapshot with 1 occurrences migrated to:
  https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302).
* [ ] http://www.springsource.org/download with 1 occurrences migrated to:
  https://www.springsource.org/download ([https](https://www.springsource.org/download) result 302).
* [ ] http://www.datastax.com/dev/blog with 1 occurrences migrated to:
  https://www.datastax.com/dev/blog ([https](https://www.datastax.com/dev/blog) result 307).

# Ignored
These URLs were intentionally ignored.

* http://www.springframework.org/schema/beans with 9 occurrences
* http://www.springframework.org/schema/context with 3 occurrences
* http://www.springframework.org/schema/cql with 7 occurrences
* http://www.springframework.org/schema/data/cassandra with 10 occurrences
* http://www.springframework.org/schema/data/cql with 1 occurrences
* http://www.springframework.org/schema/data/repository with 6 occurrences
* http://www.springframework.org/schema/tool with 12 occurrences
* http://www.w3.org/2001/XMLSchema with 6 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 3 occurrences

Original Pull Request: #150
2019-03-21 09:24:42 +01:00
Christoph Strobl
1d368a8c44 DATACASS-614 - Prepare 2.2 M2 (Moore). 2019-03-07 09:41:17 +01:00
Christoph Strobl
16a72f1525 DATACASS-614 - Updated changelog. 2019-03-07 09:41:10 +01:00
Mark Paluch
7a8f91ade3 DATACASS-576 - Add support for Optimistic Locking.
We now support Optimistic Locking for insert, update and delete operations leveraging Cassandra's lightweight transaction support. Modifying statements are enhanced with IF conditions to conditionally insert and modify rows and to prevent concurrent modifications by throwing OptimisticLockingFailureException.

@Table
class Person {

  @Id String id;
  String firstname;
  String lastname;
  @Version Long version;
}

Person daenerys = template.insert(new Person("Daenerys"));

Person tmp = template.findOne(query(where("id").is(daenerys.getId())), Person.class);

daenerys.setLastname("Targaryen");
template.save(daenerys);

template.save(tmp); // throws OptimisticLockingFailureException
2019-02-28 17:22:12 -08:00
Mark Paluch
0e624c9cc4 DATACASS-575 - Support IF conditions in lightweight transactions with UPDATE and DELETE.
We now support conditions in lightweight transactions for UPDATE and DELETE statements. Conditions are Filter objects similar to the WHERE clause. Conditions are supported for entity and query-based update/delete methods.

UpdateOptions options = UpdateOptions.builder().ifCondition(where("firstname").is("Walter")).build();
User user = new User("heisenberg", "Walter", "White");
template.update(user, options);

DeleteOptions options = DeleteOptions.builder().ifCondition(where("counter").is(42)).build();
Query query = Query.query(where("id").is("heisenberg")).queryOptions(options);
template.delete(query, User.class);
2019-02-26 17:45:10 -08:00
Mark Paluch
00734b67ea DATACASS-632 - Add ReactiveFluentCassandraOperations Coroutines extensions.
This commit introduces Coroutines support for ReactiveFluentCassandraOperations API via Kotlin extensions that provide suspendable functions prefixed by `await` or suffixed by `AndAwait` for Mono based APIs.

Extensions for Flux will be added when Kotlin/kotlinx.coroutines#254 is fixed.
2019-02-22 15:07:32 +01:00