Class ReactiveAuditingEntityCallback

java.lang.Object
org.springframework.data.r2dbc.mapping.event.ReactiveAuditingEntityCallback
All Implemented Interfaces:
Ordered, org.springframework.data.mapping.callback.EntityCallback<Object>, BeforeConvertCallback<Object>

public class ReactiveAuditingEntityCallback extends Object implements BeforeConvertCallback<Object>, Ordered
Reactive EntityCallback to populate auditing related fields on an entity about to be saved.
Since:
1.2
Author:
Mark Paluch
  • Constructor Details

    • ReactiveAuditingEntityCallback

      public ReactiveAuditingEntityCallback(ObjectFactory<org.springframework.data.auditing.ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory)
      Creates a new BeforeConvertCallback 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, SqlIdentifier table)
      Description copied from interface: BeforeConvertCallback
      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 interface BeforeConvertCallback<Object>
      Parameters:
      entity - the domain object to save.
      table - name of the table.
      Returns:
      the domain object to be persisted.
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface Ordered