Class SingleEntityChildMetamodel.Builder<C,P>

java.lang.Object
org.axonframework.modelling.entity.child.AbstractEntityChildMetamodel.Builder<C,P,SingleEntityChildMetamodel.Builder<C,P>>
org.axonframework.modelling.entity.child.SingleEntityChildMetamodel.Builder<C,P>
Type Parameters:
C - The type of the child entity.
P - The type of the parent entity.
Enclosing class:
SingleEntityChildMetamodel<C,P>

public static class SingleEntityChildMetamodel.Builder<C,P> extends AbstractEntityChildMetamodel.Builder<C,P,SingleEntityChildMetamodel.Builder<C,P>>
Builder for creating a SingleEntityChildMetamodel for the given parent class and child entity metamodel. The ChildEntityFieldDefinition is required to resolve the child entities from the parent entity and evolve the parent entity based on the child entities.

The CommandTargetResolver and EventTargetMatcher are defaulted to CommandTargetResolver.MATCH_ANY() and EventTargetMatcher.MATCH_ANY() respectively, meaning that the child entity will always match all commands and all events. 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.