Class ReactiveAuditingBeforeBindCallback
java.lang.Object
org.springframework.data.neo4j.core.mapping.callback.ReactiveAuditingBeforeBindCallback
- All Implemented Interfaces:
Ordered,EntityCallback<Object>,ReactiveBeforeBindCallback<Object>
@API(status=STABLE,
since="6.0.2")
public final class ReactiveAuditingBeforeBindCallback
extends Object
implements ReactiveBeforeBindCallback<Object>, Ordered
Reactive
EntityCallback to populate auditing related fields on an entity about to be bound to a record.- Since:
- 6.0.2
- Author:
- Michael J. Simons
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionReactiveAuditingBeforeBindCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingBeforeBindCallbackusing theAuditingHandlerprovided by the givenObjectFactory. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()org.reactivestreams.Publisher<Object>onBeforeBind(Object entity) Entity callback method invoked before a domain object is saved.
-
Field Details
-
NEO4J_REACTIVE_AUDITING_ORDER
public static final int NEO4J_REACTIVE_AUDITING_ORDER- See Also:
-
-
Constructor Details
-
ReactiveAuditingBeforeBindCallback
public ReactiveAuditingBeforeBindCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingBeforeBindCallbackusing theAuditingHandlerprovided by the givenObjectFactory.- Parameters:
auditingHandlerFactory- must not be null.
-
-
Method Details
-
onBeforeBind
Description copied from interface:ReactiveBeforeBindCallbackEntity callback method invoked before a domain object is saved. Can return either the same or a modified instance of the domain object. This method is called before converting theentityto aMap, so the outcome of this callback is used to create the record for the domain object.- Specified by:
onBeforeBindin interfaceReactiveBeforeBindCallback<Object>- Parameters:
entity- the domain object to save.- Returns:
- the domain object to be persisted.
-
getOrder
public int getOrder()
-