Commit Graph

1930 Commits

Author SHA1 Message Date
Sangwoo Lee
ff02d34474 DATACMNS-1557 - Fix typo in Sort Javadoc.
From `ASC` to `DESC`.

Original pull request: #400.
2019-07-29 11:07:00 +02:00
Mark Paluch
88b0b3c924 DATACMNS-1556 - Store values as array in ParametersParameterAccessor.
Prevents changes in store modules that expose values as array.
2019-07-25 14:12:11 +02:00
Mark Paluch
b8c0a2fa8f DATACMNS-1556 - Deeply inspect query results deeply for the need of query post-processing.
We now inspect returned Collections whether we need to convert these at all. If not, we skip conversion.

Also, allocate GenericConversionService only once for memory-efficiency.
2019-07-25 14:12:11 +02:00
Mark Paluch
94c4713e0f DATACMNS-1556 - Conditionally copy and unwrap query method arguments.
ParametersParameterAccessor now inspects invocation arguments whether we need to unwrap these at all. If not, we skip copying the list of values.
2019-07-25 14:12:11 +02:00
Mark Paluch
f1bc778098 DATACMNS-1556 - Remove capturing lambdas from hot code paths.
Replaced orElseThrow with if blocks. Introduce nullable RepositoryComposition.getMethod(Method) to avoid Optional handling in hot code paths.
2019-07-25 14:12:11 +02:00
Mark Paluch
972449ef2d DATACMNS-1556 - Limit default method invocation only to interfaces that actually declare default methods. 2019-07-25 14:12:11 +02:00
Mark Paluch
293bbd9a63 DATACMNS-1556 - General performance improvements in repository execution.
We now avoid the allocation of an Optional instance in the lookup of a dynamic projection in ParameterAccessor. Also, Lazy now exposes a ….getNullable() to be favored over ….getOptional() for hot code paths.

Replaced Stream and Optional usage with for-loops and nullable return values. Reuse parameter names to avoid repeated annotation lookups. Reuse result from Parameters.getBindable(). Introduce ParametersParameterAccessor.getValues() to consistently reuse a single accessor instance allowing access to the unwrapped values. Introduce type cache to QueryExecutionConverters to quickly reject types that do not require wrapping. Avoid recalculation of QueryMethod.isCollectionQuery().
2019-07-25 14:12:11 +02:00
Oliver Drotbohm
e0f2d65d73 DATACMNS-1555 - Support for extracting properties during a PersistentPropertyPath traversal.
PersistentPropertyAccessor now has an overloaded method to pass in a TraversalContext that can be prepared to property handlers for PersistentProperties. During the traversal, the handler is called with the value for the property so that it can e.g. extract list elements, map values etc.
2019-07-22 10:56:07 +02:00
Greg Turnquist
a0bcc5e20e DATACMNS-1536 - Polishing. 2019-07-19 12:04:48 -05:00
Greg Turnquist
1698a35477 DATACMNS-1536 - Publish documentation for main branch. 2019-07-19 12:04:48 -05:00
Mark Paluch
704913c866 DATACMNS-1554 - Polishing.
Replace AtTest(expected = …) and ExpectedException with the corresponding AssertJ assertThatExceptionOfType(…) and assertThatIllegalArgumentException().isThrownBy(…).
2019-07-10 11:47:46 +02:00
Mark Paluch
660006b8c9 DATACMNS-1554 - Migrate tests to AssertJ. 2019-07-10 10:32:25 +02:00
Mark Paluch
31975b5a24 DATACMNS-1553 - Fix typo. 2019-07-10 09:43:01 +02:00
Mark Paluch
6ccf9c0fde DATACMNS-1536 - Polishing.
Remove superfluous files.
2019-07-09 10:09:48 +02:00
Mark Paluch
7421ff0658 DATACMNS-1536 - Cleanup release profile.
Reuse inherited configuration from parent pom.
2019-07-09 10:09:48 +02:00
Mark Paluch
17379422d0 DATACMNS-1553 - Revise readme for a consistent structure. 2019-07-09 10:09:48 +02:00
Mark Paluch
ddd66ca8e7 DATACMNS-1553 - Remove readme for lettercasing change. 2019-07-09 09:57:14 +02:00
Greg Turnquist
6cd3100753 DATACMNS-1536 - Only use labeled nodes for CI jobs. 2019-07-05 12:07:51 -05:00
Oliver Drotbohm
fa9e5b799a DATACMNS-1552 - Test case to verify Option values are returned as is.
Make sure that the fix for DATACMNS-1524 fixes this ticket as well. A bit of whitespace in QueryExecutionResultHandler.
2019-07-04 12:23:14 +02:00
Greg Turnquist
0defbe3fa6 DATACMNS-1536 - Set build retention policy.
Also properly mount jenkins home folder for CI jobs.
2019-07-03 10:35:59 -05:00
Greg Turnquist
dc540118b3 DATACMNS-1536 - Polishing. 2019-07-02 10:49:18 -05:00
Greg Turnquist
009c5b3049 DATACMNS-1536 - Use Common 'artifactory' profile. 2019-07-02 10:40:16 -05:00
Oliver Drotbohm
d29fefca5b DATACMNS-1524 - Fix performance regression in QueryExecutionResultHandler.
A side effect of the fix for DATACMNS-1482 trigged source objects that already perfectly match the desired return type would still be subject to detailed inspection of potential conversions, which – by definition – will not kick in.

