From the course: Java Persistence with JPA and Hibernate

Unlock the full course today

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

EntityManager interface

EntityManager interface

- [Instructor] The persistence context is the core of an ORM framework. In an application that uses an ORM framework, all communications between IT and the database takes place via the persistence context. Then there should be a way for the application to communicate with the persistence context. In other words, there should be a way for the application to tell the persistence context to do certain operations that it needs to perform on the underlying database. Who facilitates this communication? Well, that's why the EntityManager interface is there. The EntityManager interface is a part of Jakarta persistence that facilitates communication between the application and the persistence context. In other words, it defines how your application should give instructions to the persistence context in order to interact with the underlying database via entity instances. The entity manage interface defines a set of methods to be able to do this. Among the many methods, there are a few important…

Contents