org.springframework.data.jdbc.core.mapping

## 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 Classes
`static class` `AggregateReference.IdOnlyAggregateReference<T,ID>` An `AggregateReference` that only holds the id of the referenced aggregate root.

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Default Methods
`ID` `getId()`
`static <T,ID> AggregateReference<T,ID>` `to(ID id)`

### Method Detail

#### to

    static <T,ID> AggregateReference<T,ID> to(ID id)

#### getId

    @Nullable
    ID getId()

Returns:
  the id of the referenced aggregate. May be `null`.