Commit Graph

887 Commits

Author SHA1 Message Date
Oliver Gierke
e084ec2efd DATACASS-480 - After release cleanups. 2017-09-11 17:40:21 +02:00
Oliver Gierke
1cf3595b6b DATACASS-480 - Prepare next development iteration. 2017-09-11 17:40:18 +02:00
Oliver Gierke
bdbcb3565b DATACASS-480 - Release version 2.0 RC3 (Kay). 2017-09-11 17:24:45 +02:00
Oliver Gierke
8aa59ff4a2 DATACASS-480 - Prepare 2.0 RC3 (Kay). 2017-09-11 17:23:52 +02:00
Oliver Gierke
6dc6421076 DATACASS-480 - Updated changelog. 2017-09-11 17:23:44 +02:00
Mark Paluch
e53972880a DATACASS-481 - Updated changelog. 2017-09-11 12:43:51 +02:00
Mark Paluch
759ef416ed DATACASS-490 - Switch to VM-based TravisCI build.
We now switched to VM-based builds by requiring sudo to apply higher memory limits as we exceeded memory limits of the container-based build.
2017-09-05 09:46:35 +02:00
Mark Paluch
183c502f7e DATACASS-128 - Add tests to verify simple type mapping.
Add tests that verify Java class to Cassandra type mapping for simple types that are supported natively by the driver.

Related tickets: DATACASS-271, DATACASS-280, DATACASS-375.
2017-08-30 10:45:52 +02:00
Mark Paluch
b8192424eb DATACASS-488 - Add explicit type mappings for Name.VARCHAR and Name.TEXT.
We map varchar and text types explicitly to data types to ensure resolution to the appropriate data type if queried by name. The driver returns only text via DataType.allPrimitiveTypes() because text and varchar are aliases and allPrimitiveTypes returns a set.
2017-08-04 09:34:24 +02:00
Mark Paluch
57f4c38073 DATACASS-486 - Polishing.
Fix javadoc in synchronous/asynchronous CQL operations.
2017-08-04 08:52:57 +02:00
Mark Paluch
34af38b15f DATACASS-486 - Use unique property names in UDT reference documentation example. 2017-08-04 08:52:57 +02:00
Mark Paluch
7dc3364d8e DATACASS-482 - Polishing.
Reduce method visibility on protected types. Remove deprecated methods. Formatting, reorder methods, Javadoc.

Introduce CqlIdentifier.of(…) and KeyspaceIdentifier.of(…) methods and deprecate CqlIdentifier.cqlId(…) and KeyspaceIdentifier.ksId(…) methods.
2017-08-02 10:17:49 +02:00
Mark Paluch
df045de2fa DATACASS-482 - Refactor KeyspaceActionSpecificationBean to produce KeyspaceActions.
Remove indirection via MultiLevelSetFlattenerFactoryBean and create a KeyspaceActions wrapper that encapsulates the actual actions. Introduce KeyspaceActionSpecificationFactory for keyspace action creation.
2017-08-02 10:17:49 +02:00
Mark Paluch
88d7bb231a DATACASS-482 - Introduce KeyspaceSpecifications factory methods.
Encapsulate required KeyspaceSpecification properties in immutable base classes. Introduce static factory methods to create value objects where possible. Rewrite Javadoc to reflect the nature of configuration objects and not builders since these objects to not build a target object. Refactor duplicate code into utility classes.
2017-08-02 10:17:49 +02:00
Mark Paluch
94d6a3ddc7 DATACASS-482 - Introduce usage of nullable annotations for API validation.
Mark all packages with Spring Frameworks @NonNullApi. Add Spring's @Nullable to methods, parameters and fields that take or produce null values. Adapted using code to make sure the IDE can evaluate the null flow properly. Fix Javadoc in places where an invalid null handling policy was advertised. Strengthened null requirements for types that expose null-instances.

Encapsulate KeyspaceIdentifier and CqlIdentifier with static factory methods to avoid temporary null state of fields.

