Commit Graph

66 Commits

Author SHA1 Message Date
Mark Paluch
ad5d2268ec Accept target type in KeyValueAdapter.entries(…) and getAllOf(…).
We now accept the target type in both methods to retain type hints so that the underlying adapter implementation can use this type when materializing object instances.

Original Pull Request: #356
2021-03-15 08:09:35 +01:00
Mark Paluch
21556462ab Update copyright year to 2021.
Closes #346.
2021-01-12 11:29:16 +01:00
Mark Paluch
58d0d4d4c6 DATAKV-332 - Migrate tests to JUnit 5. 2020-11-25 14:18:40 +01:00
Mark Paluch
c0ead79916 DATAKV-330 - Polishing.
Reorder methods.

Original pull request: #52.
2020-11-25 14:18:40 +01:00
Jens Schauder
54c7603496 DATAKV-330 - Implement CrudRepository.deleteAllById(Iterable<ID> ids).
Original pull request: #52.
2020-11-25 14:18:32 +01:00
Mark Paluch
bfd5f0152c DATAKV-321 - Adopt to changes in Spring Data Commons.
Update mocks with new behavior.
2020-09-22 16:15:26 +02:00
Mark Paluch
0e92913e8e DATAKV-280 - Enable building with Java 11.
Rely on inherited enforcer plugin configuration. Disable Querydsl tests that cannot be executed with Java9+.
2020-01-09 10:31:53 -06:00
Mark Paluch
c0b4dda728 DATAKV-285 - Update copyright years to 2020. 2020-01-07 08:56:06 +01:00
Mark Paluch
26107e7777 DATAKV-271 - Migrate tests to AssertJ. 2019-07-10 13:31:13 +02:00
Christoph Strobl
a73dda0736 DATAKV-268 - Polishing.
Add test for non annotation driven keyspace resolution and update documentation.

Original Pull Request: #46
2019-06-24 14:34:43 +02:00
Mark Paluch
e9128743b6 DATAKV-268 - Add SpEL support for @KeySpace.
We now support SpEL expressions in @KeySpace that gets evaluated on a per-operation basis.

@KeySpace("#{myProperty}")
class Person {}

Original Pull Request: #46
2019-06-24 14:23:56 +02:00
Christoph Strobl
f5e67237fb DATAKV-212 - Favor SimpleEvaluationContext over StandardEvaluationContext
This allows us to restrict data binding to be read only.
2019-04-26 10:12:45 +02:00
Spring Operator
115731519c DATAKV-253 - 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 2 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 79 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: #45
2019-03-22 18:16:32 +01:00
Oliver Drotbohm
9b44b2dccb DATAKV-251 - Removed off deprecations in Spring Data Commons.
Some additional polishing.

Related ticket: DATACMNS-1496.
2019-03-13 17:13:12 +01:00
Mark Paluch
fbd03cc484 DATAKV-244 - Update copyright years to 2019. 2019-01-02 14:02:26 +01:00
Mark Paluch
4f49fe98f4 DATAKV-225 - Add support for immutable objects.
Add return type to KeyValueOperations.insert/update methods to return potentially changed object instances. Return KeyValueOperations.insert/update method result in SimpleKeyValueRepository.save(…).
2018-07-12 10:42:24 +02:00
Oliver Gierke
1e14c4443b DATAKV-219 - Adapt to SpEL extension API changes in Spring Data Commons.
Related ticket: DATACMNS-1260.
2018-05-15 09:24:48 +02:00
Mark Paluch
6381daacc9 DATAKV-205 - Update copyright years to 2018. 2018-01-08 16:25:58 +01:00
Mark Paluch
83057f1288 DATAKV-197 - Introduce usage of nullable annotations for API validation.
Annotate all packages with Spring Frameworks @NonNullApi and @NonNullFields. 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.

Original Pull Request: #28
2017-09-27 14:21:31 +02:00
Mark Paluch
f0b3fc2b98 DATAKV-192 - Polishing.
Reduce member visibility according type visibility. Adapt to required argument in KeyValueRepository.findAll(Pageable). Replace cast with type to Class.cast(…). Use lombok for for getters/setters in test code. Suppress warnings, formatting.

Original pull request: #26.
2017-08-02 10:15:58 +02:00
Christoph Strobl
0025c03e5a DATAKV-192 - Move codebase to Java8 API.
Make use of stream lambdas in query execution. Remove copy of MetaAnnotationUtils in favor of @AliasFor usage.

Original pull request: #26.
2017-08-02 10:05:11 +02:00
Mark Paluch
14da42ff15 DATAKV-187 - Polishing.
Remove Serializable ID constraints from factory beans. Replace casts with type.cast(…). Convert anonymous inner classes to lambdas. Remove unused code and casts. Simplify test entities by removing Serializable and using lombok. Letter casing, formatting, Javadoc.

Original pull request: #25.
2017-07-21 15:31:59 +02:00
Christoph Strobl
d6ee87ace5 DATAKV-187 - Remove restriction of ID type to be Serializable.
Original pull request: #25.
2017-07-21 15:31:47 +02:00
Christoph Strobl
8f5fa59386 DATAKV-186 - Polishing.
Add missing author information and split test.

Original Pull Request: #24
2017-07-20 10:49:16 +02:00
EugeneNik
c5e0d1a26c DATAKV-186 - SimpleKeyValueRepository.existsById(…) now evaluates findById(…) results properly.
ExistsById now evaluates Optional.isPresent() instead of comparing findById result to null.

Original Pull Request: #24
2017-07-20 10:48:08 +02:00
Christoph Strobl
256bb16dba DATAKV-185 - Polishing.
Fix NPE by now returning an expression that always resolves to true.
2017-07-04 22:02:14 +02:00
Oliver Gierke
97a84c3445 DATAKV-179 - Adapt to API changes in QuerydslPredicateExecutor.findOne(…).
Related ticket: DATACMNS-1059.
2017-05-19 10:48:58 +02:00
Christoph Strobl
aa6e412602 DATAKV-176 - Adapt to API changes in repository interfaces.
We now follow a more consistent naming scheme for the methods in repository that are driven by the following guidelines:

* Methods referring to an identifier now all end on …ById(…).
* Methods taking or returning a collection are named …All(…)

Please see DATACMNS-944 for details.
2017-05-03 17:43:10 +02:00
Mark Paluch
3f21f10d78 DATAKV-170 - Fix KeyValue.getCriteria() method name.
Introduce KeyValue.getCriteria() method and deprecate KeyValue.getCritieria() for later removal. Use fixed method in affected classes.
2017-04-20 13:03:53 +02:00
Mark Paluch
12301efd94 DATAKV-169 - Polishing.
Fix typo in test method names. Some minor language level cleanups and removal of deprecated API usage.

Original pull request: #23.
2017-04-18 09:39:14 +02:00
Christoph Strobl
f67a66bf25 DATAKV-169 - Add support for IN keyword in derived queries.
We now support `In` keyword in derived finder methods (eg. `findByFirstnameIn(Collection<String> firstnames)`) when using SpEL based queries.

Original pull request: #23.
2017-04-18 09:38:58 +02:00
Oliver Gierke
3e9e6a97e0 DATAKV-159 - Adapt to API changes after Mockito upgrade to 2.7. 2017-03-24 10:12:15 +01:00
Christoph Strobl
d3fe2f2e56 DATAKV-159 - Integrate DATACMNS Java 8 upgrade.
Related to: DATACMNS-867
2017-03-24 10:11:44 +01:00
Mark Paluch
5444ea20f7 DATAKV-157 - Migrate ticket references in test code to Spring Framework style. 2017-01-13 09:56:35 +01:00
Oliver Gierke
33ac8d5fab DATAKV-153 - Adapt API in KeyValueRepositoryFactoryBean.
Related ticket: DATACMNS-891.
2016-12-15 16:19:26 +01:00
Christoph Strobl
37c9aa4012 DATAKV-142 - Consider PartTree.isLimiting() and PartTree.getMaxResults() when creating queries.
We now pick up result size limiting constraints from the query method name. This allows usage of `findTopN` and `findFirst` keywords.

