[[cassandra.entity-callbacks]]
= Store specific EntityCallbacks

Spring Data for Apache Cassandra uses the `EntityCallback` API for its auditing support and reacts on the following callbacks.

.Supported Entity Callbacks
[%header,cols="4"]
|===
| Callback
| Method
| Description
| Order

| Reactive/BeforeConvertCallback
| `onBeforeConvert(T entity, CqlIdentifier tableName)`
| Invoked before a domain object is converted to `com.datastax.driver.core.Statement`.
| `Ordered.LOWEST_PRECEDENCE`

| Reactive/AuditingEntityCallback
| `onBeforeConvert(Object entity, CqlIdentifier tableName)`
| Marks an auditable entity _created_ or _modified_
| 100

| Reactive/BeforeSaveCallback
| `onBeforeSave(T entity, CqlIdentifier tableName, Statement statement)`
| Invoked before a domain object is saved. +
Can modify the target, to be persisted, `com.datastax.driver.core.Statement` containing all mapped entity information.
| `Ordered.LOWEST_PRECEDENCE`

|===
