Class AuditingEntityCallback

java.lang.Object
org.springframework.data.mongodb.core.mapping.event.AuditingEntityCallback
All Implemented Interfaces:
org.springframework.core.Ordered, EntityCallback<Object>, BeforeConvertCallback<Object>

public class AuditingEntityCallback extends Object implements BeforeConvertCallback<Object>, org.springframework.core.Ordered
EntityCallback to populate auditing related fields on an entity about to be saved.
Since:
2.2
Author:
Mark Paluch
  • Constructor Details

  • Method Details

    • onBeforeConvert

      public Object onBeforeConvert(Object entity, String collection)
      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.
      collection - name of the collection.
      Returns:
      the domain object to be persisted.
    • getOrder

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