Class AbstractEntityChildMetamodel.Builder<C,P,R extends AbstractEntityChildMetamodel.Builder<C,P,R>>
java.lang.Object
org.axonframework.modelling.entity.child.AbstractEntityChildMetamodel.Builder<C,P,R>
- Direct Known Subclasses:
ListEntityChildMetamodel.Builder,SingleEntityChildMetamodel.Builder
- Enclosing class:
AbstractEntityChildMetamodel<C,P>
protected abstract static class AbstractEntityChildMetamodel.Builder<C,P,R extends AbstractEntityChildMetamodel.Builder<C,P,R>>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandTargetResolver<C> protected EventTargetMatcher<C> protected final EntityMetamodel<C> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder(Class<P> parentClass, EntityMetamodel<C> metamodel) -
Method Summary
Modifier and TypeMethodDescriptioncommandTargetResolver(CommandTargetResolver<C> commandTargetResolver) Sets theCommandTargetResolverto use for resolving the child entity to handle the command.eventTargetMatcher(EventTargetMatcher<C> eventTargetMatcher) Sets theEventTargetMatcherto determine whether a child entity should handle the givenEventMessage.protected voidvalidate()
-
Field Details
-
metamodel
-
commandTargetResolver
-
eventTargetMatcher
-
-
Constructor Details
-
Builder
-
-
Method Details
-
commandTargetResolver
Sets theCommandTargetResolverto use for resolving the child entity to handle the command. This should return one child entity, ornullif no child entity should handle the command.- Parameters:
commandTargetResolver- TheCommandTargetResolverto use for resolving the child entity to handle the command.- Returns:
- This builder instance.
-
validate
protected void validate() -
eventTargetMatcher
Sets theEventTargetMatcherto determine whether a child entity should handle the givenEventMessage. This should returntrueif the child entity should handle the event, orfalseif it should not.- Parameters:
eventTargetMatcher- TheEventTargetMatcherto use for matching the child entities to the event.- Returns:
- This builder instance.
-