From the course: Java Persistence with JPA

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Challenge: Persist employee, company, and salary entities

Challenge: Persist employee, company, and salary entities - Java Tutorial

From the course: Java Persistence with JPA

Challenge: Persist employee, company, and salary entities

(pensive music) - [Instructor] The hands-on portion is always my favorite part of a course. In this hands-on challenge, you'll practice adding the proper annotations to persist Employee, Company, and Salary entities. You'll make sure you've added the proper annotations to persist your entities, and then you'll implement the repository layer to persist your data. You have your starter code already. You should have the Maven project from the last challenge with your Company, Employee, and Salary entities. Make sure you have the proper annotations for your entities, tables, IDs, and columns. In this challenge, you will add the repository layer. Use the repository pattern to create the CRUD operations. You should create a CompanyRepository, an EmployeeRepository, and a SalaryRepository. Once you create those interfaces, don't forget to add the implementations, and the EntityManager methods of persist, merge, remove, and…

Contents