Class ReactiveAuditingEntityCallback
java.lang.Object
org.springframework.data.cassandra.core.mapping.event.ReactiveAuditingEntityCallback
- All Implemented Interfaces:
org.springframework.core.Ordered
,ReactiveBeforeConvertCallback<Object>
,org.springframework.data.mapping.callback.EntityCallback<Object>
public class ReactiveAuditingEntityCallback
extends Object
implements ReactiveBeforeConvertCallback<Object>, org.springframework.core.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
ConstructorDescriptionReactiveAuditingEntityCallback
(org.springframework.beans.factory.ObjectFactory<org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallback
using the givenMappingContext
andReactiveIsNewAwareAuditingHandler
provided by the givenObjectFactory
. -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
reactor.core.publisher.Mono<Object>
onBeforeConvert
(Object entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entity callback method invoked before a domain object is converted to be persisted.
-
Constructor Details
-
ReactiveAuditingEntityCallback
public ReactiveAuditingEntityCallback(org.springframework.beans.factory.ObjectFactory<org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) Creates a newReactiveAuditingEntityCallback
using the givenMappingContext
andReactiveIsNewAwareAuditingHandler
provided by the givenObjectFactory
.- Parameters:
auditingHandlerFactory
- must not be null.
-
-
Method Details
-
onBeforeConvert
public reactor.core.publisher.Mono<Object> onBeforeConvert(Object entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName) Description copied from interface:ReactiveBeforeConvertCallback
Entity callback method invoked before a domain object is converted to be persisted. Can return either the same or a modified instance of the domain object.- Specified by:
onBeforeConvert
in interfaceReactiveBeforeConvertCallback<Object>
- Parameters:
entity
- the domain object to save.tableName
- name of the table.- Returns:
- a
Publisher
emitting the domain object to be persisted.
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-