Use hasItem assertion matchers for asserting insert values as contains asserts all values within the collection and we just want to pick particular entries to assert.
We now allow registering CustomConversions to register custom converters (read and write targets). CustomConversions registers by default JSR-310, Joda Time and ThreeTen backport type converters.
These types (LocalDate, LocalDateTime) can be used in domain classes and with query method arguments. Date-only types map to Cassandra's date type, Date and time types map to Cassandra's timestamp type. Type mapping works for singular and collection types (List and Set).
```
@Table
public Person
@Id String id;
java.time.LocalDate date;
@CassandraType(type = Name.TIMESTAMP)
java.time.LocalDate timestamp;
List<org.threeten.bp.Instant> timestamps;
}
```
Original pull request: #68.
Extend alter table specification and the linked CQL generator to support RENAME and DROP operations. Cleanup code in that area.
Original pull request: #69.
We now support the removal of columns for properties with null values by allowing null values in Insert and Update statements written by MappingCassandraConverter. Objects are stored with all persistent properties. Insert and update perform no longer conditional inserting of non-null values but take all values into account.
Original pull request: #72.
Extends date range in license headers. Apply formatting rules. Create BeanDefinitionTestUtils and simplify tests. Add ticket references.
Original pull request: #66.
We now support java.util.stream.Stream as return type on query methods. Streaming queries wrap the iterator returned by Cassandra's ResultSet. Elements are fetched in batches (see QueryOptions that can be set in CassandraCqlClusterFactoryBean) and processed element by element instead of reading all results. Streaming queries are supported only for select queries.
Original pull request: #65.
We now support @PrimaryKey and @PrimaryKeyColumn annotations on property accessors and mixed declarations. This change also fixes the assumption that declarations are solely allowed on fields.
Original pull request: #64.
Move test listeners into a common support package. Hide constructors and introduce factory methods. Encapsulate fields. Add volatile modifier to fields to prevent visibility issues. Enhance JavaDoc on CassandraOperations.
CachedPreparedStatementCreator is now thread-safe and synchronizes concurrent calls to statement preparation. The synchronization prevents multiple calls to Session.prepare(…) for the same session, CQL statement and keyspace.
Configuring username/password authentication does no longer require setting of an AuthProvider which would be overwritten by the username/password authenticator.
Update years in license headers where needed. Apply Spring Data formatting to method blocks. Add issue reference to tests. Remove trailing whitespaces. Remove throws declarations in CqlTemplate for runtime exceptions. Add author tags. Adjust JavaDoc about not null parameters. Align not null assertion messages with Spring Data wording.
Original pull request: #61.
Add author tags. Add/update license headers where needed. Remove calls to deprecated methods. Adopt pooling options after the driver update. Add hints_directory for Cassandra 3.
Reduce driver baseline to core driver 3.0.1. The DSE driver requires the core driver itself and can be added as dependency to user projects while retaining full compatibility. As of now the DSE driver is rc1 hence it requires core rc1.
Use getTimestamp for timestamp type methods as the driver aligned the method to the type. Support short, byte and time. Enable LocalDate return type and add tests for native supported types.
Change long to bigint type as long was mapped to the counter type when creating tables. Align the default to bigint as bigint is the better choice since table creation uses mostly regular tables and not counter tables. Type can be overriden using @CassandraType.
We now support setting NettyOptions on CassandraCqlClusterFactoryBean and AbstractClusterConfiguration. The cassandra driver 2.1.9 changed its default shutdown behavior by introducing a 2 second quiet period when shutting down Cluster instances. This change was retained throughout the 3.0 driver which slow the test down by an order of magnitude. Configure QueryOptions on tests to prevent delays caused by the asynchronous schema refresh.
Original pull request: #56.
Related pull request: #52.
Related ticket: DATACASS-169.
This commit adds support for Cassandra 3.x with upgrading to Datastax Driver 3.0.0. Data type deserialization is performed using the CodecRegistry.
Original pull request: #52.
Related ticket: DATACASS-169.
We now support Optional provided by Spring Data Commons on Repository methods carrying the appropriate element type.
This commit refactors the mapping layer for Cassandra query methods with following changes: Pull mapping from AbstractCassandraQuery into AbstractCassandraConverter. Throw UnsupportedOperationException in deprecated AbstractCassandraQuery.setConversionService method. Refactor conditional execution to CassandraQueryExecution pattern and follow CassandraConverters/CustomConversions pattern. Introduce DtoInstantiatingConverter and Reading/Writing converters. Refactor lookup map creation to multiple methods. Rename fields. Remove unused primitiveTypesByWrapperType. Fix error message of getDataTypeNamesFrom method.
Add JavaDoc and extend not-null assertions with a meaningful message.
Remove Java 7 build profile from TravisCI as these changes require the usage of Java 8 within the tests.
Original pull request: #53
Related ticket: DATACASS-247
Add tests for CassandraCqlClusterFactoryBean and AbstractClusterConfiguration. Update license headers. Extend JavaDoc. Rearrange fields in CassandraCqlClusterFactoryBean to reflect grouping similar to the client.
Original pull request: #31.
Replace CassandraUnit test rule with own test rule that honors the external/embedded Cassandra preference. Move Cassandra server initialization into CassandraRule. Introduce a KeyspaceRule to provide managed keyspaces on test class level. Allow cached cluster connections by enabling CassandraRule as class rule. A test that requires a running Cassandra instance needs to either extend the AbstractEmbeddedCassandraIntegrationTest or add the test rule CassandraRule to its test.
Consolidate connection properties (before merging the spring-cql and spring-data-cassandra modules) and simplify config properties classes. Add cleanup after the test run to remove temporary keyspaces. This change allows repeating test runs on a stateful Cassandra instance (e.g. an externally started Cassandra instance). Rename config file and change references to renamed files to support the consolidated connection properties in context config files.
Removed FunkyIdentifierIntegrationTest as it only tests creating tables using reserved Cassandra words. Spring Data Cassandra does not constrain CQL identifiers so maybe later we'll add a test to verify the implemented rules.
Exclude logback-core dependency from cassandra-all. Remove jamm dependency in tests as it's not used. Removed cassandra-unit dependency as the usage is very little. Removed unnecessary hector dependency.
Rename all integration tests to end with "IntegrationTests" and unit tests to end with "UnitTests". Move unit tests to the system under test package to enable testing of package-private types and members. Add missing license headers and author tags. Reformat all test code using the Spring Data Eclipse formatting.
Original pull request: #51
While these process methods have quite a few problems and inconsistencies with respect to the exception handling, only the more egregious 'throw' omissions are addressed in this commit.
Original pull request: #42.
The method DataType.deserialize(ByteBuffer) is deprecated and throws an `UnsupportedOperationException`.
This methods will be removed in future versions of the driver. By not using them anymore we make it easier to upgrade the driver afterwards.
Original pull request: #49.
Related ticket: DATACASS-198
CLA: 172420160413064110 (Stefan Birkner)
Add author. Add/update license headers where needed. Improve JavaDoc. Tweaked test names. Adopted current driver behavior in tests.
Original pull request: #41.
Use slf4j syntax for parameter substitution. Guard debug log statements. Use improved log messages in log events and Exception. Reformat code.
Original pull request: #47.
We now support out-of-the box mapping for enum-typed properties in domain types and primary keys. Enums are mapped using their name. Ordinal-based enum mapping is not supported but can be achieved by registering a custom converter.
Original pull request: #47.