Module spring.data.elasticsearch
Class ReactiveAuditingEntityCallback
java.lang.Object
org.springframework.data.elasticsearch.core.event.ReactiveAuditingEntityCallback
- All Implemented Interfaces:
Ordered,ReactiveBeforeConvertCallback<Object>,EntityCallback<Object>
public class ReactiveAuditingEntityCallback
extends Object
implements ReactiveBeforeConvertCallback<Object>, Ordered
EntityCallback to populate auditing related fields on an entity about to be saved.- Since:
- 4.0
- Author:
- Peter-Josef Meisch, Roman Puchkovskiy
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallbackusing the givenReactiveIsNewAwareAuditingHandlerprovided by the givenObjectFactory. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()onBeforeConvert(Object entity, IndexCoordinates index) Callback method that will be invoked before an entity is persisted.
-
Constructor Details
-
ReactiveAuditingEntityCallback
public ReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallbackusing the givenReactiveIsNewAwareAuditingHandlerprovided by the givenObjectFactory.- Parameters:
auditingHandlerFactory- must not be null.
-
-
Method Details
-
onBeforeConvert
Description copied from interface:ReactiveBeforeConvertCallbackCallback method that will be invoked before an entity is persisted. Can return the same or a different instance of the domain entity class.- Specified by:
onBeforeConvertin interfaceReactiveBeforeConvertCallback<Object>- Parameters:
entity- the entity being convertedindex- must not be null.- Returns:
- the entity to be converted
-
getOrder
public int getOrder()
-