Class MapEntityChildMetamodel<K,C,P>

java.lang.Object
org.axonframework.modelling.entity.child.AbstractEntityChildMetamodel<C,P>
org.axonframework.modelling.entity.child.MapEntityChildMetamodel<K,C,P>
Type Parameters:
K - the type of the key of the Map containing the child entities
C - the type of the child entity
P - the type of the parent entity
All Implemented Interfaces:
EntityChildMetamodel<C,P>, EntityEvolver<P>

public class MapEntityChildMetamodel<K,C,P> extends AbstractEntityChildMetamodel<C,P>
An EntityChildMetamodel that handles commands and events for child entities stored in a Map.

It will use the provided ChildEntityFieldDefinition to resolve the child entities from the parent entity. Once the entities are resolved, it will delegate the command- and event-handling to the child entity metamodel(s), based on the commandTargetResolver and eventTargetMatcher respectively.

The identity of a child entity is the Map's own key. This means the key of a child entity is preserved across events: a child that is evolved keeps its original key, and a child that is evolved to null is removed from the map under that same key.

Since:
5.3.0
Author:
Steven van Beelen