Hibernate O/RM Aggregated JavaDocs
Hibernate provides both
-
a native API comprised centrally around {@link org.hibernate.SessionFactory} and {@link org.hibernate.Session}
-
an implementation of the Java Persistence API (JPA).
See the latest JPA JSR for details.
Native API
In addition to SessionFactory and Session, applications using the native API will often utilize the following
interfaces:
- {@link org.hibernate.cfg.Configuration}
- {@link org.hibernate.Transaction}
- {@link org.hibernate.Query}
- {@link org.hibernate.Criteria}
- {@link org.hibernate.criterion.Projection}
- {@link org.hibernate.criterion.Projections}
- {@link org.hibernate.criterion.Criterion}
- {@link org.hibernate.criterion.Restrictions}
- {@link org.hibernate.criterion.Order}
- {@link org.hibernate.criterion.Example}
These interfaces are fully intended to be exposed to application code.
JPA
The JPA interfaces are all defined by the JPA specification. For details see {@link javax.persistence}.
Not that since 5.2 Hibernate extends JPA (e.g. SessionFactory extends EntityManagerFactory) rather
than wrapping it.
Note about package categories
Hibernate categorizes packages into a number of groups based on intended consumers:
-
API - classes to which application code will generally bind directly. These
are generally classes which do not have "spi" nor "internal" in their package path and are
not under the "org.hibernate.testing" package
-
SPI - classes to which integrator developers will commonly bind directly in
order to develop extensions to Hibernate, or to alter its behavior in some way. These are
generally under packages with "spi" in the package path.
-
Testing Support - classes from the hibernate-testing artifact used in building
Hibernate test cases. These are classes under the "org.hibernate.testing" package
Complete Hibernate documentation may be found online at http://hibernate.org/orm/documentation/