Annotation Interface Aggregate
Component is an aggregate instance.- Since:
- 3.0
- Author:
- Allard Buijze
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSets the name of the bean providing thecaching.Selects the name of theCommandTargetResolverbean.booleanSets whether or not to filter events by Aggregate type.Sets the name of the bean providing theLockFactory.Selects the name of the AggregateRepository bean.Sets the name of the bean providing theSnapshotFilter.Sets the name of the bean providing the snapshot trigger definition.Get the String representation of the aggregate's type.
-
Element Details
-
repository
String repositorySelects the name of the AggregateRepository bean. If left empty a new repository is created. In that case the name of the repository will be based on the simple name of the aggregate's class.- Default:
""
-
snapshotTriggerDefinition
String snapshotTriggerDefinitionSets the name of the bean providing the snapshot trigger definition. If none is provided, no snapshots are created, unless explicitly configured on the referenced repository.Note that the use of
repository(), or provisioning aRepositoryto the Spring context using the default naming scheme overrides this setting, as a Repository explicitly defines the snapshot trigger definition. The default name corresponds to"[aggregate-name]Repository", thus aTradeAggregate would by default create/look for a bean named"tradeRepository".- Default:
""
-
snapshotFilter
String snapshotFilterSets the name of the bean providing theSnapshotFilter. If none is provided, all snapshots will be taken into account unless explicitly configured on the event store.- Default:
""
-
type
String typeGet the String representation of the aggregate's type. Optional. This defaults to the simple name of the annotated class.- Default:
""
-
commandTargetResolver
String commandTargetResolverSelects the name of theCommandTargetResolverbean. If left empty,CommandTargetResolverbean from application context will be used. If the bean is not defined in the application context,AnnotationCommandTargetResolverwill be used.- Default:
""
-
filterEventsByType
boolean filterEventsByTypeSets whether or not to filter events by Aggregate type. This is used to support installations where multiple Aggregate types can have overlapping Aggregate identifiers. This is only meaningful for event-sourced Aggregates.- Default:
false
-
cache
String cacheSets the name of the bean providing thecaching. If none is provided, no cache is created, unless explicitly configured on the referenced repository.Note that the use of
repository(), or adding aRepositorybean to the Spring context with the default naming scheme overrides this setting, as a Repository may explicitly define the cache. The default name corresponds to"[aggregate-name]Repository", thus aTradeAggregate would by default create/look for a bean named"tradeRepository".- Default:
""
-
lockFactory
String lockFactorySets the name of the bean providing theLockFactory. If none is provided, theRepositoryimplementation's default is used, unless explicitly configured on the referenced repository.Note that the use of
repository(), or adding aRepositorybean to the Spring context with the default naming scheme overrides this setting, as a Repository explicitly defines the lock factory. The default name corresponds to"[aggregate-name]Repository", thus aTradeAggregate would by default create/look for a bean named"tradeRepository".- Default:
""
-