org.hibernate.SessionFactory , which represents an instance of
Hibernate at runtime and is the source of new instances of
org.hibernate.Session and org.hibernate.StatelessSession ,
the most important APIs exposing persistence-related operations for
entities. The interface org.hibernate.SharedSessionContract
declares operations that are common to both stateful and stateless sessions.
Playing important supporting roles here, we also have
org., org.,
and org..
APIs related to querying are now defined under the namespace
org..
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Cache
An API for directly querying and managing the second-level cache. |
| public interface | CustomEntityDirtinessStrategy
During a flush cycle, Hibernate needs to determine which of the entities associated with a |
| public interface | EntityNameResolver
An object capable of determining the entity name for a given entity instance. |
| public interface | Filter
Allows control over an enabled filter at runtime. |
| public interface | |
| public interface | Interceptor
Allows user code to inspect and/or change entity property values before they are written to the database, or after they are read from the database. |
| public interface | |
| public interface | Metamodel
Deprecated
since 6.0. Prefer
JpaMetamodel
|
| public interface | MultiIdentifierLoadAccess<T>
Loads multiple instances of a given entity type at once, by specifying a list of identifier values. |
| public interface | NaturalIdLoadAccess<T>
Loads an entity by its natural identifier, which may be a composite value comprising more than one attribute of the entity. |
| public interface | NaturalIdMultiLoadAccess<T>
Loads multiple instances of a given entity type at once, by specifying a list of natural id values. |
| public interface | ScrollableResults<R>
A result iterator that allows moving around within the results by arbitrary increments. |
| public interface | Session
The main runtime interface between a Java application and Hibernate. |
| public interface | SessionBuilder
Allows creation of a new |
| public interface | SessionEventListener
Implemented by custom listeners that respond to low-level events
involving interactions between the |
| public interface | SessionFactory
A |
| public interface | SessionFactoryObserver
Allows reaction to basic |
| public interface | SharedSessionBuilder
Specialized |
| public interface | SharedSessionContract
Declares operations that are common between |
| public interface | |
| public interface | StatelessSession
A command-oriented API often used for performing bulk operations against the database. |
| public interface | StatelessSessionBuilder
Allows creation of a new |
| public interface | Transaction
Represents a resource-local transaction, where resource-local is interpreted by Hibernate to mean any transaction under the control of Hibernate. |
| Modifier and Type | Annotation and Description |
|---|---|
| public @interface | Incubating
Marks the annotated Java element as incubating, potentially recursively. |
| public @interface | Internal
Marks the annotated Java element as forming part of the internal implementation of Hibernate, meaning that clients should expect absolutely no guarantees with regard to the binary stability from release to release. |
| public @interface | Remove
Indicates that the annotated element is planned for removal as part of a deprecation process. |
| Modifier and Type | Class and Description |
|---|---|
| public class | AnnotationException
An exception that occurs while reading mapping annotations. |
| public class | AssertionFailure
Indicates failure of an assertion: a possible bug in Hibernate. |
| public class | BaseSessionEventListener
A no-op implementation of SessionEventListener. |
| public class | CallbackException
Intended to be thrown from |
| public class | DuplicateMappingException
Raised whenever a duplicate for a certain type occurs, such as a duplicate class, table, or property name. |
| public class | EmptyInterceptor
Deprecated
since 6.0. implement An interceptor that does nothing.
Interceptor directly
|
| public class | |
| public class | Hibernate
Various utility functions for working with proxies and lazy collection references. |
| public class | HibernateError
Marks a group of exceptions that generally indicate an internal Hibernate error or bug. |
| public class | HibernateException
The base type for exceptions thrown by Hibernate. |
| public class | InstantiationException
Thrown if Hibernate can't instantiate a class at runtime. |
| public class | InvalidMappingException
Thrown when a mapping is found to be invalid. |
| public class | JDBCException
Wraps a |
| public class | LazyInitializationException
Indicates an attempt to access unfetched data outside the context
of an open stateful |
| public class | Length
Defines a list of useful constant values that may be used
to specify long column lengths in the JPA
|
| public class | LockOptions
Contains a set of options describing how a row of a database table mapped by an entity should be locked. |
| public class | MappingException
An exception that occurs while reading mapping sources, either XML or annotations, usually as a result of something screwy in the O/R mappings. |
| public class | NonUniqueObjectException
This exception is thrown when an operation would break session-scoped identity. |
| public class | NonUniqueResultException
Thrown when the application calls |
| public class | ObjectDeletedException
Thrown when the user tries to do something illegal with a deleted object. |
| public class | ObjectNotFoundException
Thrown when |
| public class | PersistentObjectException
Thrown when the user passes a persistent instance to a |
| public class | PessimisticLockException
Thrown when a pessimistic locking conflict occurs. |
| public class | PropertyAccessException
A problem occurred accessing a property of an instance of a persistent class by reflection, or via enhanced entities. |
| public class | PropertyNotFoundException
Indicates that an expected getter or setter method could not be found on a class. |
| public class | |
| public class | PropertyValueException
Thrown when the (illegal) value of a property can not be persisted. |
| public class | QueryException
A problem occurred translating a Hibernate query to SQL due to illegal query syntax, an operation which is not well-typed, an unresolvable reference to an entity or attribute, an unknown named query, or any similar problem. |
| public class | QueryParameterException
Indicates a problem with the runtime arguments bound to query parameters. |
| public class | QueryTimeoutException
Thrown when a database query timeout occurs. |
| public class | ResourceClosedException
Indicates an attempt was made to use a closed resource, such as
a closed |
| public class | SessionException
Thrown when the user calls a method of a |
| public class | StaleObjectStateException
A specialized |
| public class | StaleStateException
Thrown when a version number or timestamp check failed, indicating that
the |
| public class | TransactionException
Indicates that a transaction could not be begun, committed or rolled back. |
| public class | TransactionManagementException
Thrown when user code causes the end of a transaction that is
being managed by the |
| public class | TransientObjectException
Thrown when the user passes a transient instance to a |
| public class | TransientPropertyValueException
Thrown when a property cannot be persisted because it is an association with a transient unsaved entity instance. |
| public class | TypeMismatchException
Used when a user provided type does not match the expected one. |
| public class | UnknownEntityTypeException
Indicates an attempt was made to refer to an unknown entity name or class. |
| public class | UnknownFilterException
Indicates a request against an unknown filter name. |
| public class | UnknownProfileException
Indicates a request against an unknown fetch profile name. |
| public class | UnresolvableObjectException
Thrown when Hibernate could not resolve an object by id, especially when loading an association. |
| public class | UnsupportedLockAttemptException
This exception is thrown when an invalid |
| public class | Version
Information about the version of Hibernate. |
| public class | WrongClassException
Thrown when loading an entity (by identifier) results in a value that cannot be treated as the subclass type requested by the caller. |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | CacheMode
Controls how the session interacts with the second-level cache or query cache. |
| public enum | ConnectionAcquisitionMode
Indicates the manner in which JDBC connections are acquired. |
| public enum | ConnectionReleaseMode
Enumerates various policies for releasing JDBC connections. |
| public enum | FetchMode
Represents an association fetching strategy. |
| public enum | FlushMode
Represents a flushing strategy. |
| public enum | LockMode
Instances represent a lock mode for a row of a relational database table. |
| public enum | ReplicationMode
Deprecated
since 6.2. since Represents a replication strategy used by
Session#replicate(Object, ReplicationMode) is deprecated
Session#replicate(Object, ReplicationMode).
|
| public enum | ScrollMode
Specifies the type of JDBC scrollable result set
to use underneath a |
| public enum | TimeZoneStorageStrategy
Enumerates the possible storage strategies for offset or zoned datetimes. |