org.qi4j.library.eventsourcing.domain.api
Annotation Type DomainEvent


@Documented
@Retention(value=RUNTIME)
public @interface DomainEvent

Annotate methods that should trigger domain events with this annotation. Example:

 @DomainEvent
 void changedDescription(String newDescription);
 
Event methods may only change state. They may not fail or thrown exceptions. The name of the method should be in past tense, as in something HAS already occurred, and the method is merely reacting to it.