Class PolymorphicEntityMetamodel<E>

java.lang.Object
org.axonframework.modelling.entity.PolymorphicEntityMetamodel<E>
Type Parameters:
E - The type of polymorphic entity this metamodel represents.
All Implemented Interfaces:
DescribableComponent, EntityMetamodel<E>, EntityEvolver<E>

public class PolymorphicEntityMetamodel<E> extends Object implements EntityMetamodel<E>, DescribableComponent
Polymorphic EntityMetamodel that represents an entity that can have multiple concrete types. For example, Employee and Customer could be two concrete types of Person, sharing properties and a set of commands and events.

This metamodel delegates commands to the concrete type if the concrete type is registered for the command. If not, it will attempt to handle the command with the super type. Concrete types thus take precedence over the super type for commands.

Events are delegates to both the super type and the concrete type.

Since:
5.0.0
Author:
Mitchell Herrijgers