Class GenericJpaRepository.Builder<T>

Type Parameters:
T - a generic specifying the Aggregate type contained in this Repository implementation
Enclosing class:
GenericJpaRepository<T>

public static class GenericJpaRepository.Builder<T> extends LockingRepository.Builder<T>
Builder class to instantiate a GenericJpaRepository for aggregate type T.

The LockFactory is defaulted to an NullLockFactory, thus providing no additional locking, and the identifierConverter to Function.identity(). The RepositorySpanFactory is defaulted to a DefaultRepositorySpanFactory backed by a NoOpSpanFactory.

A goal of this Builder goal is to create an AggregateModel specifying generic T as the aggregate type to be stored. All aggregates in this repository must be instanceOf this aggregate type. To instantiate this AggregateModel, either an AggregateModel can be provided directly or an aggregateType of type Class can be used. The latter will internally resolve to an AggregateModel. Thus, either the AggregateModel or the aggregateType should be provided.

Additionally, the EntityManagerProvider and EventBus are hard requirements and as such should be provided.