Class ReactiveIsNewAwareAuditingHandler
java.lang.Object
org.springframework.data.auditing.AuditingHandlerSupport
org.springframework.data.auditing.ReactiveAuditingHandler
org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler
AuditingHandler
extension that uses PersistentEntity.isNew(Object)
to expose a generic
markAudited(Object)
method that will route calls to ReactiveAuditingHandler.markCreated(Object)
or
ReactiveAuditingHandler.markModified(Object)
based on the IsNewStrategy
determined from the factory.- Since:
- 2.4
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorDescriptionCreates a newReactiveIsNewAwareAuditingHandler
for the givenPersistentEntities
. -
Method Summary
Modifier and TypeMethodDescriptionfrom
(MappingContext<?, ?> mappingContext) Factory method that creates a newReactiveIsNewAwareAuditingHandler
for the givenMappingContext
.reactor.core.publisher.Mono<Object>
markAudited
(Object object) Marks the given object created or modified based onPersistentEntity.isNew(Object)
.Methods inherited from class org.springframework.data.auditing.ReactiveAuditingHandler
markCreated, markModified, setAuditorAware
Methods inherited from class org.springframework.data.auditing.AuditingHandlerSupport
isAuditable, setDateTimeForNow, setDateTimeProvider, setModifyOnCreation
-
Constructor Details
-
ReactiveIsNewAwareAuditingHandler
Creates a newReactiveIsNewAwareAuditingHandler
for the givenPersistentEntities
.- Parameters:
entities
- must not be null.
-
-
Method Details
-
from
Factory method that creates a newReactiveIsNewAwareAuditingHandler
for the givenMappingContext
.- Parameters:
mappingContext
- must not be null.- Since:
- 3.0
-
markAudited
Marks the given object created or modified based onPersistentEntity.isNew(Object)
. Will route the calls toReactiveAuditingHandler.markCreated(Object)
andReactiveAuditingHandler.markModified(Object)
accordingly.- Parameters:
object
- must not be null.
-