Interface Summary Interface Description CacheAn API for directly querying and managing the second level cache. CustomEntityDirtinessStrategyDuring a flush cycle, Hibernate needs to determine which of the entities associated with a
Sessionare dirty, meaning modified.
CustomEntityDirtinessStrategy.AttributeCheckerResponsible for identifying when attributes are dirty. CustomEntityDirtinessStrategy.AttributeInformationProvides
CustomEntityDirtinessStrategy.AttributeCheckerwith meta information about the attributes being checked.
CustomEntityDirtinessStrategy.DirtyCheckContextA callback to drive dirty checking. EntityNameResolverAn object capable of determining the entity name for a given entity instance. FilterAllows control over an enabled filter at runtime. IdentifierLoadAccess<T>Loads an entity by its primary identifier. InterceptorAllows user code to inspect and/or change entity property values before they are written to the database, or after the are read from the database. LobHelperA
session'shelper for creating LOB data.
MultiIdentifierLoadAccess<T>Loads multiple entities at once by identifiers, ultimately via one of the
MultiIdentifierLoadAccess.multiLoad(K...)methods, using the various options specified (if any)
NaturalIdLoadAccess<T>Loads an entity by its natural identifier. NaturalIdMultiLoadAccess<T>Defines the ability to load multiple entities by simple natural-id simultaneously. NotImplementedYetExceptionMarker interface for exceptions that indicate that something hasn't been implemented yet for a certain version ScrollableResults<R>A result iterator that allows moving around within the results by arbitrary increments. SessionThe main runtime interface between a Java application and Hibernate. Session.LockRequestContains locking details (LockMode, Timeout and Scope). SessionBuilder<T extends SessionBuilder>Allows creation of a new
Sessionwith specific options.
SessionEventListenerNOTE : Consider this an incubating API, likely to change as wider usage indicates changes that need to be made SessionFactoryA
SessionFactoryrepresents an "instance" of Hibernate: it maintains the runtime metamodel representing persistent entities, their attributes, their associations, and their mappings to relational database tables, along with configuration that affects the runtime behavior of Hibernate, and instances of services that Hibernate needs to perform its duties.
SessionFactoryObserverAllows reaction to basic
SharedSessionBuilder<T extends SharedSessionBuilder>Specialized
SessionBuilderwith access to stuff from another session.
SharedSessionContract SimpleNaturalIdLoadAccess<T>Loads an entity by its natural identifier. StatelessSessionA command-oriented API for performing bulk operations against a database. StatelessSessionBuilder<T extends StatelessSessionBuilder>Represents a consolidation of all stateless session creation options into a builder style delegate. TransactionRepresents a resource-local transaction, where resource-local is interpreted by Hibernate to mean any transaction under the control of Hibernate.
Class Summary Class Description BaseSessionEventListenerA no-op implementation of SessionEventListener. EmptyInterceptor Deprecated.implement
HibernateVarious utility functions for working with proxies and lazy collection references. Hibernate.CollectionInterface<C>Operations for obtaining references to persistent collections of a certain type. LengthDefines a list of useful constant values that may be used to specify long column lengths in the JPA
LockOptionsContains locking details (LockMode, Timeout and Scope). VersionInformation about the version of Hibernate.
Enum Summary Enum Description CacheModeControls how the session interacts with the second-level cache and query cache. ConnectionAcquisitionModeIndicates the manner in which JDBC Connections should be acquired. ConnectionReleaseModeDefines the various policies by which Hibernate might release its underlying JDBC connection. DuplicateMappingException.TypeEnumeration of the types of things that can be duplicated. FetchModeRepresents an association fetching strategy. FlushModeRepresents a flushing strategy. LockModeInstances represent a lock mode for a row of a relational database table. ReplicationModeRepresents a replication strategy used by
ScrollMode TimeZoneStorageStrategyDescribes the storage strategies understood by Hibernate.
Exception Summary Exception Description AnnotationExceptionAnnotation related exception. AssertionFailureIndicates failure of an assertion: a possible bug in Hibernate. CallbackException DuplicateMappingExceptionRaised whenever a duplicate for a certain type occurs. FetchNotFoundExceptionException for
HibernateErrorMarks a group of exceptions that generally indicate an internal Hibernate error or bug. HibernateExceptionThe base exception type for Hibernate exceptions. InstantiationExceptionThrown if Hibernate can't instantiate a class at runtime. InvalidMappingExceptionThrown when a mapping is found to be invalid. JDBCExceptionWraps a
LazyInitializationExceptionIndicates an attempt to access not-yet-fetched data outside of a session context. MappingExceptionAn exception that occurs while reading mapping sources (xml/annotations), usually as a result of something screwy in the O-R mappings. NonUniqueObjectExceptionThis exception is thrown when an operation would break session-scoped identity. NonUniqueResultExceptionThrown when the application calls
Query.uniqueResult()and the query returned more than one result.
NotYetImplementedFor6ExceptionThrown from methods added for 6.0 that are not yet implemented. ObjectDeletedExceptionThrown when the user tries to do something illegal with a deleted object. ObjectNotFoundExceptionThrown when
Session.load()fails to select a row with the given primary key (identifier value).
PersistentObjectExceptionThrown when the user passes a persistent instance to a
Sessionmethod that expects a transient instance.
PessimisticLockExceptionThrown when a pessimistic locking conflict occurs. PropertyAccessExceptionA problem occurred accessing a property of an instance of a persistent class by reflection, or via enhanced entities. PropertyNotFoundExceptionIndicates that an expected getter or setter method could not be found on a class. PropertySetterAccessException PropertyValueExceptionThrown when the (illegal) value of a property can not be persisted. QueryExceptionA problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. QueryParameterExceptionParameter invalid or not found in the query. QueryTimeoutExceptionThrown when a database query timeout occurs. ResourceClosedExceptionIndicates an attempt was made to use a closed resource (Session, SessionFactory, etc). SessionExceptionThrown when the user calls a method of a
Sessionthat is in an inappropriate state for the given call (for example, the session is closed or disconnected).
SessionFactory.TransactionManagementException StaleObjectStateExceptionA specialized StaleStateException that carries information about the particular entity instance that was the source of the failure. StaleStateExceptionThrown when a version number or timestamp check failed, indicating that the Session contained stale data (when using long transactions with versioning). TransactionExceptionIndicates that a transaction could not be begun, committed or rolled back. TransientObjectExceptionThrown when the user passes a transient instance to a Session method that expects a persistent instance. TransientPropertyValueExceptionThrown when a property cannot be persisted because it is an association with a transient unsaved entity instance. TypeMismatchExceptionUsed when a user provided type does not match the expected one. UnknownEntityTypeExceptionIndicates an attempt was made to refer to an unknown entity name/class. UnknownProfileExceptionUsed to indicate a request against an unknown profile name. UnresolvableObjectExceptionThrown when Hibernate could not resolve an object by id, especially when loading an association. UnsupportedLockAttemptExceptionThis exception is thrown when an invalid LockMode is selected for an entity. WrongClassExceptionThrown when loading an entity (by identifier) results in a value that cannot be treated as the subclass type requested by the caller.
Annotation Types Summary Annotation Type Description IncubatingMarks certain of packages, types, etc. InternalAnnotation used to identify a package, class, interface or method as "internal", meaning that applications should expect no guarantees with regard to the binary stability from release to release.