org.springframework.data.relational.core.mapping.event

## Interface BeforeConvertCallback<T>

All Superinterfaces:
  EntityCallback<T>

All Known Implementing Classes:
  RelationalAuditingCallback

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface BeforeConvertCallback<T>
    extends EntityCallback<T>

An `EntityCallback` that gets invoked before the aggregate is converted into a database change. The decision if the change will be an insert or update is made before this callback gets called.

Since:
  1.1
Author:
  Jens Schauder, Mark Paluch

### Method Summary

All Methods Instance Methods Abstract Methods
`T` `onBeforeConvert(T aggregate)` Entity callback method invoked before an aggregate root is converted to be persisted.

### Method Detail

#### onBeforeConvert

    T onBeforeConvert(T aggregate)

Entity callback method invoked before an aggregate root is converted to be persisted. Can return either the same or a modified instance of the aggregate.

Parameters:
  `aggregate` - the saved aggregate.
Returns:
  the aggregate to be persisted.