Uses of Interface
dk.cloudcreate.essentials.components.eventsourced.aggregates.Aggregate
-
-
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates with type parameters of type Aggregate Modifier and Type Interface Description interfaceAggregate<ID,AGGREGATE_TYPE extends Aggregate<ID,AGGREGATE_TYPE>>Common interface that all concrete (classical)Aggregate's must implement.Fields in dk.cloudcreate.essentials.components.eventsourced.aggregates with type parameters of type Aggregate Modifier and Type Field Description Class<? extends Aggregate<?,?>>OptimisticAggregateLoadException. aggregateTypeConstructor parameters in dk.cloudcreate.essentials.components.eventsourced.aggregates with type arguments of type Aggregate Constructor Description OptimisticAggregateLoadException(Object aggregateId, Class<? extends Aggregate<?,?>> aggregateType, dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.types.EventOrder expectedLatestEventOrder, dk.cloudcreate.essentials.components.eventsourced.eventstore.postgresql.types.EventOrder actualLatestEventOrder) -
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.flex
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.flex that implement Aggregate Modifier and Type Class Description classFlexAggregate<ID,AGGREGATE_TYPE extends FlexAggregate<ID,AGGREGATE_TYPE>>Simple, easy and opinionated aggregate that allows you to apply events that don't have any requirements with regards to inheritance (i.e. -
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful
Subinterfaces of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful Modifier and Type Interface Description interfaceStatefulAggregate<ID,EVENT_TYPE,AGGREGATE_TYPE extends StatefulAggregate<ID,EVENT_TYPE,AGGREGATE_TYPE>> -
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.classic
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.classic that implement Aggregate Modifier and Type Class Description classAggregateRoot<ID,EVENT_TYPE extends Event<ID>,AGGREGATE_TYPE extends AggregateRoot<ID,EVENT_TYPE,AGGREGATE_TYPE>>A specialized and opinionated mutableAggregatedesign
ThisAggregateRootis designed to work with Class based Event's that inherit fromEvent.
This design is deliberate and will manage a lot of things for you as a developer at the cost of some flexibility. -
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.classic.state
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.classic.state that implement Aggregate Modifier and Type Class Description classAggregateRootWithState<ID,EVENT_TYPE extends Event<ID>,STATE extends AggregateState<ID,EVENT_TYPE>,AGGREGATE_TYPE extends AggregateRootWithState<ID,EVENT_TYPE,STATE,AGGREGATE_TYPE>>Variant of theAggregateRootpattern where the aggregate's state and allEventHandlerannotated methods are placed within the concreteAggregateStateobject.
When theAggregateRootWithStateis combined withAggregateState, then theAggregateRootWithStatewill contain the command methods and theAggregateStatecontains the state fields and theEventHandlerannotated methods. -
Uses of Aggregate in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.modern
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.modern that implement Aggregate Modifier and Type Class Description classAggregateRoot<ID,EVENT_TYPE,AGGREGATE_TYPE extends AggregateRoot<ID,EVENT_TYPE,AGGREGATE_TYPE>>A modern opinionated interpretation of the classicAggregateRootdesign, where theEvent's are mutable.
The modern interpretation doesn't specify any requirement on the design of the Events, they can be Java 17+ records or simple POJO's.
Note: TheAggregateRootworks best in combination with theStatefulAggregateRepositorythat's configured to use theStatefulAggregateInstanceFactory.reflectionBasedAggregateRootFactory(), because theAggregateRootneeds to be provided its aggregated id through theAggregateRoot(Object)constructor!
The modernAggregateRootsupports keeping the state projection andEventHandlerannotated methods within theAggregateRootinstance or within anAggregateStateinstance.
If you wish to keep the state projection andEventHandlerannotated methods within anAggregateStateinstance, then you only need to implement theWithStateinterface:
-