public class ReactiveSessionImpl extends SessionImpl implements ReactiveSession
ReactiveSession
implemented by extension of the SessionImpl
in Hibernate core. Extension was preferred to delegation because there are places where Hibernate core compares the identity of session instances.Constructor and Description |
---|
ReactiveSessionImpl(SessionFactoryImpl delegate, SessionCreationOptions options, ReactiveConnection connection) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, contains, detach, disableFetchProfile, disableFilter, enableFetchProfile, enableFilter, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityName, getHibernateFlushMode, getIdentifier, getPersistenceContext, getReference, isDefaultReadOnly, isDirty, isFetchProfileEnabled, isOpen, isReadOnly, setCacheMode, setDefaultReadOnly, setHibernateFlushMode, setReadOnly
getFactory
public ReactiveSessionImpl(SessionFactoryImpl delegate, SessionCreationOptions options, ReactiveConnection connection)
public SessionImplementor getSharedContract()
getSharedContract
in interface ReactiveQueryExecutor
getSharedContract
in interface ReactiveSession
public Dialect getDialect()
getDialect
in interface ReactiveQueryExecutor
protected StatefulPersistenceContext createPersistenceContext()
public ReactiveActionQueue getReactiveActionQueue()
getReactiveActionQueue
in interface ReactiveSession
public Object immediateLoad(String entityName, Serializable id) throws HibernateException
HibernateException
public CompletionStage<Object> reactiveImmediateLoad(String entityName, Serializable id) throws HibernateException
reactiveImmediateLoad
in interface ReactiveSession
HibernateException
public <T> CompletionStage<T> reactiveFetch(T association, boolean unproxy)
reactiveFetch
in interface ReactiveSession
public <E,T> CompletionStage<T> reactiveFetch(E entity, <any> field)
reactiveFetch
in interface ReactiveSession
public <T> ReactiveNativeQueryImpl<T> createReactiveNativeQuery(String sqlString)
createReactiveNativeQuery
in interface ReactiveSession
public <T> ReactiveNativeQuery<T> createReactiveNativeQuery(String sqlString, String resultSetMapping)
createReactiveNativeQuery
in interface ReactiveSession
public <T> ResultSetMapping<T> getResultSetMapping(Class<T> resultType, String mappingName)
getResultSetMapping
in interface ReactiveQueryExecutor
public <T> ReactiveQuery<T> createReactiveNativeQuery(String sqlString, Class<T> resultClass)
createReactiveNativeQuery
in interface ReactiveSession
public <R> ReactiveQueryImpl<R> createReactiveQuery(String queryString)
createReactiveQuery
in interface ReactiveSession
public <R> ReactiveQuery<R> createReactiveQuery(String queryString, Class<R> resultType)
createReactiveQuery
in interface ReactiveSession
@Deprecated public void initializeCollection(PersistentCollection collection, boolean writing)
reactiveInitializeCollection(PersistentCollection, boolean)
insteadpublic CompletionStage<Void> reactiveInitializeCollection(PersistentCollection collection, boolean writing)
reactiveInitializeCollection
in interface ReactiveSession
protected ReactiveHQLQueryPlan getQueryPlan(String query, boolean shallow) throws HibernateException
HibernateException
protected CompletionStage<Void> reactiveAutoFlushIfRequired(Set<?> querySpaces) throws HibernateException
HibernateException
public <T> CompletionStage<List<T>> reactiveList(String query, QueryParameters parameters) throws HibernateException
reactiveList
in interface ReactiveQueryExecutor
HibernateException
public <T> CompletionStage<List<T>> reactiveList(NativeSQLQuerySpecification spec, QueryParameters parameters)
reactiveList
in interface ReactiveQueryExecutor
public <R> ReactiveQuery<R> createReactiveNamedQuery(String name)
createReactiveNamedQuery
in interface ReactiveSession
public <R> ReactiveQuery<R> createReactiveNamedQuery(String name, Class<R> resultClass)
createReactiveNamedQuery
in interface ReactiveSession
public <T> ReactiveQuery<T> createReactiveCriteriaQuery(String jpaqlString, Class<T> resultClass, CriteriaQueryOptions queryOptions)
createReactiveCriteriaQuery
in interface ReactiveSession
public CompletionStage<Integer> executeReactiveUpdate(String query, QueryParameters parameters)
executeReactiveUpdate
in interface ReactiveQueryExecutor
public CompletionStage<Integer> executeReactiveUpdate(NativeSQLQuerySpecification specification, QueryParameters parameters)
executeReactiveUpdate
in interface ReactiveQueryExecutor
public void addBulkCleanupAction(BulkOperationCleanupAction action)
addBulkCleanupAction
in interface ReactiveQueryExecutor
public CompletionStage<Void> reactivePersist(Object entity)
reactivePersist
in interface ReactiveSession
public CompletionStage<Void> reactivePersist(Object object, IdentitySet copiedAlready)
reactivePersist
in interface ReactiveSession
public CompletionStage<Void> reactivePersistOnFlush(Object entity, IdentitySet copiedAlready)
reactivePersistOnFlush
in interface ReactiveSession
public CompletionStage<Void> reactiveRemove(Object entity)
reactiveRemove
in interface ReactiveSession
public CompletionStage<Void> reactiveRemove(Object object, boolean isCascadeDeleteEnabled, IdentitySet transientEntities) throws HibernateException
reactiveRemove
in interface ReactiveSession
HibernateException
public <T> CompletionStage<T> reactiveMerge(T object) throws HibernateException
reactiveMerge
in interface ReactiveSession
HibernateException
public CompletionStage<Void> reactiveMerge(Object object, MergeContext copiedAlready) throws HibernateException
reactiveMerge
in interface ReactiveSession
HibernateException
public CompletionStage<Void> reactiveFlush()
reactiveFlush
in interface ReactiveSession
public CompletionStage<Void> reactiveAutoflush()
reactiveAutoflush
in interface ReactiveSession
public ExceptionConverter getExceptionConverter()
public CompletionStage<Void> reactiveRefresh(Object entity, LockOptions lockOptions)
reactiveRefresh
in interface ReactiveSession
public CompletionStage<Void> reactiveRefresh(Object object, IdentitySet refreshedAlready)
reactiveRefresh
in interface ReactiveSession
CompletionStage<Void> fireRefresh(RefreshEvent event)
public CompletionStage<Void> reactiveLock(Object object, LockOptions lockOptions)
reactiveLock
in interface ReactiveSession
public <T> CompletionStage<T> reactiveGet(Class<T> entityClass, Serializable id)
reactiveGet
in interface ReactiveSession
public <T> CompletionStage<T> reactiveFind(Class<T> entityClass, Object id, LockOptions lockOptions, <any> fetchGraph)
reactiveFind
in interface ReactiveSession
public <T> CompletionStage<List<T>> reactiveFind(Class<T> entityClass, Object... ids)
reactiveFind
in interface ReactiveSession
protected void delayedAfterCompletion()
public void afterOperation(boolean success)
public void checkTransactionNeededForUpdateOperation(String exceptionMessage)
public <T> T unwrap(Class<T> clazz)
public ReactiveConnection getReactiveConnection()
ReactiveConnectionSupplier
ReactiveConnection
that is associated with the current session.getReactiveConnection
in interface ReactiveConnectionSupplier
public void close() throws HibernateException
close
in interface ReactiveSession
HibernateException
public <T> <any> createEntityGraph(Class<T> entity, String name)
createEntityGraph
in interface ReactiveSession
public <T> <any> createEntityGraph(Class<T> entity)
createEntityGraph
in interface ReactiveSession
public <T> <any> getEntityGraph(Class<T> entity, String name)
getEntityGraph
in interface ReactiveSession
public Integer getBatchSize()
getBatchSize
in interface ReactiveSession
public void setBatchSize(Integer batchSize)
setBatchSize
in interface ReactiveSession
public <T> Class<? extends T> getEntityClass(T entity)
getEntityClass
in interface ReactiveSession
public Serializable getEntityId(Object entity)
getEntityId
in interface ReactiveSession