EntityState class abstract

Private state of an entity, read by command handlers and updated by events.

Entity state consists of fields used by command handlers to make decisions. State is never visible to other entities or services. Events are projected to state through projector functions that mutate state fields.

Constructors

EntityState()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project(RemoteEvent event) → void
Projects an event to update the entity's state fields.
toJson() Map<String, dynamic>
Serializes the current state to JSON for persistence.
toString() String
A string representation of this object.
inherited

Operators

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