public class SessionHolder extends ResourceHolderSupport
Note: This is an SPI class, not intended to be used by applications.
HibernateTransactionManager
,
SessionFactoryUtils
Constructor and Description |
---|
SessionHolder(Object key,
Session session) |
SessionHolder(Session session) |
Modifier and Type | Method and Description |
---|---|
void |
addSession(Object key,
Session session) |
void |
addSession(Session session) |
void |
clear()
Clear the transactional state of this resource holder.
|
boolean |
containsSession(Session session) |
boolean |
doesNotHoldNonDefaultSession() |
Session |
getAnySession() |
FlushMode |
getPreviousFlushMode() |
Session |
getSession() |
Session |
getSession(Object key) |
Transaction |
getTransaction() |
Session |
getValidatedSession() |
Session |
getValidatedSession(Object key) |
boolean |
isEmpty() |
Session |
removeSession(Object key) |
void |
setPreviousFlushMode(FlushMode previousFlushMode) |
void |
setTransaction(Transaction transaction) |
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
public SessionHolder(Session session)
public Session getSession()
public Session getValidatedSession()
public Session getAnySession()
public void addSession(Session session)
public boolean containsSession(Session session)
public boolean isEmpty()
public boolean doesNotHoldNonDefaultSession()
public void setTransaction(Transaction transaction)
public Transaction getTransaction()
public void setPreviousFlushMode(FlushMode previousFlushMode)
public FlushMode getPreviousFlushMode()
public void clear()
ResourceHolderSupport
clear
in class ResourceHolderSupport