Require non-null QueryOptions and provide empty option instances. Introduce methods returning non-null values (getRequired…()) for code paths known to operate on values that are available.
2017-08-02 10:17:49 +02:00
Mark Paluch
14a5f9f41b DATACASS-483 - Polishing.
Replace explicit type arguments with diamond syntax. Use Collections.empty…() instead of Collections.EMPTY_…
2017-08-02 10:17:49 +02:00
Mark Paluch
de343e2d6c DATACASS-483 - Add @FunctionalInterface to functional interfaces. 2017-08-02 10:17:48 +02:00
Oliver Gierke
ad8eb9a989 DATACASS-477 - Updated changelog. 2017-07-27 00:48:52 +02:00
Oliver Gierke
9711a45d98 DATACASS-478 - After release cleanups. 2017-07-25 16:10:38 +02:00
Oliver Gierke
044adb0635 DATACASS-478 - Prepare next development iteration. 2017-07-25 16:10:33 +02:00
Oliver Gierke
0918075327 DATACASS-478 - Release version 2.0 RC2 (Kay). 2017-07-25 15:34:23 +02:00
Oliver Gierke
9800c953e5 DATACASS-478 - Prepare 2.0 RC2 (Kay). 2017-07-25 15:33:32 +02:00
Oliver Gierke
115a930b4a DATACASS-478 - Updated changelog. 2017-07-25 15:33:20 +02:00
Mark Paluch
9d73a0db5c DATACASS-479 - Polishing.
Use domain type via ResultProcessor as input type for PartTree instead of EntityInformation.
2017-07-25 14:02:56 +02:00
Mark Paluch
16790dc4a0 DATACASS-479 - Return domain type if projection type is an interface.
We now return the domain type via CassandraQueryMethod.getEntityInformation() for query derivation. Previously, interface types were returned and they were used as input type for query derivation. Query methods referencing domain type properties that do not exist on the projection type caused PropertyReferenceException.
2017-07-25 13:59:53 +02:00
Oliver Gierke
42b2a42db9 DATACASS-464 - After release cleanups. 2017-07-25 10:00:08 +02:00
Oliver Gierke
11297949f3 DATACASS-464 - Prepare next development iteration. 2017-07-25 10:00:03 +02:00
Oliver Gierke
4b483a24b5 DATACASS-464 - Release version 2.0 RC1 (Kay). 2017-07-25 09:48:48 +02:00
Oliver Gierke
ea70bdbf36 DATACASS-464 - Prepare 2.0 RC1 (Kay). 2017-07-25 09:48:01 +02:00
Oliver Gierke
1592e5cfc5 DATACASS-464 - Updated changelog. 2017-07-25 09:47:49 +02:00
Oliver Gierke
e65b026cb0 DATACASS-461 - Updated changelog. 2017-07-24 22:20:37 +02:00
John Blum
5b44fd0962 DATACASS-213, DATACASS-306 - Polish.
Resolves PR #111.
2017-07-23 22:14:31 -07:00
Mark Paluch
9d3e12e3c4 DATACASS-306 - Create SASI indexes for annotated properties.
We now create SASI (SSTable Attached Secondary Index) indexes during session initialization for properties annotated with @SASI. Properties can be annotated with analyzer-annotations to configure analyzers.

@Table
public class Person {

		@Id String id;

		@SASI String names;

    @SASI @StandardAnalyzed(value = "de",
                enableStemming = true, normalization = Normalization.UPPERCASE,
                skipStopWords = true) String profession;

		@SASI @NonTokenizingAnalyzed String country;
}
2017-07-23 22:02:27 -07:00
Mark Paluch
4a0abd0f66 DATACASS-213 - Create secondary indexes for annotated properties.
We now create secondary indexes for annotated properties via @Indexed. Index creation is part of schema creation that is executed after Session initialization and table creation.

We support plain secondary indexes and key/value/entry indexes for map columns. Index creation is useful for rapid development but should not be used in large setups or at least with care to not impact performance in a negative way.

@Table
public class Person {

  @Id
  private String key;

  @Indexed("name_index")
  private String name;

  private Map<@Indexed String, String> keys;
}
2017-07-23 22:02:20 -07:00
Mark Paluch
c39cc959bf DATACASS-476 - Inherit Project Reactor version from dependency management.
Adapt to BOM import in Spring Data Build pom.
2017-07-20 11:14:15 +02:00
Mark Paluch
ac0d34fe2c DATACASS-362 - Add tests to assert composite key usage in …ById template methods.
Extend Javadoc to mention the accepted Id types. Add tests to verify query creation via MappingCassandraConverter.
2017-07-19 10:50:44 +02:00
Mark Paluch
ca501ba936 DATACASS-469 - Remove CassandraOperations.selectBySimpleIds(…).
We no longer expose selectBySimpleIds(…) via CassandraOperations. selectBySimpleIds was a limited short-cut method that create a SELECT statement using the primary key name and using Id values as-is without applying type conversions. The replacement is to use a select(…) method accepting Query and an appropriate query:

select(query(where("id")).in("key", "other-key"), Person.class)

