Annotation Interface CreationPolicy


Annotation used to specify the creation policy for a command handler. Default behavior is that command handlers defined on a constructor would create a new instance of the aggregate, and command handlers defined on other methods expect an existing aggregate. This annotation provides the option to define policy AggregateCreationPolicy.CREATE_IF_MISSING or AggregateCreationPolicy.ALWAYS on a command handler to create a new instance of the aggregate from a handler operation.
Since:
4.3
Author:
Marc Gathier