@Experimental @SPI public interface AggregateRootDirectory
In the directory, the aggregate root is represented by its type and the parts - by their repositories.
|Modifier and Type||Method and Description|
Looks up an aggregate part repository by the type of the root and the type of the part state.
Associates the given aggregate part repository and the respective root type.
void register(AggregatePartRepository<?,?,?> repository)
java.util.Optional<? extends AggregatePartRepository<?,?,?>> findPart(java.lang.Class<? extends AggregateRoot<?>> rootClass, java.lang.Class<? extends io.spine.base.EntityState> partStateClass)
If a matching repository if registered, it is obtained by this method with no regard to the visibility of the aggregate.
rootClass- the type of the aggregate root
partStateClass- the type of the part state
Optional.empty()if such a repository is not registered