AggregateRecovered
Marker interface for events indicating that a previously deleted aggregate has been recovered.
This interface is implemented by domain events that signal the restoration of an aggregate that was previously deleted. Aggregate recovery allows systems to undo deletion operations, restoring the aggregate to its previous state and allowing normal operations to resume.
Recovery events are typically used in scenarios where:
Deletion was performed in error
Regulatory requirements demand data retention
Business processes require the ability to "undelete" entities
Data needs to be restored from backups or archives
sample usage:
class OrderRecovered : AggregateRecovered {
// Additional recovery metadata can be included here
val recoveredAt: Instant = Instant.now()
val recoveredBy: String = currentUser()
}Content copied to clipboard
See also
for events indicating aggregate deletion
for the event annotation