registerWith

public void registerWith(BoundedContext context)

Assigns a BoundedContext to this repository.

A context for a repository can be set only once. Passing the same second time will have no effect.

If the repository is not opened prior to this call, it is opened.

Throws

if the repository has a context value already assigned, and the passed value is not equal to the assigned one