DU05 to be handed in before the 6th exercise

JPA

Java Persistent API

Use the project (game, desktop app) from last semester and change the way the data is stored so that the data is stored in the database using JPA.

Don't forget, as per the exercise, to add dependencies, edit module-info.java, add a persistence.xml file and module-info.java.

Then just create a class with data (if you don't have one) and make it an entity class. So it must have the @Entity annotation, a constructor with no parameters, and some primary key - aunts some @Id.

Then use the class to store the data in the DB using the EntityManager class.

Method of submission

Submit the homework solution to the Kelvin system as the "Java 2 - Homework 1 - Maven" assignment. Upload the entire contents of the src folder and the pom.xml (and run script) file to the system. Follow the attached video below.

The project will then be compiled and Unit Tests will be performed. Due to the nature of the project and the provisional testing use of the Kelvin system in the Java 2 course, do not despair in case of failure.

This is an auxiliary test, everything will still be evaluated manually. It is important to upload the files so that everything can be evaluated and analyzed for plagiarism. I believe this is a formality and all of you are creating your own code.