The code has now been changed to only trigger detailed inspection for collection values.

Related tickets: DATACMNS-1482.
2019-07-02 14:25:08 +02:00
Oliver Drotbohm
736d147446 DATACMNS-1550 - Polishing.
Javadoc wording and formatting.
2019-07-01 15:34:19 +02:00
Jens Schauder
f29756e5f8 DATACMNS-1550 - Added RevisionType to RevisionMetadata. 2019-07-01 15:34:19 +02:00
Mark Paluch
1e98932278 DATACMNS-1545 - Polishing.
Fix dangling callout.

Original pull request: #398.
2019-07-01 15:05:45 +02:00
Christoph Strobl
62f05057ec DATACMNS-1545 - Fix documentation anchors for entity callback API.
Original pull request: #398.
2019-07-01 15:05:40 +02:00
Oliver Drotbohm
ed0d30b4d6 DATACMNS-1551 - Polishing.
Method order in SortHandlerMethodArgumentResolver.
2019-07-01 14:30:48 +02:00
Oliver Drotbohm
4c1aed27d6 DATACMNS-1551 - SortHandlerMethodArgumentResolver now drops dot-only property segments.
If plain dots were submitted as elements in a Sort expression to be parsed by SortHandlerMethodArgumentResolver, those dots would be considered a property of the sort expression, which is of course wrong. We now drop property candidates solely consisting of dots and whitespace.
2019-07-01 14:16:09 +02:00
Greg Turnquist
bf1e00e93f DATACMNS-1536 - Don't always build based on an upstream cause. 2019-06-28 15:48:49 -05:00
Greg Turnquist
7186e98fa5 DATACMNS-1536 - Add upstream CI dependency for SD Build. 2019-06-26 10:55:38 -05:00
Greg Turnquist
d4572260c6 DATACMNS-1536 - Configure user.name and user.home for CI jobs. 2019-06-24 10:25:54 -05:00
Michael Simons
38b08f4e27 DATACMNS-1548 - Fix JavaDoc on AuditingHandler#setModifyOnCreation.
Original pull request: #397.
2019-06-24 10:54:39 +02:00
Christoph Strobl
7d5baebf35 DATACMNS-1514 - After release cleanups. 2019-06-14 15:12:52 +02:00
Christoph Strobl
64f1a2abbe DATACMNS-1514 - Prepare next development iteration. 2019-06-14 15:12:51 +02:00
Christoph Strobl
083e3e41a9 DATACMNS-1514 - Release version 2.2 RC1 (Moore). 2019-06-14 14:44:25 +02:00
Christoph Strobl
defee9437a DATACMNS-1514 - Prepare 2.2 RC1 (Moore). 2019-06-14 14:43:17 +02:00
Christoph Strobl
d729791238 DATACMNS-1514 - Updated changelog. 2019-06-14 14:43:07 +02:00
Christoph Strobl
b16db35660 DATACMNS-1532 - Updated changelog. 2019-06-14 13:27:14 +02:00
Christoph Strobl
84049e9f8e DATACMNS-1467 - Apply suggested documentation changes.
Original Pull Request: #332
2019-06-07 14:30:48 +02:00
Mark Paluch
687222d1fa DATACMNS-1467 - Polishing.
Tweak docs.

