此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Data Relational 3.4.5spring-doc.cadn.net.cn

EntityCallbacks

Spring Data R2DBC uses the EntityCallback应用程序接口 for its auditing support and reacts on the following callbacks.spring-doc.cadn.net.cn

Table 1. Supported Entity Callbacks
Callback Method Description Order

BeforeConvertCallbackspring-doc.cadn.net.cn

onBeforeConvert(T entity, SqlIdentifier table)spring-doc.cadn.net.cn

Invoked before a domain object is converted to OutboundRow.spring-doc.cadn.net.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cadn.net.cn

AfterConvertCallbackspring-doc.cadn.net.cn

onAfterConvert(T entity, SqlIdentifier table)spring-doc.cadn.net.cn

Invoked after a domain object is loaded.
Can modify the domain object after reading it from a row.spring-doc.cadn.net.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cadn.net.cn

AuditingEntityCallbackspring-doc.cadn.net.cn

onBeforeConvert(T entity, SqlIdentifier table)spring-doc.cadn.net.cn

Marks an auditable entity created or modifiedspring-doc.cadn.net.cn

100spring-doc.cadn.net.cn

BeforeSaveCallbackspring-doc.cadn.net.cn

onBeforeSave(T entity, OutboundRow row, SqlIdentifier table)spring-doc.cadn.net.cn

Invoked before a domain object is saved.
Can modify the target, to be persisted,
OutboundRow containing all mapped entity information.spring-doc.cadn.net.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cadn.net.cn

AfterSaveCallbackspring-doc.cadn.net.cn

onAfterSave(T entity, OutboundRow row, SqlIdentifier table)spring-doc.cadn.net.cn

Invoked after a domain object is saved.
Can modify the domain object, to be returned after save,
OutboundRow containing all mapped entity information.spring-doc.cadn.net.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cadn.net.cn