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 Details

  • Constructor Details

  • Method Details

    • commandTargetResolver

      public R commandTargetResolver(@Nonnull CommandTargetResolver<C> commandTargetResolver)
      Sets the CommandTargetResolver to use for resolving the child entity to handle the command. This should return one child entity, or null if no child entity should handle the command.
      Parameters:
      commandTargetResolver - The CommandTargetResolver to use for resolving the child entity to handle the command.
      Returns:
      This builder instance.
    • validate

      protected void validate()
    • eventTargetMatcher

      public R eventTargetMatcher(@Nonnull EventTargetMatcher<C> eventTargetMatcher)
      Sets the EventTargetMatcher to determine whether a child entity should handle the given EventMessage. This should return true if the child entity should handle the event, or false if it should not.
      Parameters:
      eventTargetMatcher - The EventTargetMatcher to use for matching the child entities to the event.
      Returns:
      This builder instance.