OnCreateAggregateMixin<TData extends Object, TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue>, TAggregate extends Aggregate<TEvent, TValue, TId, TState>> mixin

Superclass Constraints
Mixin Applications

Properties

hashCode int
The hash code for this object.
no setterinherited
isFrozen bool
True when configuration is frozen (no changes are allowed)
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
store AggregateStore<TData, TEvent, TValue, TId, TState, TAggregate>
Get AggregateStore which this service operate on
no setterinherited

Methods

freeze() → void
Call when configuration is complete to prevent modifications later
inherited
handle<TCommand extends Object>(TCommand command) FutureOr<AggregateCommandResult<TEvent, TValue, TId, TState, TAggregate>>
The generic command handler. Call this function from your edge (API). Use parameter command to execute Returns the AggregateCommandResult of the execution
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onNew<TCommand extends Object>(AggregateIdResolver<TCommand, TId> toId, AggregateCommandHandler<TCommand, TEvent, TValue, TId, TState, TAggregate> action) → void
Register an asynchronous handler for a command, which is expected to create a new aggregate instance. Use parameter toId to get the AggregateId from give command. Use parameter action to performed actions on the aggregate, given the aggregate instance and the command
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited