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
EntityManagerFactory
is also aSessionFactory
, - every
EntityManager
is also aSession
, and - every
Query
is also aQuery
.
Thus, Hibernate's many powerful extensions to the JPA specification are always readily accessible.
- The subpackage
org.hibernate.jpa.boot.spi
contains 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.event
implements support for JPA event listeners. - The package
org.hibernate.jpa.spi
provides 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:
SpecHints
enumerates the standard hints defined by the JPA specification, andHibernateHints
enumerates hints defined by Hibernate.
-
Interface Summary Interface Description AvailableHints Combined set of Hibernate and Jakarta Persistence hints.HibernateHints List of Hibernate-specific (extension) hints available to query, load, and lock scenarios.JpaComplianceViolation Marker interface for exceptions describing JPA compliance violations.LegacySpecHints Deprecated. Use theSpecHints
form insteadSpecHints The hints explicitly defined by the Jakarta Persistence specification which are available for both queries and loading. -
Class Summary Class Description HibernatePersistenceProvider The best-ever implementation of a JPAPersistenceProvider
.QueryHints Deprecated. UseAvailableHints
instead