Class BeforeConvertEvent<E>
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.data.relational.core.mapping.event.AbstractRelationalEvent<E>
org.springframework.data.relational.core.mapping.event.RelationalEventWithEntity<E>
org.springframework.data.relational.core.mapping.event.BeforeConvertEvent<E>
- All Implemented Interfaces:
Serializable
,RelationalEvent<E>
,WithEntity<E>
Gets published before an aggregate gets converted into a database change.
- Since:
- 1.1
- Author:
- Jens Schauder, Mark Paluch
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionBeforeConvertEvent
(E instance) BeforeConvertEvent
(E instance, AggregateChange<E> change) Deprecated. -
Method Summary
Methods inherited from class org.springframework.data.relational.core.mapping.event.RelationalEventWithEntity
getEntity, getType
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
BeforeConvertEvent
- Parameters:
instance
- the saved entity. Must not be null.- Since:
- 2.1.4
-
BeforeConvertEvent
Deprecated.since 2.1.4, useBeforeConvertEvent(Object)
as we don't expect anAggregateChange
before converting an aggregate.- Parameters:
instance
- the saved entity. Must not be null.change
- theAggregateChange
encoding the actions to be performed on the database as change. Since this event is fired before the conversion the change is actually empty, but contains information if the aggregate is considered new inAggregateChange.getKind()
. Must not be null.
-
BeforeConvertEvent(Object)
as we don't expect anAggregateChange
before converting an aggregate.