Add JPA configuration for `read-write-pi` module
Problem
Domain entities created in #27 (closed) should be ready for persistence in the relational database.
Solution
Use JPA to configure domain entites mapping into relational database.
Decisions
Domain entities should be annotated with javax.persistence
annotations.
Alternatives
- Usage of JDBC templates and "plain" SQL which would harder to maintain.
- Usage of non-standard annotations like
Hibernate
which would introduce vendor-lock.
Concerns
- JPA would affect the design of domain entities.
- Some auto-generated queries wouldn't be optimal.
Assumptions
- Usage of Relational Databases with compliant Java Drivers and JPA provider support.
- No strict requirements for performance.
Risks
- Change of DB would affect configuration [5;4]
- Change of JPA provider would affect configuration [5;6]