Interface AggregateReference<T,ID>
- Type Parameters:
T
- the type of the referenced aggregate root.ID
- the type of the id of the referenced aggregate root.
- All Known Implementing Classes:
AggregateReference.IdOnlyAggregateReference
public interface AggregateReference<T,ID>
A reference to the aggregate root of a different aggregate.
- Since:
- 1.0
- Author:
- Jens Schauder, Myeonghyeon Lee
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version.since 3.5.3, will be converted to a package-private class in 4.0 as this class is an implementation detail and should not be used by application code. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
static <T,
ID> AggregateReference<T, ID> to
(ID id) Creates anAggregateReference
that refers to the target aggregate root with the given id.
-
Method Details
-
to
Creates anAggregateReference
that refers to the target aggregate root with the given id.- Type Parameters:
T
- target aggregate type.ID
- target aggregate identifier type.- Parameters:
id
- aggregate identifier. Must not be null, can be a simple value.- Returns:
-
getId
ID getId()- Returns:
- the id of the referenced aggregate.
-