728 Commits

Author SHA1 Message Date
Spring Operator
16500da531 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 3 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 582 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: #157
2019-03-22 11:13:33 +01:00
Spring Operator
1d6e8b8850 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).

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).

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

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 5 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* 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 200).
* http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar with 1 occurrences migrated to:
  https://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar ([https](https://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar) result 200).
* http://www.pivotal.io with 2 occurrences migrated to:
  https://www.pivotal.io ([https](https://www.pivotal.io) result 301).

These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 10 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 5 occurrences

Resolves gh-147.
2019-03-18 16:44:45 -07:00
Mark Paluch
633b90493f DATACASS-399 - Create JMH benchmarks.
Add benchmarks for plain reads and writes without mapping and using object mapping.
2017-02-09 08:36:14 +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
Mark Paluch
48c6240c9f DATACASS-388 - Improve JavaDoc for configuration classes. 2017-01-20 11:02:29 +01:00
Mark Paluch
7563e9b27e DATACASS-381 - Improve integration test stability.
Reuse Thread pools during integration test runs to not recreate and dispose Threads multiple times. Increase build and Cassandra memory. Use an external Cassandra instance for TravisCI build jobs.
2017-01-20 09:43:40 +01:00
Mark Paluch
361b9028c8 DATACASS-386 - Update project documentation with the CLA tool integration. 2017-01-13 11:30:15 +01:00
Mark Paluch
b247181a34 DATACASS-385 - Migrate ticket references in test code to Spring Framework style. 2017-01-11 12:06:50 +01:00
Mark Paluch
cc537c995d DATACASS-355 - Polishing.
Extend JavaDoc. Add ticket reference to test method. Reorder methods. Add leading line to multi-statement methods.
2017-01-06 11:25:54 +01:00
Mark Paluch
b750a355bb DATACASS-355 - Drop tables before dropping user types.
We now drop Cassandra tables before dropping user types as user types cannot be removed when they are used in table definitions. Schema creation and schema drops are now split into two classes.
2017-01-06 11:25:51 +01:00
Mark Paluch
ece5475988 DATACASS-380 - Polishing.
Guard tests against incompatible Cassandra versions.
2017-01-03 16:21:55 +01:00
Mark Paluch
1cba62f887 DATACASS-380 - Upgrade to Cassandra Driver 3.1.2. 2017-01-03 16:10:21 +01:00
Mark Paluch
762f40abd7 DATACASS-352 - Polishing.
Reformat code. Add ticket references to test methods. Deprecate Comparator IT instances because of their unintuitive names and re-introduce it under INSTANCE.
2017-01-03 11:35:06 +01:00
Mark Paluch
6570e653a7 DATACASS-352 - Compare persistent properties using column names in CassandraPersistentPropertyComparator.
We now compare persistent properties using their column names when both columns are regular columns. Column names either respect a defined column name or determine a column name based on the property name.

Previously, the comparison extracted the column name itself and in case the other column was not annotated, the column compared with itself, the column name with its own property name which breaks the comparator contract.
2017-01-03 11:34:47 +01:00
Mark Paluch
cc00fe735b DATACASS-379 - Add package documentation. 2017-01-03 09:18:55 +01:00
Oliver Gierke
18564cb6ca DATACASS-353 - Updated changelog. 2016-12-21 19:35:28 +01:00
Mark Paluch
4910ad3f35 DATACASS-370 - Use newer Java 8 on Travis CI. 2016-12-16 10:58:57 +01:00
Oliver Gierke
2affe27fa5 DATACASS-369 - Adapt API in ReactiveCassandraRepositoryFactoryBean.
Related tickets: DATACMNS-891.
2016-12-16 10:00:56 +01:00
Oliver Gierke
019588bc78 DATACASS-369 - Adapt API in CassandraRepositoryFactoryBean.
Related tickets: DATACMNS-891.
2016-12-16 09:38:03 +01:00
John Blum
09ef94cc2f DATACASS-272 - Polish. 2016-12-14 00:29:57 -08:00
Mark Paluch
38b8ea4d35 DATACASS-272 - Revise readme.
Reflect requirements. Consolidate configuration bits. Align with other Spring Data readme files.
2016-12-14 00:29:49 -08:00
Mark Paluch
dfe393b060 DATACASS-272 - Explain primary key handling. 2016-12-14 00:29:43 -08:00
Mark Paluch
2ed1b69dc0 DATACASS-272 - Consistently use Spring Data for Apache Cassandra. 2016-12-14 00:29:37 -08:00
Mark Paluch
005c82a3fd DATACASS-360 - Document schema management. 2016-12-14 00:29:30 -08:00
Mark Paluch
1d68c17cae DATACASS-272 - Add composed annotations to what's new section. 2016-12-14 00:29:23 -08:00
Mark Paluch
714e2ba3b6 DATACASS-272 - Extend documentation.
Improve documentation on CassandraTemplate. Explain differences between Spring CQL and Spring Data Cassandra. Add User-Defined-Type mapping example. Fix typos.
2016-12-14 00:29:15 -08:00
Mark Paluch
dcd5e4c05b DATACASS-272 - Add mapping/converter configuration and repository support to documentation. 2016-12-14 00:29:09 -08:00
Mark Paluch
b5ace86df9 DATACASS-272 - Enhance the SD Cassandra Reference Guide.
Align documentation structure with other Spring Data Modules. Add chapters for mapping and supported data types. Add new features chapter. Merge existing documentation into the aligned structure. Add John Blum and Mark Paluch to pom.xml.
2016-12-14 00:29:01 -08:00
John Blum
0834c44770 DATACASS-272 - Review and edit the SD Cassandra Reference Guide. 2016-12-14 00:28:53 -08:00
Mark Paluch
eb19493bc6 DATACASS-364 - Register CassandraRepositoryFactory in spring.factories.
This is required for the switch in support for multi-store detection.

