ensureExists method
- @protected
Subclasses of Aggregate should use this method to ensure that is is operating on an existing Aggregate.
Implementation
@protected
void ensureExists() {
if (currentVersion == -1) {
throw AggregateNotFoundException(runtimeType, id);
}
}