Original Pull Request: #332
2019-06-07 14:30:00 +02:00
Christoph Strobl
dde9a651ba DATACMNS-1467 - Decouple sync and reactive bits.
Add dedicated interfaces for sync and reactive usage.
Hide default implementation and use reflective callback method lookup.
Update documentation and add initial reference documentation snippet for store specific modules.

Original Pull Request: #332
2019-06-07 14:29:00 +02:00
Mark Paluch
52724cd5dd DATACMNS-1467 - Entity Callback API draft.
This is a draft for a possible Entity Callback API heavily inspired by Spring Framework's Application Event listeners. Entity callbacks are callbacks for entities that allow for entity modification at certain check points such as before saving an entity or after loading it.

Entity callbacks consist of a marker-interface for all entity callback types and the EntityCallbacks API to dispatch callbacks.

Entity callbacks are picked up from the ApplicationContext and invoked sequentially according to their ordering.

Usage example:

AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(MyConfig.class);

SimpleEntityCallbacks callbacks = new SimpleEntityCallbacks(ctx);

PersonDocument personDocument = new PersonDocument(null, "Walter", null);
PersonDocument afterCallback = callbacks.callback(personDocument, BeforeSaveCallback.class,
		BeforeSaveCallback::onBeforeSave);

Mono<PersonDocument> afterCallback = callbacks.callbackLater(personDocument, ReactiveBeforeSaveCallback.class,
		ReactiveBeforeSaveCallback::onBeforeSave);

@Configuration
static class MyConfig {

	@Bean
	BeforeSaveCallback<Person> personCallback() {
		return object -> {
			object.setSsn(object.getFirstName().length());
			return object;
		};
	}

	@Bean
	MyReactiveBeforeSaveCallback callback() {
		return new MyReactiveBeforeSaveCallback();
	}

}

class MyReactiveBeforeSaveCallback implements ReactiveBeforeSaveCallback<Person> {

	@Override
	public Mono<Person> onBeforeSave(Person object) {

		PersonDocument result = new PersonDocument(object.getFirstName().length(), object.getFirstName(),
				object.getLastName());

		return Mono.just(result);
	}
}

Original Pull Request: #332
2019-06-07 14:26:38 +02:00
Mark Paluch
83611de861 DATACMNS-1500 - URL Cleanup. 2019-06-05 11:16:03 +02:00
Jens Schauder
467f60ffdc DATACMNS-1538 - Polishing.
Removed Hamcrest and the `ExpectedException` rule and replaced it with AssertJ.
Removed now obsolete assertions checking against old Spring Framework versions.
Formatting.

Original pull request: #396.
2019-06-05 11:00:28 +02:00
arielcarrera
098842765d DATACMNS-1538 - Repository proxy post processors in CDI.
Add support for custom repository proxy post processors in CDI.

Original pull request: #396.
2019-06-05 10:54:57 +02:00
Mark Paluch
0f1d4970ef DATACMNS-1541 - Create security policy readme. 2019-05-31 15:20:35 +02:00
Greg Turnquist
fbb364e831 DATACMNS-1536 - Fix issue branch building. 2019-05-29 08:12:28 -05:00
Greg Turnquist
23ca15e884 DATACMNS-1536 - Inline all CI commands. 2019-05-28 10:36:51 -05:00
Greg Turnquist
88cfab4bcc DATACMNS-1536 - Disable concurrent builds. 2019-05-28 08:55:50 -05:00