Related ticket: DATACMNS-952.
2016-12-05 16:14:26 +01:00
John Blum
371a1d208f DATACASS-359 - Polish for reactive repository query methods DTO projections support.
Original pull request: #91.
2016-12-05 16:12:31 +01:00
Mark Paluch
c076d835d3 DATACASS-359 - Support DTO projections on reactive repository query methods.
Original pull request: #91.
2016-12-05 16:11:52 +01:00
Mark Paluch
0315e360e7 DATACASS-363 - Add import order config file.
Delete also attic directory since it's not required anymore.
2016-11-30 09:23:35 +01:00
John Blum
8ec905c442 DATACASS-360 - Polish. 2016-11-29 20:15:20 -08:00
Mark Paluch
979a075853 DATACASS-359 - Support DTO projections.
We now support DTO projections for query methods. DTO projection selects records from Cassandra and applies projected results on the DTO. DTOs are plain Java objects that fit to the underlying entity.

@Table
class Person {

  @PrimaryKeyColumn(type = PrimaryKeyType.PARTITIONED, ordinal = 0) private String lastname;
  @PrimaryKeyColumn(type = PrimaryKeyType.CLUSTERED, ordinal = 1) private String firstname;

  private String nickname;
  private Date birthDate;

  // more columns
}

interface PersonRepository extends CrudRepository<Person, String> {
  Collection<PersonDto> findPersonDtoBy();

  <T> T findDtoByFirstnameStartsWith(String prefix, Class<T> projectionType);
}

class PersonDto {
  public String firstname, lastname;

  public PersonDto(String firstname, String lastname) {

    this.firstname = firstname;
    this.lastname = lastname;
  }
}
2016-11-29 14:11:34 -08:00
Mark Paluch
996275188c DATACASS-360 - Do not require @Table annotation.
We no longer require entities to be annotated with @Table for data mapping and CRUD operations.
Entities without @Table can be still mapped in both directions and will be excluded from schema-management to prevent table creation for unwanted classes.

A class annotated with @Table will participate in schema management and be exposed as a table entity. Classes used as entities without @Table can still be used to query Cassandra but schema management will not create any tables for these classes.

@Table // entity qualified for schema management
class Person {
  @Id private String id;
  private String lastname;
  private String firstname;
}

// entity that can be used for
// select/insert/update/delete operations and repository use
class Person {
  @Id private String id;
  private String lastname;
  private String firstname;
}
2016-11-29 14:10:33 -08:00
John Blum
ff69fb2423 DATACASS-357 - Polish. 2016-11-28 17:40:34 -08:00
Mark Paluch
db7af357f8 DATACASS-357 - Move parameter conversion to MappingCassandraConverter.
Previously, query method parameter conversion was handled separately. This was duplicate code and the code additionally converted arguments into property types regardless the further usage. Collection arguments (e.g. for IN query usage) could be converted into the property type (List of String converted into String).

 We now handle collection conversion and single element conversion separately so collections are no longer converted into the property's type. Collection elements are now inspected individually regarding their type/simple type conversion.

 This change also considers enum types as simple types with a distinct conversion of the enum value into a Cassandra value (numeric, character). The change in enum value handling reduces the scope of the conversion service usage and prevents accidental conversion.

Original pull request: #89.
2016-11-28 17:40:19 -08:00
John Blum
47ebed51f9 DATACASS-259 - Polish. 2016-11-28 16:27:53 -08:00
Mark Paluch
847db1a52b DATACASS-259 - Allow usage of Spring 4.2 @AliasFor for Cassandra annotations.
We now support @AliasFor to build composed annotations with @Table, @UserDefinedType, @PrimaryKey, @PrimaryKeyClass, @PrimaryKeyColumn, @Column, @Query, @CassandraType.

Original pull request: #90.
2016-11-28 16:26:07 -08:00
Mark Paluch
3b717be06a DATACASS-351 - Revert Spring Data Cassandra 1.5 changes in 1.0 schema files.
Revert added features in version 1.0 schema files in favor of version 1.5 schema files. Remove license header. Remove TODOs and fix documentation source names.
2016-11-28 15:30:00 +01:00