Refactoring from SQL to ORM

Refactoring from an SQL to an ORM implementation is simpler than you might think. Most of the refactoring involves the removal of excess code in the form of an SQL. In this next section, we will refactor our SQL implementation to a JPA implementation.

In order for JPA to map our domain objects to our database, we need to perform some mapping on our domain objects.