org.axonframework.commandhandling.annotation
Annotation Type TargetAggregateVersion


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface TargetAggregateVersion

Field or method level annotation that marks a field or method providing the expected version of the aggregate that a command targets.

If placed on a method, that method must contain no parameters. The return value will be converted to a Long. This is done either by converting it, if it is a numeric value, or by parsing the result of the value's toString() result.

If place on a field, the value is converted to a Long in an identical fashion.

Since:
1.2
Author:
Allard Buijze



Copyright © 2010-2016. All Rights Reserved.