org.axonframework.commandhandling.annotation
Annotation Type CommandHandlingMemberMap


@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface CommandHandlingMemberMap

Marker annotation for fields that contain a Map of Entities capable of handling Commands on behalf of the aggregate. When a field is annotated with @CommandHandlerMemberMap, it is a hint towards Command Handler discovery mechanisms that the entity should also be inspected for CommandHandler annotated methods.

Note that CommandHandler detection is done using static typing. This means that only the declared type of the field can be inspected. If a subclass of that type is assigned to the field, any handlers declared on that subclass will be ignored.

Since:
2.4
Author:
Jeroen Bruinink

Required Element Summary
 String commandTargetProperty
          The name of the property on the incoming command's payload that identifies the intended target of the command.
 
Optional Element Summary
 Class<? extends AbstractAnnotatedEntity> entityType
          The type of entity contained in the annotated map.
 

Element Detail

commandTargetProperty

public abstract String commandTargetProperty
The name of the property on the incoming command's payload that identifies the intended target of the command. This identity should correspond to the keys in the annotated map.

The name of this method must correspond with the getter method using the JavaBean specification (property 'id' is accessed using method 'getId()'), or any other specification supported by a configured PropertyAccessStrategy.

entityType

public abstract Class<? extends AbstractAnnotatedEntity> entityType
The type of entity contained in the annotated map. By default, Axon attempts to identify the type by the generic parameters on the field declaration.

Default:
org.axonframework.eventsourcing.annotation.AbstractAnnotatedEntity.class


Copyright © 2010-2016. All Rights Reserved.