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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
What is an entity?4m 3s
-
(Locked)
Demo: Working with the entity manager4m 50s
-
(Locked)
Demo: Persisting entities3m 53s
-
(Locked)
Mapping keys3m 1s
-
(Locked)
Demo: Mapping keys1m 54s
-
(Locked)
Implementing CRUD operations2m 49s
-
(Locked)
Demo: CRUD operations2m 10s
-
(Locked)
Challenge: Persist employee, company, and salary entities2m 17s
-
(Locked)
Solution: Persist employee, company, and salary entities3m 55s
-
-
-
-
-