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 allEventHandlerannotated methods will be hosted with theAggregateStateobject. The state object will be maintained by theAggregateRoot.
You can use theAggregateRoot.state()orAggregateRoot.state(Class)methodst o access the concrete State object.- See Also:
AggregateRoot.state(),AggregateRoot.state(Class)