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.

public interface AggregateReference<T,ID>
A reference to the aggregate root of a different aggregate.
Since:
1.0
Author:
Jens Schauder, Myeonghyeon Lee
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static <T,ID> AggregateReference<T,ID>
    to(ID id)
    Creates an AggregateReference that refers to the target aggregate root with the given id.
  • Method Details

    • to

      static <T,ID> AggregateReference<T,ID> to(ID id)
      Creates an AggregateReference 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 or a composite id (complex object).
      Returns:
    • getId

      ID getId()
      Returns:
      the id of the referenced aggregate.