Uses of Interface
org.hibernate.Session
Packages that use Session
Package
Description
This package defines the central Hibernate APIs, beginning with
SessionFactory, which represents an instance of
Hibernate at runtime and is the source of new instances of
Session and StatelessSession,
the most important APIs exposing persistence-related operations for
entities.Internal implementations and support around "current session" handling.
SPI-level contracts around "current session" and "current tenant" support.
This package defines some central internal SPI abstractions
used throughout the implementation of Hibernate.
Defines the event types and event listener interfaces for
events produced by the stateful
Session.An internal package containing implementations of central Hibernate APIs,
mostly defined in
org.hibernate.Defines an SPI for calling stored procedures and functions.
Support for SelectionSpecification
and MutationSpecification which
is similar in concept to criteria queries, but focused on ease-of-use and less verbosity.
-
Uses of Session in org.hibernate
Methods in org.hibernate that return SessionModifier and TypeMethodDescriptionSessionFactory.createEntityManager()Create a newSession.SessionFactory.createEntityManager(SynchronizationType synchronizationType) Create a newSession, with the given synchronization type.SessionFactory.createEntityManager(SynchronizationType synchronizationType, Map<?, ?> map) SessionFactory.createEntityManager(Map<?, ?> map) Create a newSession, with the given properties.SessionFactory.getCurrentSession()Obtains the current session, an instance ofSessionimplicitly associated with some context or scope.SessionBuilder.openSession()Opens a session with the specified options.SessionFactory.openSession()Open aSession.Methods in org.hibernate with parameters of type SessionModifier and TypeMethodDescriptionbooleanCustomEntityDirtinessStrategy.canDirtyCheck(Object entity, EntityPersister persister, Session session) Is this strategy capable of telling whether the given entity is dirty? A return oftruemeans thatCustomEntityDirtinessStrategy.isDirty(java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.Session)will be called next as the definitive means to determine whether the entity is dirty.voidEnable the fetch profile represented by this object in the given session.voidCustomEntityDirtinessStrategy.findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext) Callback used to hook into Hibernate algorithm for determination of which attributes have changed.booleanCustomEntityDirtinessStrategy.isDirty(Object entity, EntityPersister persister, Session session) The callback used by Hibernate to determine if the given entity is dirty.voidCustomEntityDirtinessStrategy.resetDirty(Object entity, EntityPersister persister, Session session) Callback used by Hibernate to signal that the entity dirty flag should be cleared.Method parameters in org.hibernate with type arguments of type SessionModifier and TypeMethodDescriptiondefault <R> RSessionFactory.fromSession(Function<? super Session, R> action) Open aSessionand use it to obtain a value.default <R> RSessionFactory.fromTransaction(Function<? super Session, R> action) Open aSessionand use it to obtain a value within the bounds of a transaction.default voidOpen aSessionand use it to perform the given action.default voidSessionFactory.inTransaction(Consumer<? super Session> action) Open aSessionand use it to perform the given action within the bounds of a transaction. -
Uses of Session in org.hibernate.boot.internal
Methods in org.hibernate.boot.internal with parameters of type SessionModifier and TypeMethodDescriptionbooleanDefaultCustomEntityDirtinessStrategy.canDirtyCheck(Object entity, EntityPersister persister, Session session) voidDefaultCustomEntityDirtinessStrategy.findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext) booleanDefaultCustomEntityDirtinessStrategy.isDirty(Object entity, EntityPersister persister, Session session) voidDefaultCustomEntityDirtinessStrategy.resetDirty(Object entity, EntityPersister persister, Session session) -
Uses of Session in org.hibernate.context.internal
Methods in org.hibernate.context.internal that return SessionModifier and TypeMethodDescriptionstatic SessionBinds the given session to the current context for its session factory.protected SessionJTASessionContext.buildOrObtainSession()Strictly provided for subclassing purposes; specifically to allow long-session support.protected SessionThreadLocalSessionContext.buildOrObtainSession()Strictly provided for sub-classing purposes; specifically to allow long-session support.JTASessionContext.currentSession()ManagedSessionContext.currentSession()final SessionThreadLocalSessionContext.currentSession()static SessionManagedSessionContext.unbind(SessionFactory factory) Unbinds the session (if one) current associated with the context for the given session.static SessionThreadLocalSessionContext.unbind(SessionFactory factory) Disassociates a previously bound session from the current thread of execution.protected SessionMethods in org.hibernate.context.internal that return types with arguments of type SessionModifier and TypeMethodDescriptionprotected static Map<SessionFactory, Session> ManagedSessionContext.sessionMap()protected static Map<SessionFactory, Session> ThreadLocalSessionContext.sessionMap()Methods in org.hibernate.context.internal with parameters of type Session -
Uses of Session in org.hibernate.context.spi
Methods in org.hibernate.context.spi that return SessionModifier and TypeMethodDescriptionCurrentSessionContext.currentSession()Retrieve the current session according to the scoping defined by this implementation.Methods in org.hibernate.context.spi with parameters of type SessionModifier and TypeMethodDescriptionprotected voidAbstractCurrentSessionContext.validateExistingSession(Session existingSession) -
Uses of Session in org.hibernate.engine.spi
Subinterfaces of Session in org.hibernate.engine.spiModifier and TypeInterfaceDescriptioninterfaceDefines the "internal contract" betweenSessionand other parts of Hibernate including implementors ofType,EntityPersister, andCollectionPersister.Classes in org.hibernate.engine.spi that implement SessionModifier and TypeClassDescriptionclassA wrapper class that delegates all method invocations to a delegate instance ofSessionImplementor.classThis helper class allows decorating a Session instance, while the instance itself is lazily provided via aSupplier.Methods in org.hibernate.engine.spi that return SessionModifier and TypeMethodDescriptionSessionFactoryDelegatingImpl.createEntityManager()SessionFactoryDelegatingImpl.createEntityManager(SynchronizationType synchronizationType) SessionFactoryDelegatingImpl.createEntityManager(SynchronizationType synchronizationType, Map map) SessionFactoryDelegatingImpl.createEntityManager(Map map) SessionFactoryDelegatingImpl.getCurrentSession()AbstractDelegatingSessionBuilder.openSession()AbstractDelegatingSharedSessionBuilder.openSession()Constructor parameters in org.hibernate.engine.spi with type arguments of type Session -
Uses of Session in org.hibernate.envers
Methods in org.hibernate.envers with parameters of type SessionModifier and TypeMethodDescriptionstatic AuditReaderCreate an audit reader associated with an open session. -
Uses of Session in org.hibernate.envers.internal.entities.mapper.id
Methods in org.hibernate.envers.internal.entities.mapper.id with parameters of type SessionModifier and TypeMethodDescriptiondefault voidvoidvoid -
Uses of Session in org.hibernate.envers.internal.entities.mapper.relation.lazy
Classes in org.hibernate.envers.internal.entities.mapper.relation.lazy that implement SessionModifier and TypeClassDescriptionclassclass -
Uses of Session in org.hibernate.envers.internal.reader
Methods in org.hibernate.envers.internal.reader that return SessionModifier and TypeMethodDescriptionAuditReaderImpl.getSession()AuditReaderImplementor.getSession()Constructors in org.hibernate.envers.internal.reader with parameters of type SessionModifierConstructorDescriptionAuditReaderImpl(EnversService enversService, Session session, SessionImplementor sessionImplementor) -
Uses of Session in org.hibernate.envers.internal.revisioninfo
Methods in org.hibernate.envers.internal.revisioninfo with parameters of type SessionModifier and TypeMethodDescriptionQuery<?> RevisionInfoQueryCreator.getRevisionDateQuery(Session session, Number revision) Query<?> RevisionInfoQueryCreator.getRevisionNumberForDateQuery(Session session, Instant instant) Query<?> RevisionInfoQueryCreator.getRevisionNumberForDateQuery(Session session, LocalDateTime localDateTime) Query<?> RevisionInfoQueryCreator.getRevisionNumberForDateQuery(Session session, Date date) Query<?> RevisionInfoQueryCreator.getRevisionsQuery(Session session, Set<Number> revisions) voidDefaultRevisionInfoGenerator.saveRevisionData(Session session, Object revisionData) voidRevisionInfoGenerator.saveRevisionData(Session session, Object revisionData) -
Uses of Session in org.hibernate.envers.internal.synchronization
Methods in org.hibernate.envers.internal.synchronization with parameters of type SessionModifier and TypeMethodDescriptionvoidEntityChangeNotifier.entityChanged(Session session, Object currentRevisionData, AuditWorkUnit vwu) NotifiesRevisionInfoGeneratorabout changes made in the current revision.AuditProcess.getCurrentRevisionData(Session session, boolean persist) voidSessionCacheCleaner.scheduleAuditDataRemoval(Session session, Object data) Schedules audit data removal from session level cache after transaction completion. -
Uses of Session in org.hibernate.envers.internal.synchronization.work
Methods in org.hibernate.envers.internal.synchronization.work with parameters of type SessionModifier and TypeMethodDescriptionvoidvoidPerform this work unit in the given session.voidvoidvoid -
Uses of Session in org.hibernate.envers.internal.tools.query
Methods in org.hibernate.envers.internal.tools.query with parameters of type Session -
Uses of Session in org.hibernate.envers.strategy
Methods in org.hibernate.envers.strategy with parameters of type SessionModifier and TypeMethodDescriptiondefault voidAuditStrategy.perform(Session session, String entityName, EnversService enversService, Object id, Object data, Object revision) Deprecated.default voidAuditStrategy.performCollectionChange(Session session, String entityName, String propertyName, EnversService enversService, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) -
Uses of Session in org.hibernate.envers.strategy.internal
Methods in org.hibernate.envers.strategy.internal with parameters of type SessionModifier and TypeMethodDescriptionvoidDefaultAuditStrategy.perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision) voidValidityAuditStrategy.perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision) voidDefaultAuditStrategy.performCollectionChange(Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) voidValidityAuditStrategy.performCollectionChange(Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) -
Uses of Session in org.hibernate.envers.strategy.spi
Methods in org.hibernate.envers.strategy.spi with parameters of type SessionModifier and TypeMethodDescriptionvoidAuditStrategy.perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision) Perform the persistence of audited data for regular entities.voidAuditStrategy.performCollectionChange(Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) Perform the persistence of audited data for collection ("middle") entities. -
Uses of Session in org.hibernate.event.spi
Subinterfaces of Session in org.hibernate.event.spi -
Uses of Session in org.hibernate.internal
Classes in org.hibernate.internal that implement SessionMethods in org.hibernate.internal that return SessionModifier and TypeMethodDescriptionSessionFactoryImpl.createEntityManager()SessionFactoryImpl.createEntityManager(SynchronizationType synchronizationType) SessionFactoryImpl.createEntityManager(SynchronizationType synchronizationType, Map map) SessionFactoryImpl.createEntityManager(Map map) SessionFactoryImpl.getCurrentSession() -
Uses of Session in org.hibernate.procedure.spi
Methods in org.hibernate.procedure.spi with parameters of type SessionModifier and TypeMethodDescriptiondefault ProcedureCallNamedCallableQueryMemento.makeProcedureCall(Session session) Convert the memento back into an executable (connected) form. -
Uses of Session in org.hibernate.query.specification
Methods in org.hibernate.query.specification with parameters of type SessionModifier and TypeMethodDescriptionMutationSpecification.createQuery(Session session) Finalize the building and create the MutationQuery instance.QuerySpecification.createQuery(Session session) Finalize the building and create executable query instance.SelectionSpecification.createQuery(Session session) -
Uses of Session in org.hibernate.query.specification.internal
Methods in org.hibernate.query.specification.internal with parameters of type SessionModifier and TypeMethodDescriptionMutationSpecificationImpl.createQuery(Session session) SelectionSpecificationImpl.createQuery(Session session)
AuditStrategy.perform(Session, String, Configuration, Object, Object, Object)