Package dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful
-
Interface Summary Interface Description StatefulAggregate<ID,EVENT_TYPE,AGGREGATE_TYPE extends StatefulAggregate<ID,EVENT_TYPE,AGGREGATE_TYPE>> StatefulAggregateInstanceFactory Factory that helps theStatefulAggregateRepository/StatefulAggregateInMemoryProjectorto create an instance of a givenAggregate.StatefulAggregateRepository<ID,EVENT_TYPE,AGGREGATE_IMPL_TYPE extends StatefulAggregate<ID,EVENT_TYPE,AGGREGATE_IMPL_TYPE>> OpinionatedAggregateRepository that's built to persist and load a specificStatefulAggregatetype in combination withEventStore,UnitOfWorkFactoryand aStatefulAggregateInstanceFactory.
You can use theStatefulAggregateRepository.from(ConfigurableEventStore, AggregateEventStreamConfiguration, StatefulAggregateInstanceFactory, Class)to create a newStatefulAggregateRepositoryinstance that supports the most common repository method.
Alternatively you can extend from theStatefulAggregateRepository.DefaultStatefulAggregateRepositoryand add your own special methods -
Class Summary Class Description StatefulAggregateInMemoryProjector AggregatespecificInMemoryProjector
Note: An in memory projection is never associated with aUnitOfWorkand any changes to the aggregate won't automatically be persisted.StatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactory StatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsAggregateRoothave been prepared to be initialized byObjenesisStatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory StatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregateStatefulAggregateRepository.DefaultStatefulAggregateRepository<ID,EVENT_TYPE,AGGREGATE_IMPL_TYPE extends StatefulAggregate<ID,EVENT_TYPE,AGGREGATE_IMPL_TYPE>> DefaultStatefulAggregateRepositoryimplementation.