protected < T extends DomainEvent > T registerEvent ( T event ) { Assert . notNull ( event , "Domain event must not be null!" ) ; this . domainEvents . add ( event ) ; return event ; }
Registers the given event object for publication on a call to a Spring Data repository s save methods .