Class ReactiveAuditingEntityCallback

java.lang.Object
org.springframework.data.mongodb.core.mapping.event.ReactiveAuditingEntityCallback
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.data.mapping.callback.EntityCallback<Object>, ReactiveBeforeConvertCallback<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

    Constructors
    Constructor
    Description
    ReactiveAuditingEntityCallback(org.springframework.beans.factory.ObjectFactory<org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory)
    Creates a new ReactiveAuditingEntityCallback using the given MappingContext and AuditingHandler provided by the given ObjectFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    org.reactivestreams.Publisher<Object>
    onBeforeConvert(Object entity, String collection)
    Entity callback method invoked before a domain object is converted to be persisted.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReactiveAuditingEntityCallback

      public ReactiveAuditingEntityCallback(org.springframework.beans.factory.ObjectFactory<org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory)
      Creates a new ReactiveAuditingEntityCallback using the given MappingContext and AuditingHandler provided by the given ObjectFactory.
      Parameters:
      auditingHandlerFactory - must not be null.
  • Method Details

    • onBeforeConvert

      public org.reactivestreams.Publisher<Object> onBeforeConvert(Object entity, String collection)
      Description copied from interface: ReactiveBeforeConvertCallback
      Entity 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:
      onBeforeConvert in interface ReactiveBeforeConvertCallback<Object>
      Parameters:
      entity - the domain object to save.
      collection - name of the collection.
      Returns:
      a Publisher emitting the domain object to be persisted.
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered