Module org.jmolecules.ddd
Package org.jmolecules.ddd.types
Interface Repository<T extends AggregateRoot<T,ID>,ID extends Identifier>
@Stereotype(priority=0)
public interface Repository<T extends AggregateRoot<T,ID>,ID extends Identifier>
Identifies a
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.
- Since:
- 1.2
- Author:
- Christian Stettler, Henning Schwentner, Stephan Pirnbaum, Martin Schimak, Oliver Drotbohm
- See Also: