9.3. The Hibernate interfaces
Any transparent persistence tool includes a persistence manager API. This persistence manager usually provides services for the following:
Basic CRUD (create, retrieve, update, delete) operations
Query execution
Control of transactions
Management of the persistence context
The persistence manager may be exposed by several different interfaces. In the case of Hibernate, these are Session, Query, Criteria, and Transaction. Under the covers, the implementations of these interfaces are coupled tightly together.
In Java Persistence, the main interface you interact with is the EntityManager; it has the same role as the Hibernate Session. Other Java Persistence interfaces are Query and EntityTransaction (you can probably ...
Get Java Persistence with Hibernate now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.