Package org.hibernate.jpa
package org.hibernate.jpa
The packages in this namespace are responsible for implementing certain
requirements of the JPA specification, especially things which are only
needed when Hibernate is acting as a JPA persistence provider.
This package contains an
implementation
of a JPA PersistenceProvider. You may
choose Hibernate as your JPA persistence provider by including the
following line in persistence.xml:
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
When working with the Hibernate persistence provider, keep in mind that:
- the
EntityManagerFactoryis also aSessionFactory, - every
EntityManageris also aSession, and - every
Queryis also aQuery.
Thus, Hibernate's many powerful extensions to the JPA specification are always readily accessible.
- The subpackage
org.hibernate.jpa.boot.spicontains the SPI of this persistence provider, including an SPI used to bootstrap the JPA provider, and interfaces which may be implemented to contribute extensions during of the bootstrap process. - The package
org.hibernate.jpa.eventimplements support for JPA event listeners. - The package
org.hibernate.jpa.spiprovides SPIs for managing cases where Hibernate intentionally violates the JPA specification by default (something Hibernate only does when it has a really good reason to do so).
Finally, we have two interfaces which enumerate the JPA query hints recognized by Hibernate:
SpecHintsenumerates the standard hints defined by the JPA specification, andHibernateHintsenumerates hints defined by Hibernate.
-
ClassDescriptionCombined set of Hibernate and Jakarta Persistence hints.List of Hibernate-specific (extension) hints available to query, load, and lock scenarios.The best-ever implementation of a JPA
PersistenceProvider.Marker interface for exceptions describing JPA compliance violations.Deprecated.Deprecated.UseAvailableHintsinsteadThe hints explicitly defined by the Jakarta Persistence specification which are available for both queries and loading.
SpecHintsform instead