Class AggregateScopeDescriptor
java.lang.Object
org.axonframework.modelling.command.AggregateScopeDescriptor
- All Implemented Interfaces:
Serializable,ScopeDescriptor
- Direct Known Subclasses:
AggregateScopeDescriptor
Describes the scope of an Aggregate by means of its type and identifier.
- Since:
- 3.3
- Author:
- Steven van Beelen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateScopeDescriptor(String type, Object identifier) Instantiate an AggregateScopeDescriptor with the providedtypeandidentifier.AggregateScopeDescriptor(String type, Supplier<Object> identifierSupplier) Instantiate an AggregateScopeDescriptor with atypeandidentifierSupplier. -
Method Summary
-
Constructor Details
-
AggregateScopeDescriptor
Instantiate an AggregateScopeDescriptor with atypeandidentifierSupplier. Using theidentifierSupplierinstead of anObjectfor theidentifierallows the creating processes to provide the identifier lazily. This is necessary when Aggregate's identifier is not create yet, for example when the AggregateScopeDescriptor is created whilst the Aggregate is still under construction. -
AggregateScopeDescriptor
@ConstructorProperties({"type","identifier"}) public AggregateScopeDescriptor(String type, Object identifier) Instantiate an AggregateScopeDescriptor with the providedtypeandidentifier.
-
-
Method Details
-
getType
Returns the type of Aggregate, as String, targeted by this scope- Returns:
- the Aggregate targeted by this scope
-
getIdentifier
The identifier of the Aggregate targeted with this scope- Returns:
- the identifier of the target Aggregate
-
scopeDescription
Description copied from interface:ScopeDescriptor- Specified by:
scopeDescriptionin interfaceScopeDescriptor- Returns:
- a
Stringdescription of aScopeobject
-
hashCode
public int hashCode() -
equals
-
toString
-