org.axonframework.commandhandling
Class VersionedAggregateIdentifier

java.lang.Object
  extended by org.axonframework.commandhandling.VersionedAggregateIdentifier

public class VersionedAggregateIdentifier
extends Object

Structure that holds an Aggregate Identifier and an expected version of an aggregate.

Since:
1.2
Author:
Allard Buijze

Constructor Summary
VersionedAggregateIdentifier(Object identifier, Long version)
          Initializes a VersionedAggregateIdentifier with the given identifier and version.
 
Method Summary
 boolean equals(Object o)
           
 Object getIdentifier()
          Returns the identifier of the targeted Aggregate.
 Long getVersion()
          Returns the version of the targeted Aggregate, or null if the version is irrelevant.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedAggregateIdentifier

public VersionedAggregateIdentifier(Object identifier,
                                    Long version)
Initializes a VersionedAggregateIdentifier with the given identifier and version.

Parameters:
identifier - The identifier of the targeted aggregate
version - The expected version of the targeted aggregate, or null if the version is irrelevant
Method Detail

getIdentifier

public Object getIdentifier()
Returns the identifier of the targeted Aggregate. May never return null.

Returns:
the identifier of the targeted Aggregate

getVersion

public Long getVersion()
Returns the version of the targeted Aggregate, or null if the version is irrelevant.

Returns:
the version of the targeted Aggregate

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2010-2016. All Rights Reserved.