5.2. The domain model

The Sportsclub-domain module is the only module of the application that does not integrate with Spring directly. However, it is used further in the application as it provides:
  • the entities that the application will interact with;
  • the repository interfaces that provide persistence services for the application;


The term 'repository' is used for the components that retrieve objects from persistence and save them. This is done to indicate that the design of the application is emulating the concepts behind Domain-Driven Design, where objects that are used for providing the persistence and entity lookup functions are part of the domain, rather than simple persistence implementation strategies.
Domain entities of the application and their connections

Figure 5.1. Domain entities of the application and their connections

Figure 5.1, “Domain entities of the application and their connections” shows the domain entities of the application. Figure 5.2, “The Account and Person entities” shows a more detailed overview of the entities involved in the Account/Person relationship, including the non-entity domain objects.
The Account and Person entities

Figure 5.2. The Account and Person entities