Interface BeforeBindCallback<T>
- Type Parameters:
T
- The type of the entity.
- All Superinterfaces:
EntityCallback<T>
- All Known Implementing Classes:
AuditingBeforeBindCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@API(status=STABLE,
since="6.0.2")
public interface BeforeBindCallback<T>
extends EntityCallback<T>
Entity callback triggered before an Entity is bound to a record (represented by a
java.util.Map<String, Object>
).- Since:
- 6.0.2
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptiononBeforeBind
(T entity) Entity callback method invoked before a domain object is saved.
-
Method Details
-
onBeforeBind
Entity callback method invoked before a domain object is saved. Can return either the same or a modified instance of the domain object. This method is called before converting theentity
to aMap
, so the outcome of this callback is used to create the record for the domain object.- Parameters:
entity
- the domain object to save.- Returns:
- the domain object to be persisted.
-