Interface WithState<ID,EVENT_TYPE,AGGREGATE_TYPE extends AggregateRoot<ID,EVENT_TYPE,AGGREGATE_TYPE>,AGGREGATE_STATE extends AggregateState<ID,EVENT_TYPE,AGGREGATE_TYPE>>
- Type Parameters:
ID- the type of aggregate idEVENT_TYPE- the type of eventAGGREGATE_TYPE- the type of aggregateAGGREGATE_STATE- the type of the aggregate-state
public interface WithState<ID,EVENT_TYPE,AGGREGATE_TYPE extends AggregateRoot<ID,EVENT_TYPE,AGGREGATE_TYPE>,AGGREGATE_STATE extends AggregateState<ID,EVENT_TYPE,AGGREGATE_TYPE>>
Marker interface that indicates that all state and all
You can use the
EventHandler annotated methods
will be hosted with the AggregateState object. The state object will be maintained by the AggregateRoot.You can use the
AggregateRoot.state() or AggregateRoot.state(Class) methodst o access the concrete State object.