Module spring.data.mongodb
Class ReactiveAuditingEntityCallback
java.lang.Object
org.springframework.data.mongodb.core.mapping.event.ReactiveAuditingEntityCallback
- All Implemented Interfaces:
Ordered,EntityCallback<Object>,ReactiveBeforeConvertCallback<Object>
public class ReactiveAuditingEntityCallback
extends Object
implements ReactiveBeforeConvertCallback<Object>, Ordered
Reactive
EntityCallback to populate auditing related fields on an entity about to be saved.- Since:
- 2.2
- Author:
- Mark Paluch
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallbackusing the givenMappingContextandAuditingHandlerprovided by the givenObjectFactory. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()org.reactivestreams.Publisher<Object>onBeforeConvert(Object entity, String collection) Entity callback method invoked before a domain object is converted to be persisted.
-
Constructor Details
-
ReactiveAuditingEntityCallback
public ReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallbackusing the givenMappingContextandAuditingHandlerprovided by the givenObjectFactory.- Parameters:
auditingHandlerFactory- must not be null.
-
-
Method Details
-
onBeforeConvert
Description copied from interface:ReactiveBeforeConvertCallbackEntity callback method invoked before a domain object is converted to be persisted. Can return either the same of a modified instance of the domain object.- Specified by:
onBeforeConvertin interfaceReactiveBeforeConvertCallback<Object>- Parameters:
entity- the domain object to save.collection- name of the collection.- Returns:
- a
Publisheremitting the domain object to be persisted.
-
getOrder
public int getOrder()
-