Commit Graph

2768 Commits

Author SHA1 Message Date
Oliver Drotbohm
8aff631032 Improve reference documentation on repository methods triggering event publication.
Fixes #2855.
2023-06-14 16:29:49 +02:00
Mark Paluch
f9c1ef9493 Polishing.
Reorganize imports.

See #2854
2023-06-14 15:25:43 +02:00
Mark Paluch
1eda9c497f De-lombok test code.
Closes #2854
2023-06-14 15:23:50 +02:00
Mark Paluch
f1b7952ea5 Use merged bean definitions for EntityCallback type lookup.
We now use the merged bean definition to resolve the defined EntityCallback type.

Previously, we used just the bean definition that might have contained no type hints because of ASM-parsed configuration classes.

Closes #2853
2023-06-14 09:25:26 +02:00
Mark Paluch
2cbf0fb189 Extend documentation on sorting for Keyset scrolling.
Closes #2846
2023-06-13 12:00:57 +02:00
Mark Paluch
05d68a0eab Consider KeysetScrollPosition direction in WindowIterator.
We now consider the scroll direction in the iterator to properly continue Keyset backward scrolling.

Closes #2851
2023-06-13 11:52:34 +02:00
Mark Paluch
487795dcee Upgrade to Maven Wrapper 3.9.2.
See #2850
2023-06-13 08:54:57 +02:00
Mark Paluch
b98a03e189 Use snapshot and milestone repositories instead of libs-snapshot and libs-milestone.
Closes #2842
2023-06-06 09:30:39 +02:00
Mark Paluch
bfcb2ffeae Unwrap nested collections in default Querydsl binding.
When binding values to collection-like paths, we now unwrap potentially double-wrapped collections as QuerydslPredicateBuilder attempts to convert the binding value to the type of the path.

Our default is a contains binding for single elements.

Closes #2834
2023-06-02 10:29:57 +02:00
Mark Paluch
2937d620ad Remove CloseableIterator from supported repository return types.
`CloseableIterator` wasn't intended to be here in the first place as it is only an intermediate type.

Closes #2835
2023-05-30 10:16:30 +02:00
Mark Paluch
9b9d01c1a0 Adopt to changed AwaitKt utility.
Closes #2832
2023-05-23 11:59:20 +02:00
Mark Paluch
c6879a8bf6 Refine allocation of DefaultMethodInvokingMethodInterceptor.
We now reduce allocations of DefaultMethodInvokingMethodInterceptor by reusing DefaultMethodInvokingMethodInterceptor within a ProxyProjectionFactory. We also reduced allocations during default method discovery and reuse the default methods information within the projection information cache.

Closes #2831
2023-05-17 10:33:07 +02:00
Christoph Strobl
82241238ab After release cleanups.
See #2821
2023-05-12 14:18:53 +02:00
Christoph Strobl
f5e2fb1a54 Prepare next development iteration.
See #2821
2023-05-12 14:18:51 +02:00
Christoph Strobl
06f99322a2 Release version 3.1 GA (2023.0.0).
See #2821
2023-05-12 14:14:38 +02:00
Christoph Strobl
807323d115 Prepare 3.1 GA (2023.0.0).
See #2821
2023-05-12 14:14:06 +02:00
Mark Paluch
46ff9d25a6 Allow reversing Sort.
We now allow reversing the sort order of Sort instances to flip ASC and DESC sort orders.

Closes #2805
2023-05-11 16:13:19 +02:00
Mark Paluch
1ba2932275 Polishing.
Reorder methods.

See #2823
2023-05-11 16:13:18 +02:00
Jens Schauder
fd0964ab72 Make all args Sort.Order constructor public.
The other constructors are already public, and this one is actually needed by subclasses.

Closes #2823
2023-05-11 16:12:59 +02:00
Mark Paluch
69dbb75896 Polishing.
Remove superfluous declarations, fix toString description.

See #2824
2023-05-11 11:10:44 +02:00
Stefano Cordio
63fecdd06e Fix Sort JavaDoc.
Original pull request #2825
2023-05-03 10:38:29 +02:00
Oliver Drotbohm
979e0f401b Fix too restrictive entity callback matching.
We now properly support generic entity callbacks defined via lambda declarations.

Fixes #2822.
2023-05-02 20:54:49 +02:00
Oliver Drotbohm
cac1c211ef Polishing Window scrolling API.
Moved general-purpose factory methods to the common ScrollPosition interface. Introduced a couple of domain specific methods to conveniently work with both Keyset- (to e.g. change direction) and OffsetScrollPosition (to e.g. advance the offset). Consolidated unit tests accordingly.

Moved WindowIterator to ….data.support package. Fixed case of Direction enum values.

Fixes #2824.
2023-04-27 18:02:30 +02:00
p.anisimov
ccd56ef56e Simplify PreferredConstructorDiscovererUnitTests.
Leverage things like Java var keyword to simplify test cases.

