Class VersionedAggregateIdentifier
java.lang.Object
org.axonframework.modelling.command.VersionedAggregateIdentifier
Structure that holds an Aggregate Identifier and an expected version of an aggregate.
- Since:
- 1.2
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionVersionedAggregateIdentifier(Object identifier, Long version) Initializes a VersionedAggregateIdentifier with the givenidentifierandversion.VersionedAggregateIdentifier(String identifier, Long version) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the string representation of the identifier of the targeted Aggregate.Returns the object representation of the identifier of the targeted Aggregate.Returns the version of the targeted Aggregate, ornullif the version is irrelevant.inthashCode()
-
Constructor Details
-
VersionedAggregateIdentifier
Deprecated.Initializes a VersionedAggregateIdentifier with the givenidentifierandversion.- Parameters:
identifier- The non-null string identifier of the targeted aggregate.version- The expected version of the targeted aggregate, ornullif the version is irrelevant.
-
VersionedAggregateIdentifier
Initializes a VersionedAggregateIdentifier with the givenidentifierandversion.- Parameters:
identifier- The non-null identifier of the targeted aggregate.version- The expected version of the targeted aggregate, ornullif the version is irrelevant.
-
-
Method Details
-
getIdentifier
Returns the string representation of the identifier of the targeted Aggregate. May never returnnull.- Returns:
- the string representation of identifier of the targeted Aggregate
-
getIdentifierValue
Returns the object representation of the identifier of the targeted Aggregate. May never returnnull.- Returns:
- the object representation of the identifier of the targeted Aggregate
-
getVersion
Returns the version of the targeted Aggregate, ornullif the version is irrelevant.- Returns:
- the version of the targeted Aggregate
-
equals
-
hashCode
public int hashCode()
-
VersionedAggregateIdentifier(Object, Long), since theidentifiercan be a non-String.