|
15 | 15 | */
|
16 | 16 | package org.springframework.data.mapping.model;
|
17 | 17 |
|
| 18 | +import lombok.NonNull; |
| 19 | +import lombok.RequiredArgsConstructor; |
| 20 | + |
18 | 21 | import java.io.Serializable;
|
19 | 22 | import java.lang.annotation.Annotation;
|
20 | 23 | import java.util.ArrayList;
|
@@ -63,12 +66,11 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
63 | 66 |
|
64 | 67 | private final Map<String, P> propertyCache;
|
65 | 68 | private final Map<Class<? extends Annotation>, Annotation> annotationCache;
|
| 69 | + private final PersistentPropertyAccessorFactory propertyAccessorFactory; |
66 | 70 |
|
67 | 71 | private P idProperty;
|
68 | 72 | private P versionProperty;
|
69 | 73 |
|
70 |
| - private final PersistentPropertyAccessorFactory propertyAccessorFactory; |
71 |
| - |
72 | 74 | /**
|
73 | 75 | * Creates a new {@link BasicPersistentEntity} from the given {@link TypeInformation}.
|
74 | 76 | *
|
@@ -440,17 +442,17 @@ public Object getIdentifier() {
|
440 | 442 | *
|
441 | 443 | * @author Oliver Gierke
|
442 | 444 | */
|
| 445 | + @RequiredArgsConstructor |
443 | 446 | private static final class AssociationComparator<P extends PersistentProperty<P>>
|
444 | 447 | implements Comparator<Association<P>>, Serializable {
|
445 | 448 |
|
446 | 449 | private static final long serialVersionUID = 4508054194886854513L;
|
447 |
| - private final Comparator<P> delegate; |
448 |
| - |
449 |
| - public AssociationComparator(Comparator<P> delegate) { |
450 |
| - Assert.notNull(delegate); |
451 |
| - this.delegate = delegate; |
452 |
| - } |
| 450 | + private final @NonNull Comparator<P> delegate; |
453 | 451 |
|
| 452 | + /* |
| 453 | + * (non-Javadoc) |
| 454 | + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) |
| 455 | + */ |
454 | 456 | public int compare(Association<P> left, Association<P> right) {
|
455 | 457 | return delegate.compare(left.getInverse(), right.getInverse());
|
456 | 458 | }
|
|
0 commit comments