Resolves #2695.
Related: #2694.
Original pull request: #2724.
2023-04-24 12:31:59 -05:00
Greg L. Turnquist
c71f2fb8fe After release cleanups.
See #2798
2023-04-14 12:00:00 -05:00
Greg L. Turnquist
c88de96f8b Prepare next development iteration.
See #2798
2023-04-14 11:59:54 -05:00
Greg L. Turnquist
ea706e6886 Release version 3.1 RC1 (2023.0.0).
See #2798
2023-04-14 11:53:57 -05:00
Greg L. Turnquist
9f2fc7570a Prepare 3.1 RC1 (2023.0.0).
See #2798
2023-04-14 11:53:16 -05:00
Mark Paluch
124930eaf5 Upgrade to Maven Wrapper 3.9.1.
See #2815
2023-04-06 16:16:22 +02:00
Oliver Drotbohm
c3b29a5644 Polish Javadoc of PersistentEntity regarding iteration order of PersistentProperty instances.
Fixes #2814.
2023-04-04 13:23:44 +02:00
Oliver Drotbohm
03a6a84bf9 Polishing in mapping package.
Nullable annotations and Objects.equals(…) and Objects.hash(…)/Objects.hashCode(…). Records for internal cache key.

Related issue: #2813.
2023-04-04 11:32:52 +02:00
Oliver Drotbohm
55e14952c8 Remove deprecations in PersistentPropertyAccessor.
Related issue: #2813.
2023-04-04 11:32:52 +02:00
Oliver Drotbohm
35a2f45736 Tighten nullability contract of PersistentPropertyPath.
We should change the definition of `PersistentPropertyPath` to — in its public API — not allow empty instances anymore. Those violate the concept and bleed into the concept's API by having to make all methods nullable (returning null in exactly that "empty" case). An empty property path doesn't make any actual sense as you cannot reasonably answer the methods declared on the interface except by returning null, which then causes client code having to verify the returned values all the time.

This is now changed into only making `PersistentPropertyPath.getParentPath()` nullable and letting it return null for single segment paths. Adapted client code accordingly. `….getRequiredLeadProperty()` is now deprecated in favour of `….getLeafProperty()` not returning null anymore.

Fixes #2813.
2023-04-04 11:32:43 +02:00
Oliver Drotbohm
83162b25c7 Improve lambda-based EntityCallback detection.
In case an EntityCallback is declared as lambda expression, the JVM does not expose any generics information about the target entity type the callback shall be applied to. This commit changes the callback lookup and processing so that in case the generics information is not detectable on the type, we fall back to the BeanDefinition's resolvable type (fed by the factory method's return type which carries the necessary reflection information). That generics information is then kept in the newly introduce EntityCallbackAdapter and the code inspecting the actual entity type for matches then uses the resolvable type held in that. Also, the actual callback invocation is done on the adapter's delegate.

Removed the ability of the discoverer to register EntityCallbacks by bean name as that was not used in the public API at all and it avoids duplicating the bean definition type detection. A couple of minor additional cleanups (records for cache key, methods static where possible and with lower visibility etc.)

Fixes #2812.
2023-04-04 09:23:29 +02:00
Michael J. Simons
a257a0399a Gracefully skip non-assignable reactive lambda callbacks on Java 18+.
Closes #2808, #2809.
2023-04-04 09:05:02 +02:00
Mark Paluch
e1ec982e88 Polishing.
Reorder null-handling and collection return types in documentation to improve topical flow.

See #2804
2023-03-29 11:20:26 +02:00
Mark Paluch
f903ddcddc Refine documentation of Paging, Sorting and Scrolling.
Closes #2804
2023-03-29 11:20:26 +02:00
Greg L. Turnquist
3ba098604f Polishing. 2023-03-28 15:46:00 -05:00
Greg L. Turnquist
233edd88fd Test against Java 20 in CI.
See #2803.
2023-03-28 15:29:18 -05:00
Greg L. Turnquist
08b039e0fa Update CI properties.
See #2798
2023-03-28 13:58:08 -05:00
Christoph Strobl
6328b4cd19 After release cleanups.
See #2778
2023-03-20 15:05:35 +01:00
Christoph Strobl
5b690b2684 Prepare next development iteration.
See #2778
2023-03-20 15:05:33 +01:00
Christoph Strobl
695412ed60 Release version 3.1 M3 (2023.0.0).
See #2778
2023-03-20 15:01:47 +01:00
Christoph Strobl
712e7821a2 Prepare 3.1 M3 (2023.0.0).
See #2778
2023-03-20 15:01:19 +01:00
Mark Paluch
755bd19744 Fix broken and known-redirect links in reference documentation.
See #2774
2023-03-20 11:00:38 +01:00
Mark Paluch
02ce74f86f Polishing.
Tweak wording.

See #2794
Original pull request: #2794
2023-03-20 10:14:02 +01:00
Tim Feuerbach
959bde4d37 Recommend Java records instead of Lombok for class-based projections.
Closes #2793
Original pull request: #2794
2023-03-20 10:08:40 +01:00
Oliver Drotbohm
77de8aafff Clarification on the the term CRUD methods in reference documentation.
Fixes #2792.
2023-03-19 12:45:15 +01:00
Mark Paluch
2564f6a049 Polishing.
Refactor WindowIterator to return individual objects during scrolling.

Original Pull Request: #2787
2023-03-16 13:11:50 +01:00
Christoph Strobl
0c0c1afc8e Add WindowIterator and rename Scroll to Window.
The intend of WindowIterator is to support users who need to iterate multiple windows. It keeps track of the position and loads the next window if needed so that the user does not have to interact with the position at all.

Also remove the Window methods to get the first/last position and enforce the index based variant.

Update the documentation to make use of the newly introduced API.

See: #2151
Original Pull Request: #2787
2023-03-16 13:10:40 +01:00