Original pull request: #22.
2016-09-12 13:12:31 +02:00
Christoph Strobl
0ad24ece59 DATAKV-137 - Polishing.
Remove whitespaces & unused imports, fix warnings.

Original Pull Request: #20
2016-06-14 08:16:42 +02:00
Mark Paluch
302dfd407c DATAKV-137 - Fix cached query execution.
We now make sure that cached SpelCriteria's use the appropriate EvaluationContext containing parameters from the request instead of using the EvaluationContext of the cached query.

Original Pull Request: #20
2016-06-14 08:16:22 +02:00
Christoph Strobl
66534d2ae0 DATAKV-136 - Choose SecureRandom algorithm based on operating system and availability.
We now distinguish between operating systems when choosing a SecureRandom algorithm. Additionally we check the availability of the implementations and choose the first one available.

Original pull request: #21.
2016-06-13 13:19:50 +02:00
Christoph Strobl
fae6d418b6 DATAKV-117 - Pass on type information to KV Adapter.
Original pull request: #18.
2016-03-10 17:08:18 +01:00
Christoph Strobl
551b27deb2 DATAKV-112 - Make caching repository queries more explicit.
We introduced an explicit CachingKeyValuePartTreeQuery and allow setting the gernal repository query stategy via QueryCreatorType.
By default queries will not be cached.

Original pull request: #18.
2016-03-10 17:08:18 +01:00
Christoph Strobl
070be6e47d DATAKV-129 - Allow usage of @AliasFor with @KeySpace.
We now allow using Spring's meta-annotation programming model. Own meta-annotations can be composed using @KeySpace and @AliasFor annotation.
Example for a custom meta-annotation corresponding to @KeySpace("sessions") when it's used with @SessionsKeyspace class MyEntity {…}:

@Persistent
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
@KeySpace
public @interface SessionsKeyspace {

	@AliasFor(annotation = KeySpace.class, attribute = "value")
	String name() default "sessions";
}

Original pull request: #19.
2016-03-10 17:06:47 +01:00
Oliver Gierke
874b2bc880 DATAKV-123 - Introduced dedicated KeyValueRepositoryFactoryBean.createRepositoryFactory(…).
We now expose a dedicated method for implementors to use to create the repository factory instance based on the configuration of the factory.

Added unit tests to make sure the factory bean fails fast if it's configured improperly.

Original Pull Request: #17
2016-02-11 10:02:17 +01:00
Oliver Gierke
40fe2addac DATAKV-115 - Polishing.
Introduced dedicated constructor on SpelCriteria to default the EvaluationContext to StandardEvaluationContext. Switched to ternary if in KeyValuePartTreeQuery for both application of Pageable and Sort. Tweaked unit test to actually compile in Eclipse.

Original pull request: #16.
2016-02-09 15:51:47 +01:00
Christoph Strobl
e22ee22e58 DATAKV-115 - Make derived finder execution thread-safe.
We now make sure separate SpelExpression and EvaluationContext for each and every derived finder execution to assert the expression context cannot be accidentally overridden.

Original pull request: #16.
2016-02-09 15:50:19 +01:00
Oliver Gierke
d1df6d5e76 DATAKV-121 - Added support for projections on repository query methods.
Repository methods can now return interfaces that act as projections on the original entity instances stored in the repository.

Related ticket: DATACMNS-89.
2015-12-14 19:57:34 +01:00
Oliver Gierke
e7efe2912c DATAKV-119 - Upgraded to Querydsl 4. 2015-11-17 13:43:29 +01:00
Oliver Gierke
d7b2c0f499 DATAKV-114 - Polishing.
Polished newly added unit tests. Added missing license header and JavaDoc where necessary. More speaking variable names. Removed unnecessary code from test domain type.

Original pull request: #15.
2015-11-02 06:33:39 +01:00
Martin Macko
95c56c8dd4 DATAKV-114 - Fixed NullPointerException in SpelQueryEngine.
Original pull request: #15.
2015-11-02 06:31:28 +01:00
Oliver Gierke
3371a6b7a2 DATAKV-104 - Polishing.
Moved configuration setters under constructors of KeyValueTemplate.

Original pull request: #12.
2015-05-19 17:49:12 +02:00