assuming the primary key property is id.
2017-07-18 15:43:22 +02:00
Mark Paluch
eb9def7a4c DATACASS-451 - Adapt to deprecated RxJava 1 CRUD repositories.
Move off RxJava1CrudRepository as base repository in tests by extending just Repository and declaring query methods/overloads using RxJava1 types.
2017-07-18 14:00:43 +02:00
Mark Paluch
1db32834e1 DATACASS-468 - Polishing.
Increase CassandraRepositoryConfigurationExtension visibility as this class is required by configuration infrastructure that configures Cassandra repository support such as Spring Boot.

Initialize MappingCassandraConverter with generic custom conversions and resolve package cycle between mapping and convert by initializing MappingCassandraConverter with generic custom conversions. Cassandra-specific custom conversions require external wiring via configuration.

Move IdInterfaceValidator to mapping package to resolve the final cycle between mapping and repository.support.
2017-07-18 13:31:43 +02:00
Oliver Gierke
780981e971 DATACASS-468 - Refactored NamespaceHandler setup to correct package dependency direction.
Introduced CassandraRepositoryNamespaceHandler to extend the core one and register the parser for the repositories element. Consolidated schemas into cassandra.config package. Reduced configuration class visibility where possible.
2017-07-18 13:31:43 +02:00
Mark Paluch
d400dea386 DATACASS-468 - Merge o.s.d.cql into o.s.d.cassandra.
Resolve o.s.d.cql package to expose only a single top-level package. Components of the dissolved org.springframework.data.cql package are located in other packages:

* o.s.d.cql.config and subpackages -> o.s.d.cassandra.config
* o.s.d.cql.core.session -> o.s.d.cassandra and o.s.d.cassandra.core.cql.session
* o.s.d.cql.cql.support.exception -> o.s.d.cassandra and o.s.d.cassandra.cql
* o.s.d.cql -> o.s.d.cassandra.core.cql
* Move MapId from o.s.d.cassandra.repository.support to o.s.d.cassandra.mapping

Merge test.integration package with repository test package.
2017-07-18 13:31:35 +02:00
John Blum
54528c6910 DATACASS-475 - Simplify logic in afterPropertiesSet for Cassandra CQL Cluster and Session FactoryBeans. 2017-07-07 13:04:15 -07:00
John Blum
1d4db2cc92 DATACASS-466 - Polish.
Resolves gh-110.
2017-07-07 12:07:49 -07:00
John Blum
3ee187f89a DATACASS-474 - Polish.
Resolves gh-110.
2017-07-07 12:07:40 -07:00
Mark Paluch
0ccb64a686 DATACASS-466 - Align insert(…) and update(…) return types to their possible outcomes.
We now return WriteResult for insert(…) and update(…) methods accepting WriteOptions. Conditional writes return a state whether the operation was applied or not and this result is propagated via WriteResult to the caller.

Synchronous insert(…) and update(…) without WriteOptions methods do not return a value and are consistent with other Template API modules. The absence of an Exception indicates success. Asynchronous and reactive insert(…) and update(…) without WriteOptions continue to return the entity to make the entity accessible after operation completion.

Previously, we returned null if a lightweight transaction was not applied or suppressed the value value emission.
2017-07-07 12:04:53 -07:00
Mark Paluch
2f0f87e9c2 DATACASS-474 - Remove reactive Template API methods accepting Publisher of entities.
Removing insert(…), update(…) and delete(…) methods accepting Publisher because these methods hide that Cassandra does not support multi-row writes. We don't want to set expectations to support a streaming feature that isn't natively supported.
2017-07-07 12:04:45 -07:00
John Blum
60eeae9d31 DATACASS-376 - Polish.
Resolves gh-108.
2017-07-06 17:15:44 -07:00
Mark Paluch
add94d2ea6 DATACASS-376 - Support ALLOW FILTERING using derived query methods.
We now support allow filtering using derived query methods by annotating query methods with AllowFiltering.

interface PersonRepository extends Repository<Person, String> {

    @AllowFiltering
    List<Person> findAllByFirstname(String firstname);
}
2017-07-06 17:13:08 -07:00
John Blum
64a0380e86 DATACASS-375 - Polish.
Resolves gh-109.
2017-07-06 16:29:59 -07:00
Mark Paluch
57c034be64 DATACASS-375 - Map UUID to uuid.
We now map Java's UUID by default to uuid instead of previously timeuuid. The uuid type is a better default after all and comes without the time type restriction.
2017-07-06 16:29:53 -07:00