Repository (design pattern)
A repository is a design pattern used in sotware engineering. It sits between the domain layer and the data access layer. It defines an interface for getting domain specific entities from the data access layer. To the domain layer, the repository will provide lists of domain objects; these lists are independent of how the domain objercts are stored, they might be provided by a database, or they might be obtained throigh a web service. The domain layer has the possibility to get domain-specific obhects or entities from the data access layer, independently of how these entities are stored. Using the repository, domain objects an be fetched using certain criteria, they can be added or removed. The repository's task is to fetch, store or delete then. The details of how this is done are not exposed to the domain layer.