Abstract
Clears the list of events by flushing them from the event sink.
Compares two Entities for equality. If both identifiers are Identity objects, then the comparison is made by the value of the identifiers. Otherwise, the comparison is made by the reference of the identifiers.
Returns the list of pending events of the Aggregate root in the event sink.
Compares two Entities for inequality.
Validates any defined invariants depending on its implementation, and raises the event. The Domain Event is raised by adding it to the list of pending events of the Aggregate root in the event sink. It's recommended to call this method after mutating the state of the Aggregate.
Protected
Optional
validateStatic
Invariant
Entities are not fundamentally defined by their properties, but rather by a thread of continuity and identity. An object defined primarily by its identity is called an Entity.