Interface EntityChildModelDefinition

All Known Implementing Classes:
AbstractEntityChildModelDefinition, ListEntityChildModelDefinition, SingleEntityChildModelDefinition

public interface EntityChildModelDefinition
Interface describing the definition of an EntityChildMetamodel. These definitions are automatically detected by the AnnotatedEntityMetamodel if the definition's implementation is registered in the META-INF/services/org.axonframework.modelling.entity.annotation.EntityChildModelDefinition file.

Note: This class was known as {code org.axonframework.modelling.command.inspection.ChildEntityDefinition} before version 5.0.0.

Since:
3.0.0
Author:
Allard Buijze, Mitchell Herrijgers
See Also:
  • Method Details

    • createChildDefinition

      @Nonnull <C, P> Optional<EntityChildMetamodel<C,P>> createChildDefinition(@Nonnull Class<P> parentClass, @Nonnull AnnotatedEntityMetamodelFactory metamodelFactory, @Nonnull Member member)
      Inspect the given member, which is declared on the given parentClass for the presence of a child entity according to this definition. If a child entity is found, an EntityChildMetamodel is returned. This metamodel can use the given metamodelFactory to create the child EntityMetamodel based on the class.
      Type Parameters:
      C - The type of the child entity.
      P - The type of the parent entity.
      Parameters:
      parentClass - The class of the parent entity.
      metamodelFactory - A factory to create the child EntityMetamodel based on the class.
      member - The member to inspect for a child entity.
      Returns:
      An Optional that resolves to an EntityChildMetamodel if the field represents a child entity, or an empty optional if no child entity is found.