public interface SessionImplementor extends Session, SharedSessionContractImplementor, HibernateEntityManagerImplementor
Session
and other parts of Hibernate such as
Type
, EntityPersister
and CollectionPersister
implementations.
A Session, through this interface and SharedSessionContractImplementor, implements:JdbcSessionOwner
to drive the behavior of the
JdbcSessionContext
delegate
TransactionCoordinatorBuilder.Options
to drive the creation of the TransactionCoordinator
delegate
LobCreationContext
to act as the context for JDBC LOB instance creation
WrapperOptions
to fulfill the behavior needed while
binding/extracting values to/from JDBC as part of the Type contracts
EventSource
which extends this interface providing
bridge to the event generation features of org.hibernate.event
Session.LockRequest
LobCreationContext.Callback<T>
HibernateEntityManagerImplementor.QueryOptions
Modifier and Type | Method and Description |
---|---|
QueryImplementor |
createNamedQuery(String name)
The JPA-defined named query creation method.
|
<T> QueryImplementor<T> |
createNamedQuery(String name,
Class<T> resultType)
The JPA-defined named, typed query creation method.
|
NativeQueryImplementor |
createNativeQuery(String sqlString)
Create a NativeQuery instance for the given native (SQL) query
|
NativeQueryImplementor |
createNativeQuery(String sqlString,
Class resultClass)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
NativeQueryImplementor |
createNativeQuery(String sqlString,
String resultSetMapping)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
QueryImplementor |
createQuery(CriteriaDelete deleteQuery)
Create an instance of
Query for executing a criteria
delete query. |
<T> QueryImplementor<T> |
createQuery(CriteriaQuery<T> criteriaQuery)
Create an instance of
TypedQuery for executing a
criteria query. |
QueryImplementor |
createQuery(CriteriaUpdate updateQuery)
Create an instance of
Query for executing a criteria
update query. |
QueryImplementor |
createQuery(String queryString)
Create a
Query instance for the given HQL/JPQL query string. |
<T> QueryImplementor<T> |
createQuery(String queryString,
Class<T> resultType)
Create a typed
Query instance for the given HQL/JPQL query string. |
<T> QueryImplementor<T> |
createQuery(String jpaqlString,
Class<T> resultClass,
Selection selection,
HibernateEntityManagerImplementor.QueryOptions queryOptions)
Deprecated.
(since 5.2) - see deprecation note on super
|
NativeQueryImplementor |
createSQLQuery(String sqlString)
Create a
NativeQuery instance for the given SQL query string. |
void |
delete(String entityName,
Object child,
boolean isCascadeDeleteEnabled,
Set transientEntities)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
forceFlush(EntityEntry e) |
ActionQueue |
getActionQueue() |
NativeQueryImplementor |
getNamedNativeQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
QueryImplementor |
getNamedQuery(String queryName)
Create a
Query instance for the named query. |
NativeQueryImplementor |
getNamedSQLQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
SessionFactoryImplementor |
getSessionFactory()
Get the session factory which created this session.
|
Object |
instantiate(EntityPersister persister,
Serializable id) |
boolean |
isFlushBeforeCompletionEnabled()
Deprecated.
(since 5.2) use
Session.getHibernateFlushMode() instead. |
void |
merge(String entityName,
Object object,
Map copiedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
persist(String entityName,
Object object,
Map createdAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
persistOnFlush(String entityName,
Object object,
Map copiedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
refresh(String entityName,
Object object,
Map refreshedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
removeOrphanBeforeUpdates(String entityName,
Object child)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
addEventListeners, buildLockRequest, byId, byId, byMultipleIds, byMultipleIds, byNaturalId, byNaturalId, bySimpleNaturalId, bySimpleNaturalId, cancelQuery, clear, contains, createFilter, delete, delete, disableFetchProfile, disableFilter, disconnect, doReturningWork, doWork, enableFetchProfile, enableFilter, evict, flush, get, get, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityName, getFlushMode, getHibernateFlushMode, getIdentifier, getLobHelper, getStatistics, getTypeHelper, isDefaultReadOnly, isDirty, isFetchProfileEnabled, isReadOnly, load, load, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, refresh, refresh, refresh, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, sessionWithOptions, setCacheMode, setDefaultReadOnly, setFlushMode, setHibernateFlushMode, setReadOnly, update, update
accessTransaction, afterScrollOperation, bestGuessEntityName, checkOpen, checkOpen, checkTransactionNeededForUpdateOperation, connection, executeNativeUpdate, executeUpdate, flush, generateEntityKey, getCacheMode, getCacheTransactionSynchronization, getConfiguredJdbcBatchSize, getContextEntityIdentifier, getDontFlushFromFind, getEntityPersister, getEntityUsingInterceptor, getEventListenerManager, getExceptionConverter, getFactory, getFlushMode, getHibernateFlushMode, getInterceptor, getJdbcCoordinator, getJdbcServices, getLoadQueryInfluencers, getPersistenceContext, getSessionIdentifier, getTenantIdentifier, getTimestamp, getTransactionStartTimestamp, guessEntityName, immediateLoad, initializeCollection, instantiate, internalLoad, isAutoCloseSessionEnabled, isClosed, isEventSource, isOpenOrWaitingForAutoClose, isQueryParametersValidationEnabled, isTransactionInProgress, iterate, iterateFilter, list, list, list, listCustomQuery, listFilter, markForRollbackOnly, scroll, scroll, scroll, scrollCustomQuery, setAutoClear, setCacheMode, setFlushMode, setHibernateFlushMode, shouldAutoClose
beginTransaction, close, createCriteria, createCriteria, createCriteria, createCriteria, createStoredProcedureCall, createStoredProcedureCall, createStoredProcedureCall, getJdbcBatchSize, getNamedProcedureCall, getTransaction, isConnected, isOpen, setJdbcBatchSize
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, flushBeforeTransactionCompletion, getJdbcBatchSize, getJdbcConnectionAccess, getJdbcSessionContext, getTransactionCoordinator, startTransactionBoundary
shouldAutoJoinTransaction
execute
getJdbcTimeZone, getLobCreator, remapSqlTypeDescriptor, useStreamForLobBinding
buildLockOptions, checkOpen, getLockRequest, getSession, isTransactionInProgress, markForRollbackOnly
close, contains, createEntityGraph, createEntityGraph, createNamedStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, getCriteriaBuilder, getDelegate, getEntityGraph, getEntityGraphs, getEntityManagerFactory, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, isOpen, joinTransaction, lock, lock, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrap
getFactory
SessionFactoryImplementor getSessionFactory()
Session
getSessionFactory
in interface Session
SessionFactory
@Deprecated boolean isFlushBeforeCompletionEnabled()
Session.getHibernateFlushMode()
instead.ActionQueue getActionQueue()
Object instantiate(EntityPersister persister, Serializable id) throws HibernateException
HibernateException
void forceFlush(EntityEntry e) throws HibernateException
HibernateException
QueryImplementor createQuery(String queryString)
QueryProducer
Query
instance for the given HQL/JPQL query string.createQuery
in interface EntityManager
createQuery
in interface QueryProducer
createQuery
in interface QueryProducerImplementor
createQuery
in interface SharedSessionContract
queryString
- The HQL/JPQL queryEntityManager.createQuery(String)
<T> QueryImplementor<T> createQuery(String queryString, Class<T> resultType)
QueryProducer
Query
instance for the given HQL/JPQL query string.createQuery
in interface EntityManager
createQuery
in interface QueryProducer
createQuery
in interface QueryProducerImplementor
createQuery
in interface Session
queryString
- The HQL/JPQL queryresultType
- the type of the query resultEntityManager.createQuery(String,Class)
<T> QueryImplementor<T> createNamedQuery(String name, Class<T> resultType)
QueryProducer
createNamedQuery
in interface EntityManager
createNamedQuery
in interface QueryProducer
createNamedQuery
in interface QueryProducerImplementor
createNamedQuery
in interface Session
name
- the name of a query defined in metadataresultType
- the type of the query resultEntityManager.createNamedQuery(String,Class)
QueryImplementor createNamedQuery(String name)
QueryProducer
createNamedQuery
in interface EntityManager
createNamedQuery
in interface QueryProducer
createNamedQuery
in interface QueryProducerImplementor
name
- the name of a pre-defined, named queryEntityManager.createNamedQuery(String)
NativeQueryImplementor createNativeQuery(String sqlString)
QueryProducer
createNativeQuery
in interface EntityManager
createNativeQuery
in interface QueryProducer
createNativeQuery
in interface QueryProducerImplementor
sqlString
- a native SQL query stringEntityManager.createNativeQuery(String)
NativeQueryImplementor createNativeQuery(String sqlString, Class resultClass)
QueryProducer
createNativeQuery
in interface EntityManager
createNativeQuery
in interface QueryProducer
createNativeQuery
in interface QueryProducerImplementor
sqlString
- Native (SQL) query stringresultClass
- The Java type to map results toEntityManager.createNativeQuery(String,Class)
NativeQueryImplementor createNativeQuery(String sqlString, String resultSetMapping)
QueryProducer
createNativeQuery
in interface EntityManager
createNativeQuery
in interface QueryProducer
createNativeQuery
in interface QueryProducerImplementor
sqlString
- Native (SQL) query stringresultSetMapping
- The explicit (named) result mappingEntityManager.createNativeQuery(String,Class)
,
SqlResultSetMapping
NativeQueryImplementor createSQLQuery(String sqlString)
QueryProducer
NativeQuery
instance for the given SQL query string.createSQLQuery
in interface QueryProducer
createSQLQuery
in interface QueryProducerImplementor
createSQLQuery
in interface Session
sqlString
- The SQL queryNativeQueryImplementor getNamedNativeQuery(String name)
QueryProducer
getNamedNativeQuery
in interface QueryProducer
getNamedNativeQuery
in interface QueryProducerImplementor
name
- The name of the pre-defined queryQueryImplementor getNamedQuery(String queryName)
QueryProducer
Query
instance for the named query.getNamedQuery
in interface QueryProducer
getNamedQuery
in interface QueryProducerImplementor
getNamedQuery
in interface SharedSessionContract
queryName
- the name of a pre-defined, named queryNativeQueryImplementor getNamedSQLQuery(String name)
QueryProducer
getNamedSQLQuery
in interface QueryProducer
getNamedSQLQuery
in interface QueryProducerImplementor
name
- The name of the pre-defined query<T> QueryImplementor<T> createQuery(CriteriaQuery<T> criteriaQuery)
EntityManager
TypedQuery
for executing a
criteria query.createQuery
in interface EntityManager
createQuery
in interface Session
criteriaQuery
- a criteria query objectQueryImplementor createQuery(CriteriaUpdate updateQuery)
EntityManager
Query
for executing a criteria
update query.createQuery
in interface EntityManager
createQuery
in interface Session
updateQuery
- a criteria update query objectQueryImplementor createQuery(CriteriaDelete deleteQuery)
EntityManager
Query
for executing a criteria
delete query.createQuery
in interface EntityManager
createQuery
in interface Session
deleteQuery
- a criteria delete query object@Deprecated <T> QueryImplementor<T> createQuery(String jpaqlString, Class<T> resultClass, Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)
createQuery
in interface HibernateEntityManagerImplementor
T
- The query typejpaqlString
- The criteria query rendered as a JPA QL stringresultClass
- The result type (the type expected in the result list)selection
- The selection(s)queryOptions
- The options to use to build the query.@Deprecated void merge(String entityName, Object object, Map copiedAlready) throws HibernateException
HibernateException
@Deprecated void persist(String entityName, Object object, Map createdAlready) throws HibernateException
HibernateException
@Deprecated void persistOnFlush(String entityName, Object object, Map copiedAlready)
@Deprecated void refresh(String entityName, Object object, Map refreshedAlready) throws HibernateException
HibernateException
@Deprecated void delete(String entityName, Object child, boolean isCascadeDeleteEnabled, Set transientEntities)
@Deprecated void removeOrphanBeforeUpdates(String entityName, Object child)
Copyright © 2021 JBoss by Red Hat. All rights reserved.