AbstractEntity

protected void AbstractEntity()

Creates a new instance with the zero version and cleared lifecycle flags.

When this constructor is called, the entity ID must be set before any other interactions with the instance.


protected void AbstractEntity(I id)

Creates new instance with the passed ID.


protected void AbstractEntity(I id, Function<I, S> defaultState)

Creates a new instance with the passed ID and default entity state obtained from the passed function.

Parameters

id

the ID of the new entity

defaultState

the function to obtain new entity state