SimpleCommandAggregate
class SimpleCommandAggregate<C : Any, S : Any>(val state: StateAggregate<S>, val commandRoot: C, eventStore: EventStore, metadata: CommandAggregateMetadata<C>) : CommandAggregate<C, S> , NamedTypedAggregate<C>
Simple implementation of CommandAggregate that handles command processing with state management.
This class coordinates between command execution, state aggregation, and event storage. It manages the command processing lifecycle including validation, execution, event sourcing, and persistence.
Parameters
eventStore
The event store for persisting domain events.
metadata
The metadata describing this command aggregate's configuration.
Type Parameters
C
The type of the command aggregate root.
S
The type of the state aggregate.
Constructors
Link copied to clipboard
constructor(state: StateAggregate<S>, commandRoot: C, eventStore: EventStore, metadata: CommandAggregateMetadata<C>)