Class InjectEntityParameterResolverFactory

java.lang.Object
org.axonframework.modelling.annotation.InjectEntityParameterResolverFactory
All Implemented Interfaces:
ParameterResolverFactory

public class InjectEntityParameterResolverFactory extends Object implements ParameterResolverFactory
ParameterResolverFactory implementation that provides ParameterResolvers for parameters annotated with InjectEntity.

The parameter can either be a ManagedEntity or the entity itself. The order of resolving the identity id is as specified on the InjectEntity annotation.

Since:
5.0.0
Author:
Mitchell Herrijgers
See Also:
  • Constructor Details

    • InjectEntityParameterResolverFactory

      public InjectEntityParameterResolverFactory(@Nonnull Configuration configuration)
      Initialize the factory with the given configuration. The configuration should contain a StateManager to load entities from.

      This constructor depends on the Configuration instead of the StateManager to prevent circular dependencies during creation of message handlers. For example, if the repository uses an annotation-based event state applier, it would construct methods, which would then require the StateManager to be created during the construction of the parameter resolvers. This would lead to a circular dependency.

      Parameters:
      configuration - The Configuration to use for loading entities.
  • Method Details