@Override public Builder<T> aggregateModel(AggregateModel<T> aggregateModel) { super.aggregateModel(aggregateModel); return this; }
/** * Instantiate a {@link AbstractRepository} based on the fields contained in the {@link Builder}. * <p> * The provided Builder's main goal is to build an {@link AggregateModel} specifying generic {@code T} as the * aggregate type to be stored. All aggregates in this repository must be {@code instanceOf} this aggregate type. * 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. An * {@link org.axonframework.common.AxonConfigurationException} is thrown if this criteria is not met. * * @param builder the {@link Builder} used to instantiate a {@link AbstractRepository} instance */ protected AbstractRepository(Builder<T> builder) { builder.validate(); this.aggregateModel = builder.buildAggregateModel(); }
@Override public Builder<T> handlerDefinition(HandlerDefinition handlerDefinition) { super.handlerDefinition(handlerDefinition); return this; }
/** * Instantiate the {@link AggregateModel} of generic type {@code T} describing the structure of the Aggregate * this {@link Repository} will store. * * @return a {@link AggregateModel} of generic type {@code T} describing the Aggregate this {@link Repository} * will store */ protected AggregateModel<T> buildAggregateModel() { if (aggregateModel == null) { return inspectAggregateModel(); } else { return aggregateModel; } }
@Override public Builder<T> parameterResolverFactory(ParameterResolverFactory parameterResolverFactory) { super.parameterResolverFactory(parameterResolverFactory); return this; }
/** * Instantiate a {@link AbstractRepository} based on the fields contained in the {@link Builder}. * <p> * The provided Builder's main goal is to build an {@link AggregateModel} specifying generic {@code T} as the * aggregate type to be stored. All aggregates in this repository must be {@code instanceOf} this aggregate type. * 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. An * {@link org.axonframework.common.AxonConfigurationException} is thrown if this criteria is not met. * * @param builder the {@link Builder} used to instantiate a {@link AbstractRepository} instance */ protected AbstractRepository(Builder<T> builder) { builder.validate(); this.aggregateModel = builder.buildAggregateModel(); }
/** * Instantiate the {@link AggregateModel} of generic type {@code T} describing the structure of the Aggregate * this {@link Repository} will store. * * @return a {@link AggregateModel} of generic type {@code T} describing the Aggregate this {@link Repository} * will store */ protected AggregateModel<T> buildAggregateModel() { if (aggregateModel == null) { return inspectAggregateModel(); } else { return aggregateModel; } }
@Override public Builder<T> handlerDefinition(HandlerDefinition handlerDefinition) { super.handlerDefinition(handlerDefinition); return this; }
@Override public Builder<T> parameterResolverFactory(ParameterResolverFactory parameterResolverFactory) { super.parameterResolverFactory(parameterResolverFactory); return this; }
@Override public Builder<T> aggregateModel(AggregateModel<T> aggregateModel) { super.aggregateModel(aggregateModel); return this; }