Uses of Interface
org.hibernate.Session
-
Packages that use Session Package Description org.hibernate This package defines the central Hibernate APIs, beginning withSessionFactory
, which represents an instance of Hibernate at runtime and is the source of new instances ofSession
andStatelessSession
, the most important APIs exposing persistence-related operations for entities.org.hibernate.boot.internal org.hibernate.classic This package historically provided backward-compatibility with Hibernate 2.1 APIs which were deprecated in Hibernate 3.org.hibernate.context.internal Internal implementations and support around "current session" handling.org.hibernate.context.spi SPI-level contracts around "current session" and "current tenant" support.org.hibernate.engine.spi This package defines some central internal SPI abstractions used throughout the implementation of Hibernate.org.hibernate.envers org.hibernate.envers.internal.entities.mapper.id org.hibernate.envers.internal.entities.mapper.relation.lazy org.hibernate.envers.internal.reader org.hibernate.envers.internal.revisioninfo org.hibernate.envers.internal.synchronization org.hibernate.envers.internal.synchronization.work org.hibernate.envers.internal.tools.query org.hibernate.envers.strategy org.hibernate.envers.strategy.internal org.hibernate.envers.strategy.spi org.hibernate.event.spi Defines the event types and event listener interfaces for events produced by the statefulSession
.org.hibernate.graph Implements and extends the JPA-defined entity graph API.org.hibernate.internal An internal package containing implementations of central Hibernate APIs, mostly defined inorg.hibernate
.org.hibernate.procedure.spi Defines an SPI for calling stored procedures and functions.org.hibernate.testing.junit4 org.hibernate.testing.transaction org.hibernate.tuple Most contracts here have been replaced by the new runtime mapping model. -
-
Uses of Session in org.hibernate
Methods in org.hibernate that return Session Modifier and Type Method Description Session
SessionFactory. getCurrentSession()
Obtains the current session, an instance ofSession
implicitly associated with some context or scope.Session
SessionBuilder. openSession()
Opens a session with the specified options.Session
SessionFactory. openSession()
Open aSession
.Methods in org.hibernate with parameters of type Session Modifier and Type Method Description boolean
CustomEntityDirtinessStrategy. canDirtyCheck(Object entity, EntityPersister persister, Session session)
Is this strategy capable of telling whether the given entity is dirty? A return oftrue
means 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.void
CustomEntityDirtinessStrategy. findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext)
Callback used to hook into Hibernate algorithm for determination of which attributes have changed.boolean
CustomEntityDirtinessStrategy. isDirty(Object entity, EntityPersister persister, Session session)
The callback used by Hibernate to determine if the given entity is dirty.void
CustomEntityDirtinessStrategy. 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 Session Modifier and Type Method Description default <R> R
SessionFactory. fromSession(Function<Session,R> action)
Open aSession
and use it to obtain a value.default <R> R
SessionFactory. fromTransaction(Function<Session,R> action)
Open aSession
and use it to obtain a value within the bounds of a transaction.default void
SessionFactory. inSession(Consumer<Session> action)
Open aSession
and use it to perform an action.default void
SessionFactory. inTransaction(Consumer<Session> action)
Open aSession
and use it to perform an 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 Session Modifier and Type Method Description boolean
DefaultCustomEntityDirtinessStrategy. canDirtyCheck(Object entity, EntityPersister persister, Session session)
void
DefaultCustomEntityDirtinessStrategy. findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext)
boolean
DefaultCustomEntityDirtinessStrategy. isDirty(Object entity, EntityPersister persister, Session session)
void
DefaultCustomEntityDirtinessStrategy. resetDirty(Object entity, EntityPersister persister, Session session)
-
Uses of Session in org.hibernate.classic
Methods in org.hibernate.classic with parameters of type Session Modifier and Type Method Description default boolean
Lifecycle. onDelete(Session s)
Called when an entity is deleted.default void
Lifecycle. onLoad(Session s, Serializable id)
Deprecated.default void
Lifecycle. onLoad(Session s, Object id)
Called after an entity is loaded.default boolean
Lifecycle. onSave(Session s)
Called when an entity is saved.default boolean
Lifecycle. onUpdate(Session s)
Called when an entity is passed toSession.update()
. -
Uses of Session in org.hibernate.context.internal
Methods in org.hibernate.context.internal that return Session Modifier and Type Method Description static Session
ManagedSessionContext. bind(Session session)
Binds the given session to the current context for its session factory.protected Session
JTASessionContext. buildOrObtainSession()
Strictly provided for subclassing purposes; specifically to allow long-session support.protected Session
ThreadLocalSessionContext. buildOrObtainSession()
Strictly provided for sub-classing purposes; specifically to allow long-session support.Session
JTASessionContext. currentSession()
Session
ManagedSessionContext. currentSession()
Session
ThreadLocalSessionContext. currentSession()
static Session
ManagedSessionContext. unbind(SessionFactory factory)
Unbinds the session (if one) current associated with the context for the given session.static Session
ThreadLocalSessionContext. unbind(SessionFactory factory)
Disassociates a previously bound session from the current thread of execution.protected Session
ThreadLocalSessionContext. wrap(Session session)
Methods in org.hibernate.context.internal that return types with arguments of type Session Modifier and Type Method Description protected static Map<SessionFactory,Session>
ManagedSessionContext. sessionMap()
protected static Map<SessionFactory,Session>
ThreadLocalSessionContext. sessionMap()
Methods in org.hibernate.context.internal with parameters of type Session Modifier and Type Method Description static Session
ManagedSessionContext. bind(Session session)
Binds the given session to the current context for its session factory.static void
ThreadLocalSessionContext. bind(Session session)
Associates the given session with the current thread of execution.protected Session
ThreadLocalSessionContext. wrap(Session session)
-
Uses of Session in org.hibernate.context.spi
Methods in org.hibernate.context.spi that return Session Modifier and Type Method Description Session
CurrentSessionContext. currentSession()
Retrieve the current session according to the scoping defined by this implementation.Methods in org.hibernate.context.spi with parameters of type Session Modifier and Type Method Description protected void
AbstractCurrentSessionContext. validateExistingSession(Session existingSession)
-
Uses of Session in org.hibernate.engine.spi
Subinterfaces of Session in org.hibernate.engine.spi Modifier and Type Interface Description interface
SessionImplementor
Defines the "internal contract" betweenSession
and other parts of Hibernate including implementors ofType
,EntityPersister
, andCollectionPersister
.Classes in org.hibernate.engine.spi that implement Session Modifier and Type Class Description class
SessionDelegatorBaseImpl
A wrapper class that delegates all method invocations to a delegate instance ofSessionImplementor
.class
SessionLazyDelegator
This helper class allows decorating a Session instance, while the instance itself is lazily provided via aSupplier
.Methods in org.hibernate.engine.spi that return Session Modifier and Type Method Description Session
SessionFactoryDelegatingImpl. getCurrentSession()
Session
AbstractDelegatingSessionBuilder. openSession()
Session
AbstractDelegatingSharedSessionBuilder. openSession()
Constructor parameters in org.hibernate.engine.spi with type arguments of type Session Constructor Description SessionLazyDelegator(Supplier<Session> lazySessionLookup)
-
Uses of Session in org.hibernate.envers
Methods in org.hibernate.envers with parameters of type Session Modifier and Type Method Description static AuditReader
AuditReaderFactory. get(Session session)
Create 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 Session Modifier and Type Method Description default void
IdMapper. mapToMapFromId(Session session, Map<String,Object> data, Object obj)
void
MultipleIdMapper. mapToMapFromId(Session session, Map<String,Object> data, Object obj)
void
VirtualEntitySingleIdMapper. mapToMapFromId(Session session, Map<String,Object> data, Object obj)
-
Uses of Session in org.hibernate.envers.internal.entities.mapper.relation.lazy
Classes in org.hibernate.envers.internal.entities.mapper.relation.lazy that implement Session Modifier and Type Class Description class
AbstractDelegateSessionImplementor
class
ToOneDelegateSessionImplementor
-
Uses of Session in org.hibernate.envers.internal.reader
Methods in org.hibernate.envers.internal.reader that return Session Modifier and Type Method Description Session
AuditReaderImpl. getSession()
Session
AuditReaderImplementor. getSession()
Constructors in org.hibernate.envers.internal.reader with parameters of type Session Constructor Description AuditReaderImpl(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 Session Modifier and Type Method Description Query<?>
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)
void
DefaultRevisionInfoGenerator. saveRevisionData(Session session, Object revisionData)
void
RevisionInfoGenerator. 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 Session Modifier and Type Method Description void
EntityChangeNotifier. entityChanged(Session session, Object currentRevisionData, AuditWorkUnit vwu)
NotifiesRevisionInfoGenerator
about changes made in the current revision.Object
AuditProcess. getCurrentRevisionData(Session session, boolean persist)
void
SessionCacheCleaner. 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 Session Modifier and Type Method Description void
AbstractAuditWorkUnit. perform(Session session, Object revisionData)
void
AuditWorkUnit. perform(Session session, Object revisionData)
Perform this work unit in the given session.void
PersistentCollectionChangeWorkUnit. perform(Session session, Object revisionData)
void
AbstractAuditWorkUnit. undo(Session session)
void
AuditWorkUnit. undo(Session session)
-
Uses of Session in org.hibernate.envers.internal.tools.query
Methods in org.hibernate.envers.internal.tools.query with parameters of type Session Modifier and Type Method Description Query
QueryBuilder. toQuery(Session session)
Query
UpdateBuilder. toQuery(Session session)
-
Uses of Session in org.hibernate.envers.strategy
Methods in org.hibernate.envers.strategy with parameters of type Session Modifier and Type Method Description default void
AuditStrategy. perform(Session session, String entityName, EnversService enversService, Object id, Object data, Object revision)
default void
AuditStrategy. 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 Session Modifier and Type Method Description void
DefaultAuditStrategy. perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision)
void
ValidityAuditStrategy. perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision)
void
DefaultAuditStrategy. performCollectionChange(Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision)
void
ValidityAuditStrategy. 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 Session Modifier and Type Method Description void
AuditStrategy. perform(Session session, String entityName, Configuration configuration, Object id, Object data, Object revision)
Perform the persistence of audited data for regular entities.void
AuditStrategy. 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 Modifier and Type Interface Description interface
EventSource
-
Uses of Session in org.hibernate.graph
Methods in org.hibernate.graph with parameters of type Session Modifier and Type Method Description static <T> EntityGraph<T>
EntityGraphs. merge(Session session, Class<T> rootType, Graph<T>... graphs)
-
Uses of Session in org.hibernate.internal
Classes in org.hibernate.internal that implement Session Modifier and Type Class Description class
SessionImpl
Concrete implementation of theSession
API.Methods in org.hibernate.internal that return Session Modifier and Type Method Description Session
SessionFactoryImpl. createEntityManager()
Session
SessionFactoryImpl. createEntityManager(SynchronizationType synchronizationType)
Session
SessionFactoryImpl. createEntityManager(SynchronizationType synchronizationType, Map map)
Session
SessionFactoryImpl. createEntityManager(Map map)
Session
SessionFactoryImpl. getCurrentSession()
-
Uses of Session in org.hibernate.procedure.spi
Methods in org.hibernate.procedure.spi with parameters of type Session Modifier and Type Method Description default ProcedureCall
NamedCallableQueryMemento. makeProcedureCall(Session session)
Convert the memento back into an executable (connected) form. -
Uses of Session in org.hibernate.testing.junit4
Fields in org.hibernate.testing.junit4 declared as Session Modifier and Type Field Description protected Session
BaseCoreFunctionalTestCase. session
Methods in org.hibernate.testing.junit4 that return Session Modifier and Type Method Description protected Session
BaseNonConfigCoreFunctionalTestCase. getSession()
protected Session
BaseCoreFunctionalTestCase. openSession()
protected Session
BaseCoreFunctionalTestCase. openSession(Interceptor interceptor)
protected Session
BaseNonConfigCoreFunctionalTestCase. openSession()
protected Session
BaseNonConfigCoreFunctionalTestCase. openSession(Interceptor interceptor)
-
Uses of Session in org.hibernate.testing.transaction
Methods in org.hibernate.testing.transaction with parameters of type Session Modifier and Type Method Description static void
TransactionUtil. setJdbcTimeout(Session session)
Deprecated.static void
TransactionUtil. setJdbcTimeout(Session session, long millis)
Deprecated.static void
TransactionUtil. withJdbcTimeout(Session session, long millis, Runnable r)
Run the runnable with a session or statement timeoutstatic void
TransactionUtil. withJdbcTimeout(Session session, Runnable r)
Run the runnable with a session or statement timeoutMethod parameters in org.hibernate.testing.transaction with type arguments of type Session Modifier and Type Method Description static void
TransactionUtil. doInHibernate(Supplier<SessionFactory> factorySupplier, String tenant, Consumer<Session> function)
Execute function in a Hibernate transaction without return value and for a given tenantstatic <R> R
TransactionUtil. doInHibernate(Supplier<SessionFactory> factorySupplier, String tenant, Function<Session,R> function)
Execute function in a Hibernate transaction for a given tenant and return a valuestatic void
TransactionUtil. doInHibernate(Supplier<SessionFactory> factorySupplier, Consumer<Session> function)
-
Uses of Session in org.hibernate.tuple
Methods in org.hibernate.tuple with parameters of type Session Modifier and Type Method Description T
ValueGenerator. generateValue(Session session, Object owner)
Deprecated, for removal: This API element is subject to removal in a future version.Generate the value.default T
ValueGenerator. generateValue(Session session, Object owner, Object currentValue)
Deprecated, for removal: This API element is subject to removal in a future version.Generate the value.
-