public class AggregateScopeDescriptor extends Object implements ScopeDescriptor
Constructor and Description |
---|
AggregateScopeDescriptor(String type,
Object identifier)
Instantiate an AggregateScopeDescriptor with the provided
type and identifier . |
AggregateScopeDescriptor(String type,
Supplier<Object> identifierSupplier)
Instantiate an AggregateScopeDescriptor with a
type and identifierSupplier . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
getIdentifier()
The identifier of the Aggregate targeted with this scope
|
String |
getType()
Returns the type of Aggregate, as String, targeted by this scope
|
int |
hashCode() |
String |
scopeDescription()
|
String |
toString() |
public AggregateScopeDescriptor(String type, Supplier<Object> identifierSupplier)
type
and identifierSupplier
. Using the identifierSupplier
instead of an Object
for the identifier
allows 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.@ConstructorProperties(value={"type","identifier"}) public AggregateScopeDescriptor(String type, Object identifier)
type
and identifier
.public String getType()
public Object getIdentifier()
public String scopeDescription()
ScopeDescriptor
scopeDescription
in interface ScopeDescriptor
String
description of a Scope
objectCopyright © 2010–2024. All rights reserved.