StatelessSession API.
Exposes two interfaces:
StatelessSession to the application, and
org.hibernate.engine.spi.SharedSessionContractImplementor (an SPI interface) to other subsystems.
This class is not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final LoadQueryInfluencers | |
| private static final CoreMessageLogger | |
| private final PersistenceContext |
| Access | Constructor and Description |
|---|---|
| public | StatelessSessionImpl(SessionFactoryImpl factory, SessionCreationOptions options)
Deprecated
as a consequence of
SessionFactoryImpl being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | afterOperation(boolean
true if the operation a successImplements org. |
| public void | afterScrollOperation()
Implements org. org.,
providing an opportunity for a stateless session to clear its
temporary persistence context.
|
| public void | afterTransactionBegin()
Implements org. |
| public void | afterTransactionCompletion(boolean
Was the transaction successful? successful, boolean Is this a delayed after transaction completion call (aka after a timeout)? delayed)Overrides org. Implements org. |
| public StatelessSession | asStatelessSession()
Overrides default org. StatelessSession, if possible.
|
| public boolean | autoFlushIfRequired(Set<String>
the tables named in the query. querySpaces)Implements org. |
| public void | beforeTransactionCompletion()
Overrides org. Implements org. |
| public String | bestGuessEntityName(Object object)
Implements org. |
| private Object | |
| public void | delete(Object
a detached entity instance entity)Implements org. |
| public void | delete(String
The entityName for the entity to be deleted entityName, Object a detached entity instance entity)Implements org. |
| public void | fetch(Object
a lazy-loaded association association)Implements org. |
| public void | flush()
Implements org. |
| public void | |
| public <T> T | get(Class<T>
The class of the entity to retrieve entityClass, Object The id of the entity to retrieve id)Implements org. |
| public <T> T | get(Class<T>
The class of the entity to retrieve entityClass, Object The id of the entity to retrieve id, LockMode The lock mode to apply to the entity lockMode)Implements org. |
| public Object | get(String
The name of the entity to retrieve entityName, Object The id of the entity to retrieve id)Implements org. |
| public Object | get(String
The name of the entity to retrieve entityName, Object The id of the entity to retrieve id, LockMode The lock mode to apply to the entity lockMode)Implements org. |
| public <T> T | get(EntityGraph<T>
The graph, GraphSemantic EntityGrapha graphSemantic, Object GraphSemantic specifying
how the graph should be interpretedThe id of the entity to retrieve id)Implements org. EntityGraph.
|
| public <T> T | get(EntityGraph<T>
The graph, GraphSemantic EntityGrapha graphSemantic, Object GraphSemantic specifying
how the graph should be interpretedThe id of the entity to retrieve id, LockMode The lock mode to apply to the entity lockMode)Implements org. EntityGraph, and obtaining the specified
lock mode.
|
| public CacheMode | getCacheMode()
Overrides org. Implements org. CacheMode for this session.
|
| public Object | getContextEntityIdentifier(Object object)
Implements org. |
| private EntityPersister | |
| public EntityPersister | |
| public Object | getEntityUsingInterceptor(EntityKey key)
Implements org. EntityKey,
calling the Interceptor if necessary.
|
| private JtaPlatform | |
| public LoadQueryInfluencers | getLoadQueryInfluencers()
Implements org. LoadQueryInfluencers associated with this session.
|
| private LockMode | |
| public PersistenceContext | getPersistenceContext()
Implements org. |
| public PersistenceContext | getPersistenceContextInternal()
Implements org. getPersistenceContext(), with two differences:
|
| public String | guessEntityName(Object entity)
Implements org. org..
|
| public Object | immediateLoad(String entityName, Object id)
Implements org. |
| public void | initializeCollection(PersistentCollection<?> collection, boolean writing)
Implements org. |
| public Object | insert(Object
a new transient instance entity)Implements org. |
| public Object | insert(String
The entityName for the entity to be inserted entityName, Object a new transient instance entity)Implements org. |
| public Object | instantiate(String entityName, Object id)
Implements org. |
| public Object | instantiate(EntityPersister persister, Object id)
Implements org. EntityPersister,
initializing the new instance with the given identifier.
|
| public Object | internalLoad(String entityName, Object id, boolean eager, boolean nullable)
Implements org. |
| public boolean | isAutoCloseSessionEnabled()
Implements org. |
| public boolean | isDefaultReadOnly()
Implements org. |
| private boolean | |
| public boolean | isStatelessSession()
Overrides default org. StatelessSession?
|
| public boolean | isTransactionInProgress()
Overrides org. Implements org. |
| protected Object | load(String entityName, Object identifier)
Implements abstract org. |
| private void | |
| private void | |
| public void | refresh(Object
The entity to be refreshed. entity)Implements org. |
| public void | refresh(String
The entityName for the entity to be refreshed. entityName, Object The entity to be refreshed. entity)Implements org. |
| public void | refresh(Object
The entity to be refreshed. entity, LockMode The LockMode to be applied. lockMode)Implements org. |
| public void | refresh(String
The entityName for the entity to be refreshed. entityName, Object The entity to be refreshed. entity, LockMode The LockMode to be applied. lockMode)Implements org. |
| public void | setAutoClear(boolean enabled)
Implements org. |
| public void | setCacheMode(CacheMode cm)
Overrides org. Implements org. CacheMode for this session.
|
| public void | |
| public void | setHibernateFlushMode(FlushMode
the new flush mode flushMode)Overrides org. Implements org. FlushMode for this session.
|
| public boolean | shouldAutoClose()
Implements org. |
| public boolean | shouldAutoJoinTransaction()
Overrides org. Implements org. |
| public void | update(Object
a detached entity instance entity)Implements org. |
| public void | update(String
The entityName for the entity to be updated entityName, Object a detached entity instance entity)Implements org. |
| public void | upsert(Object
a detached entity instance entity)Implements org. merge into statement to perform an upsert.
|
| public void | upsert(String
The entityName for the entity to be merged entityName, Object a detached entity instance entity)Implements org. merge into statement to perform an upsert.
|