Annotation Interface EventCriteriaBuilder


@Target(METHOD) @Retention(RUNTIME) public @interface EventCriteriaBuilder
Annotation to indicate that a method can be used to resolve the EventCriteria based on the TargetEntityId when loading an EventSourcedEntity.

The method should be a static method that returns an EventCriteria instance. The first argument should be the identifier of the entity to load. If you need to resolve multiple identifier types, you can use the EventCriteriaBuilder annotation on multiple methods.

You can define any component from the Configuration as a parameter to the method to be able to resolve the EventCriteria. You can also inject the entire configuration as a parameter by declaring it as such. Note that the first parameter must be the identifier, and cannot be a component.

Since:
5.0.0
Author:
Mitchell Herrijgers
See Also: