Skip to content

Commit 732a9ee

Browse files
committed
Polishing.
Reintroduce deprecated constructor to retain compile compatibility. Update Javadoc. See #910 Original pull request: #913
1 parent 9a23493 commit 732a9ee

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/BeforeConvertEvent.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,30 @@
2222
*
2323
* @since 1.1
2424
* @author Jens Schauder
25+
* @author Mark Paluch
2526
*/
2627
public class BeforeConvertEvent<E> extends RelationalEventWithEntity<E> {
2728

2829
private static final long serialVersionUID = -5716795164911939224L;
2930

31+
/**
32+
* @param instance the saved entity. Must not be {@literal null}.
33+
* @since 2.1.4
34+
*/
35+
public BeforeConvertEvent(E instance) {
36+
super(instance);
37+
}
38+
3039
/**
3140
* @param instance the saved entity. Must not be {@literal null}.
3241
* @param change the {@link AggregateChange} encoding the actions to be performed on the database as change. Since
3342
* this event is fired before the conversion the change is actually empty, but contains information if the
3443
* aggregate is considered new in {@link AggregateChange#getKind()}. Must not be {@literal null}.
44+
* @deprecated since 2.1.4, use {@link #BeforeConvertEvent(Object)} as we don't expect an {@link AggregateChange}
45+
* before converting an aggregate.
3546
*/
36-
public BeforeConvertEvent(E instance) {
47+
@Deprecated
48+
public BeforeConvertEvent(E instance, AggregateChange<E> change) {
3749
super(instance);
3850
}
3951
}

0 commit comments

Comments
 (0)