Interface EntityEvolver<E>

Type Parameters:
E - The entity type to evolve.
All Known Subinterfaces:
EntityChildMetamodel<C,P>, EntityEvolvingComponent<E>, EntityMetamodel<E>
All Known Implementing Classes:
AbstractEntityChildMetamodel, AnnotatedEntityMetamodel, AnnotationBasedEntityEvolvingComponent, ConcreteEntityMetamodel, ListEntityChildMetamodel, PayloadBasedEntityEvolver, PolymorphicEntityMetamodel, SimpleEntityEvolvingComponent, SingleEntityChildMetamodel
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EntityEvolver<E>
Functional interface describing how to evolve a given entity of type e based on a given EventMessage.
Since:
5.0.0
Author:
Allard Buijze, Mateusz Nowak, Mitchell Herrijgers, Steven van Beelen
  • Method Summary

    Modifier and Type
    Method
    Description
    evolve(E entity, EventMessage event, ProcessingContext context)
    Evolve the given entity by applying the given event to it.
  • Method Details

    • evolve

      E evolve(@Nonnull E entity, @Nonnull EventMessage event, @Nonnull ProcessingContext context)
      Evolve the given entity by applying the given event to it.
      Parameters:
      entity - The current entity to evolve with the given event.
      event - The event that might adjust the entity.
      context - The context within which to evolve the entity by the given event.
      Returns:
      The evolved entity based on the given event, or the same entity when nothing happened.