Interface EntityModule<ID,E>
- Type Parameters:
ID- The type of the entity's identifier.E- The type of the entity.
- All Superinterfaces:
Module
- All Known Subinterfaces:
EventSourcedEntityModule<ID,,E> StateBasedEntityModule<ID,E>
Module that builds an entity of type E with an identifier of type ID. This entity is then
registered to the nearest parent StateManager with the created
Repository.
Make sure to register this module with the parent module or configurer of your choice. Each entity should only have one module, and each module should only be registered once. As such, make sure to register it on the right level of your module hierarchy.
- Since:
- 5.0.0
- Author:
- Steven van Beelen, Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringThe name of the entity, typically a concatenation of the entity type'ssimple nameand the identifier type's simple name.Returns the type of the entity.idType()Returns the type of the entity's identifier.
-
Method Details
-
entityName
The name of the entity, typically a concatenation of the entity type'ssimple nameand the identifier type's simple name.The module should use this name for the components they register to the
ComponentRegistry.- Returns:
- The name of the entity.
-
idType
Returns the type of the entity's identifier.- Returns:
- The type of the entity's identifier.
-
entityType
Returns the type of the entity.- Returns:
- The type of the entity.
-