From 965cc1e94f7064de1c9afefb9f71fcf2119529ea Mon Sep 17 00:00:00 2001 From: shin-mallang Date: Wed, 16 Aug 2023 09:32:39 +0900 Subject: [PATCH] Added supplementary comment in AbstractAggregateRoot. Added additional comment regarding registerEvent and andEvent in AbstractAggregateRoot. --- .../springframework/data/domain/AbstractAggregateRoot.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/data/domain/AbstractAggregateRoot.java b/src/main/java/org/springframework/data/domain/AbstractAggregateRoot.java index 7feb4ba15f..c24bc974a6 100644 --- a/src/main/java/org/springframework/data/domain/AbstractAggregateRoot.java +++ b/src/main/java/org/springframework/data/domain/AbstractAggregateRoot.java @@ -38,7 +38,7 @@ public class AbstractAggregateRoot> { private transient final @Transient List domainEvents = new ArrayList<>(); /** - * Registers the given event object for publication on a call to a Spring Data repository's save methods. + * Registers the given event object for publication on a call to a Spring Data repository's save or delete methods. * * @param event must not be {@literal null}. * @return the event that has been added. @@ -86,7 +86,8 @@ protected final A andEventsFrom(A aggregate) { } /** - * Adds the given event to the aggregate for later publication when calling a Spring Data repository's save-method. + * Adds the given event to the aggregate for later publication + * when calling a Spring Data repository's save or delete method. * Does the same as {@link #registerEvent(Object)} but returns the aggregate instead of the event. * * @param event must not be {@literal null}.