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 Summary
Modifier and TypeMethodDescription<C,P> Optional <EntityChildMetamodel<C, P>> createChildDefinition(Class<P> parentClass, AnnotatedEntityMetamodelFactory metamodelFactory, Member member) Inspect the givenmember, which is declared on the givenparentClassfor the presence of a child entity according to this definition.
-
Method Details
-
createChildDefinition
@Nonnull <C,P> Optional<EntityChildMetamodel<C,P>> createChildDefinition(@Nonnull Class<P> parentClass, @Nonnull AnnotatedEntityMetamodelFactory metamodelFactory, @Nonnull Member member) Inspect the givenmember, which is declared on the givenparentClassfor the presence of a child entity according to this definition. If a child entity is found, anEntityChildMetamodelis returned. This metamodel can use the givenmetamodelFactoryto create the childEntityMetamodelbased 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 childEntityMetamodelbased on the class.member- The member to inspect for a child entity.- Returns:
- An
Optionalthat resolves to anEntityChildMetamodelif the field represents a child entity, or an empty optional if no child entity is found.
-