@Retention(value=RUNTIME) @Target(value=TYPE) @Documented public @interface Repository
Repository. Repositories simulate a collection of aggregates to which aggregate instances can be
added and removed. They usually also expose API to select a subset of aggregates matching certain criteria. Access to
projections of an aggregate might be provided as well but also via a dedicated separate abstraction.
Implementations use a dedicated persistence mechanism appropriate to the data structure and query requirements at hand. However, they should make sure that no persistence mechanism specific APIs leak into client code.
AggregateRoot,
Domain-Driven Design
Reference (Evans) - RepositoriesCopyright © 2020. All rights reserved.