@Target(value={TYPE,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Component @Scope(value="prototype") @AggregateRoot public @interface Aggregate
Component
is an aggregate instance.Modifier and Type | Optional Element and Description |
---|---|
String |
cache
Sets the name of the bean providing the
caching . |
String |
commandTargetResolver
Selects the name of the
CommandTargetResolver bean. |
boolean |
filterEventsByType
Sets whether or not to filter events by Aggregate type.
|
String |
lockFactory
Sets the name of the bean providing the
LockFactory . |
String |
repository
Selects the name of the AggregateRepository bean.
|
String |
snapshotFilter
Sets the name of the bean providing the
SnapshotFilter . |
String |
snapshotTriggerDefinition
Sets the name of the bean providing the snapshot trigger definition.
|
String |
type
Get the String representation of the aggregate's type.
|
public abstract String repository
public abstract String snapshotTriggerDefinition
Note that the use of repository()
, or provisioning a
Repository
to 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 a Trade
Aggregate would by default create/look
for a bean named "tradeRepository"
.
public abstract String snapshotFilter
SnapshotFilter
. If
none is provided, all snapshots will be taken into account unless explicitly configured on the event store.public abstract String type
public abstract String commandTargetResolver
CommandTargetResolver
bean. If left empty,
CommandTargetResolver
bean from application context will be used. If
the bean is not defined in the application context, AnnotationCommandTargetResolver
will be used.public abstract boolean filterEventsByType
public abstract String cache
caching
. If none is
provided, no cache is created, unless explicitly configured on the referenced repository.
Note that the use of repository()
, or adding a Repository
bean 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 a Trade
Aggregate would by default create/look for a bean named "tradeRepository"
.
public abstract String lockFactory
LockFactory
. If none is provided,
the Repository
implementation's default is used, unless explicitly
configured on the referenced repository.
Note that the use of repository()
, or adding a Repository
bean 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 a
Trade
Aggregate would by default create/look for a bean named "tradeRepository"
.
Copyright © 2010–2024. All rights reserved.