Class AggregateSnapshot<ID,AGGREGATE_IMPL_TYPE>
- java.lang.Object
-
- dk.cloudcreate.essentials.components.eventsourced.aggregates.snapshot.AggregateSnapshot<ID,AGGREGATE_IMPL_TYPE>
-
- Type Parameters:
ID- the aggregate ID typeAGGREGATE_IMPL_TYPE- the concrete aggregate implementation type
public class AggregateSnapshot<ID,AGGREGATE_IMPL_TYPE> extends Object
Aggregate snapshot loaded usingAggregateSnapshotRepository.loadSnapshot(AggregateType, Object, Class)
-
-
Field Summary
Fields Modifier and Type Field Description IDaggregateIdthe identifier for the aggregate instanceClass<AGGREGATE_IMPL_TYPE>aggregateImplTypethe concrete aggregate implementation typeAGGREGATE_IMPL_TYPEaggregateSnapshotThe aggregate snapshot loaded from the repository - if this is of typeBrokenSnapshotthen the Aggregate snapshot couldn't be deserializedAggregateTypeaggregateTypethe name of the aggregate's event streamEventOrdereventOrderOfLastIncludedEventTheEventOrderof the last Event that was included in the snapshot
-
Constructor Summary
Constructors Constructor Description AggregateSnapshot(AggregateType aggregateType, ID aggregateId, Class<AGGREGATE_IMPL_TYPE> aggregateImplType, AGGREGATE_IMPL_TYPE aggregateSnapshot, EventOrder eventOrderOfLastIncludedEvent)
-
-
-
Field Detail
-
aggregateType
public final AggregateType aggregateType
the name of the aggregate's event stream
-
aggregateId
public final ID aggregateId
the identifier for the aggregate instance
-
aggregateImplType
public final Class<AGGREGATE_IMPL_TYPE> aggregateImplType
the concrete aggregate implementation type
-
eventOrderOfLastIncludedEvent
public final EventOrder eventOrderOfLastIncludedEvent
TheEventOrderof the last Event that was included in the snapshot
-
aggregateSnapshot
public final AGGREGATE_IMPL_TYPE aggregateSnapshot
The aggregate snapshot loaded from the repository - if this is of typeBrokenSnapshotthen the Aggregate snapshot couldn't be deserialized
-
-
Constructor Detail
-
AggregateSnapshot
public AggregateSnapshot(AggregateType aggregateType, ID aggregateId, Class<AGGREGATE_IMPL_TYPE> aggregateImplType, AGGREGATE_IMPL_TYPE aggregateSnapshot, EventOrder eventOrderOfLastIncludedEvent)
- Parameters:
aggregateType- the name of the aggregate's event streamaggregateId- the identifier for the aggregate instanceaggregateImplType- the concrete aggregate implementation typeaggregateSnapshot- The aggregate snapshot loaded from the repository (optional as we can load snapshots without payload)eventOrderOfLastIncludedEvent- TheEventOrderof the last Event that was included in the snapshot
-
-