/** * Instantiate a Builder to be able to create a {@link AggregateAnnotationCommandHandler}. * <p> * The {@link CommandTargetResolver} is defaulted to amn {@link AnnotationCommandTargetResolver} * The {@link Repository} is a <b>hard requirement</b> and as such should be provided. * Next to that, this Builder's goal is to provide an {@link AggregateModel} (describing the structure of a given * aggregate). To instantiate this AggregateModel, either an {@link AggregateModel} can be provided directly or an * {@code aggregateType} of type {@link Class} can be used. The latter will internally resolve to an * AggregateModel. Thus, either the AggregateModel <b>or</b> the {@code aggregateType} should be provided. * * @param <T> the type of aggregate this {@link AggregateAnnotationCommandHandler} handles commands for * @return a Builder to be able to create a {@link AggregateAnnotationCommandHandler} */ public static <T> Builder<T> builder() { return new Builder<>(); }
/** * Instantiate a Builder to be able to create a {@link AggregateAnnotationCommandHandler}. * <p> * The {@link CommandTargetResolver} is defaulted to amn {@link AnnotationCommandTargetResolver} * The {@link Repository} is a <b>hard requirement</b> and as such should be provided. * Next to that, this Builder's goal is to provide an {@link AggregateModel} (describing the structure of a given * aggregate). To instantiate this AggregateModel, either an {@link AggregateModel} can be provided directly or an * {@code aggregateType} of type {@link Class} can be used. The latter will internally resolve to an * AggregateModel. Thus, either the AggregateModel <b>or</b> the {@code aggregateType} should be provided. * * @param <T> the type of aggregate this {@link AggregateAnnotationCommandHandler} handles commands for * @return a Builder to be able to create a {@link AggregateAnnotationCommandHandler} */ public static <T> Builder<T> builder() { return new Builder<>(); }