Class SingleEntityChildMetamodel<C,P>

java.lang.Object
org.axonframework.modelling.entity.child.AbstractEntityChildMetamodel<C,P>
org.axonframework.modelling.entity.child.SingleEntityChildMetamodel<C,P>
Type Parameters:
C - The type of the child entity.
P - The type of the parent entity.
All Implemented Interfaces:
EntityChildMetamodel<C,P>, EntityEvolver<P>

public class SingleEntityChildMetamodel<C,P> extends AbstractEntityChildMetamodel<C,P>
An EntityChildMetamodel that handles commands and events for a single child entity. It will use the provided ChildEntityFieldDefinition to resolve the child entity from the parent entity. Once the entity is resolved, it will delegate the command- and event-handling to the child entity metamodel.

The commands and events will, by default, be forwarded unconditionally to the child entity. If you have multiple member fields, and want to match commands and events to a specific child entity, you can configure the CommandTargetResolver and EventTargetMatcher to match the child entity based on the command or event.

Since:
5.0.0
Author:
Mitchell Herrijgers