Top Description Fields Constructors Methods
org.hibernate.engine.spi

public Class SessionDelegatorBaseImpl

extends Object
implements SessionImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.spi.SessionImplementor, org.hibernate.jpa.spi.HibernateEntityManagerImplementor, org.hibernate.jpa.spi.HibernateEntityManagerFactoryAware, org.hibernate.ejb.HibernateEntityManager, org.hibernate.jpa.HibernateEntityManager, org.hibernate.query.QueryProducer, javax.persistence.EntityManager, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.query.spi.QueryProducerImplementor, org.hibernate.type.descriptor.WrapperOptions, org.hibernate.engine.jdbc.LobCreationContext, org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options, org.hibernate.resource.jdbc.spi.JdbcSessionOwner, org.hibernate.SharedSessionContract, java.io.Serializable, org.hibernate.Session, java.io.Closeable, java.lang.AutoCloseable
Annotations
@SuppressWarnings:deprecation
Imports
java.io.Serializable, java.sql.Connection, java.util.Iterator, .List, .Map, .Set, .TimeZone, .UUID, javax.persistence.EntityGraph, .EntityManagerFactory, .FlushModeType, .LockModeType, .StoredProcedureQuery, javax.persistence.criteria.CriteriaBuilder, .CriteriaDelete, .CriteriaQuery, .CriteriaUpdate, .Selection, javax.persistence.metamodel.Metamodel, org.hibernate.CacheMode, .Criteria, .Filter, .FlushMode, .HibernateException, .IdentifierLoadAccess, .Interceptor, .LobHelper, .LockMode, .LockOptions, .MultiIdentifierLoadAccess, .NaturalIdLoadAccess, .Query, .ReplicationMode, .ScrollMode, .Session, .SessionEventListener, .SharedSessionBuilder, .SimpleNaturalIdLoadAccess, .Transaction, .TypeHelper, .UnknownProfileException, org.hibernate.cache.spi.CacheTransactionSynchronization, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.jdbc.LobCreator, org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess, org.hibernate.engine.jdbc.spi.JdbcCoordinator, .JdbcServices, org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.jdbc.ReturningWork, .Work, org.hibernate.loader.custom.CustomQuery, org.hibernate.persister.entity.EntityPersister, org.hibernate.procedure.ProcedureCall, org.hibernate.query.spi.NativeQueryImplementor, .QueryImplementor, .ScrollableResultsImplementor, org.hibernate.resource.jdbc.spi.JdbcSessionContext, org.hibernate.resource.transaction.spi.TransactionCoordinator, org.hibernate.stat.SessionStatistics, org.hibernate.type.descriptor.sql.SqlTypeDescriptor

Deprecated

as a consequence of SessionImplementor being deprecated. See corresponding docs for further information.

This class is meant to be extended. Wraps and delegates all methods to a SessionImplementor and a Session. This is useful for custom implementations of this API so that only some methods need to be overridden (Used by Hibernate Search).
Author
Sanne Grinovero (C) 2012 Red Hat Inc.

Field Summary

Modifier and TypeField and Description
protected final SessionImplementor
delegate

Deprecated as a consequence of SessionImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
SessionDelegatorBaseImpl(SessionImplementor delegate, Session session)

Deprecated (since 5.3) SessionDelegatorBaseImpl should take just one argument, the SessionImplementor.
public
SessionDelegatorBaseImpl(SessionImplementor delegate)

Deprecated as a consequence of SessionImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Transaction
accessTransaction()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.accessTransaction.

Provides access to the underlying transaction or creates a new transaction if one does not already exist or is active.
public void
addEventListeners(SessionEventListener...
The listener(s) to add
listeners
)

Implements org.hibernate.Session.addEventListeners.

Add one or more listeners to the Session
public void
public void
afterTransactionBegin()

Implements org.hibernate.resource.jdbc.spi.JdbcSessionOwner.afterTransactionBegin.

A after-begin callback from the coordinator to its owner.
public void
afterTransactionCompletion(boolean
Was the transaction successful?
successful
,
boolean
Is this a delayed after transaction completion call (aka after a timeout)?
delayed
)

Implements org.hibernate.resource.jdbc.spi.JdbcSessionOwner.afterTransactionCompletion.

An after-completion callback to the owner.
public void
public Transaction
beginTransaction()

Implements org.hibernate.SharedSessionContract.beginTransaction.

Begin a unit of work and return the associated Transaction object.
public String
bestGuessEntityName(Object object)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.bestGuessEntityName.

The best guess entity name for an entity not in an association
public LockOptions
buildLockOptions(LockModeType
the requested LockModeType
lockModeType
,
Map<String, Object>
the lock properties
properties
)

Overrides default org.hibernate.jpa.spi.HibernateEntityManagerImplementor.buildLockOptions.

Given a JPA javax.persistence.LockModeType and properties, build a Hibernate org.hibernate.LockOptions
public Session.LockRequest
buildLockRequest(LockOptions
contains the lock level
lockOptions
)

Implements org.hibernate.Session.buildLockRequest.

Build a LockRequest that specifies the LockMode, pessimistic lock timeout and lock scope.
public IdentifierLoadAccess<T>
byId(String
The entity name of the entity type to be retrieved
entityName
)

Implements org.hibernate.Session.byId.

Create an IdentifierLoadAccess instance to retrieve the specified entity type by primary key.
public <T> IdentifierLoadAccess<T>
byId(Class<T>
The entity type to be retrieved
entityClass
)

Implements org.hibernate.Session.byId.

Create an IdentifierLoadAccess instance to retrieve the specified entity by primary key.
public <T> MultiIdentifierLoadAccess<T>
byMultipleIds(Class<T>
The entity type to be retrieved
entityClass
)

Implements org.hibernate.Session.byMultipleIds.

Create a MultiIdentifierLoadAccess instance to retrieve multiple entities at once as specified by primary key values.
public MultiIdentifierLoadAccess<T>
byMultipleIds(String
The entity name of the entity type to be retrieved
entityName
)

Implements org.hibernate.Session.byMultipleIds.

Create a MultiIdentifierLoadAccess instance to retrieve multiple entities at once as specified by primary key values.
public NaturalIdLoadAccess<T>
byNaturalId(String
The entity name of the entity type to be retrieved
entityName
)

Implements org.hibernate.Session.byNaturalId.

Create a NaturalIdLoadAccess instance to retrieve the specified entity by its natural id.
public <T> NaturalIdLoadAccess<T>
byNaturalId(Class<T>
The entity type to be retrieved
entityClass
)

Implements org.hibernate.Session.byNaturalId.

Create a NaturalIdLoadAccess instance to retrieve the specified entity by its natural id.
public SimpleNaturalIdLoadAccess<T>
bySimpleNaturalId(String
The entity name of the entity type to be retrieved
entityName
)

Implements org.hibernate.Session.bySimpleNaturalId.

Create a SimpleNaturalIdLoadAccess instance to retrieve the specified entity by its natural id.
public <T> SimpleNaturalIdLoadAccess<T>
bySimpleNaturalId(Class<T>
The entity type to be retrieved
entityClass
)

Implements org.hibernate.Session.bySimpleNaturalId.

Create a SimpleNaturalIdLoadAccess instance to retrieve the specified entity by its simple (single attribute) natural id.
public void
cancelQuery()

Implements org.hibernate.Session.cancelQuery.

Cancel the execution of the current query.
public void
checkOpen(boolean
If the EM is closed, should the transaction (if one) be marked for rollback?
markForRollbackIfClosed
)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.checkOpen, org.hibernate.jpa.spi.HibernateEntityManagerImplementor.checkOpen.

Performs a check whether the Session is open, and if not:
  • if markForRollbackIfClosed is true, marks current transaction (if one) for rollback only
  • throws an IllegalStateException (JPA defines the exception type)
public void
checkOpen()

Overrides default org.hibernate.engine.spi.SharedSessionContractImplementor.checkOpen.

Performs a check whether the Session is open, and if not:
  • marks current transaction (if one) for rollback only
  • throws an IllegalStateException (JPA defines the exception type)
public void
checkTransactionNeededForUpdateOperation(String
the message to use for the TransactionRequiredException
exceptionMessage
)

Overrides default org.hibernate.engine.spi.SharedSessionContractImplementor.checkTransactionNeededForUpdateOperation.

Check if an active Transaction is necessary for the update operation to be executed.
public void
clear()

Implements org.hibernate.Session.clear, javax.persistence.EntityManager.clear.

Completely clear the session.
public void
public Connection
public boolean
contains(String
The entity name
entityName
,
Object
an instance of a persistent class
object
)

Implements org.hibernate.Session.contains.

Check if this entity is associated with this Session.
public boolean
contains(Object
entity instance
object
)

Implements javax.persistence.EntityManager.contains.

Check if the instance is a managed entity instance belonging to the current persistence context.
public Criteria
createCriteria(Class<T>
The class, which is an entity, or has entity subclasses/implementors
persistentClass
)

Implements org.hibernate.SharedSessionContract.createCriteria.

Create Criteria instance for the given class (entity or subclasses/implementors).
public Criteria
createCriteria(Class<T>
The class, which is an entity, or has entity subclasses/implementors
persistentClass
,
String
The alias to use
alias
)

Implements org.hibernate.SharedSessionContract.createCriteria.

Create Criteria instance for the given class (entity or subclasses/implementors), using a specific alias.
public Criteria
createCriteria(String
The entity name
entityName
)

Implements org.hibernate.SharedSessionContract.createCriteria.

Create Criteria instance for the given entity name.
public Criteria
createCriteria(String
The entity name
entityName
,
String
The alias to use
alias
)

Implements org.hibernate.SharedSessionContract.createCriteria.

Create Criteria instance for the given entity name, using a specific alias.
public <T> RootGraphImplementor<T>
createEntityGraph(Class<T>
class of entity graph
rootType
)

Implements org.hibernate.engine.spi.SessionImplementor.createEntityGraph.

Return a mutable EntityGraph that can be used to dynamically create an EntityGraph.
public RootGraphImplementor<?>
createEntityGraph(String
name of an entity graph
graphName
)

Implements org.hibernate.engine.spi.SessionImplementor.createEntityGraph.

Return a mutable copy of the named EntityGraph.
public Query<R>
createFilter(Object
a persistent collection
collection
,
String
a Hibernate query fragment.
queryString
)

Implements org.hibernate.Session.createFilter.

Deprecated as a consequence of Query being deprecated.
Create a Query instance for the given collection and filter string.
public QueryImplementor<R>
createNamedQuery(String
the name of a query defined in metadata
name
)

Implements org.hibernate.engine.spi.SessionImplementor.createNamedQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of Query for executing a named query (in the Java Persistence query language or in native SQL).
public <T> QueryImplementor<T>
createNamedQuery(String
the name of a query defined in metadata
name
,
Class<T>
the type of the query result
resultClass
)

Implements org.hibernate.engine.spi.SessionImplementor.createNamedQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of TypedQuery for executing a Java Persistence query language named query.
public StoredProcedureQuery
createNamedStoredProcedureQuery(String
name assigned to the stored procedure query in metadata
name
)

Implements javax.persistence.EntityManager.createNamedStoredProcedureQuery.

Create an instance of StoredProcedureQuery for executing a stored procedure in the database.
public NativeQueryImplementor<T>
createNativeQuery(String
a native SQL query string
sqlString
)

Implements org.hibernate.engine.spi.SessionImplementor.createNativeQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Create an instance of Query for executing a native SQL statement, e.g., for update or delete.
public NativeQueryImplementor<T>
createNativeQuery(String
a native SQL query string
sqlString
,
Class<T>
the class of the resulting instance(s)
resultClass
)

Implements org.hibernate.engine.spi.SessionImplementor.createNativeQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Create an instance of Query for executing a native SQL query.
public NativeQueryImplementor<T>
createNativeQuery(String
a native SQL query string
sqlString
,
String
the name of the result set mapping
resultSetMapping
)

Implements org.hibernate.engine.spi.SessionImplementor.createNativeQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Create an instance of Query for executing a native SQL query.
public <T> QueryImplementor<T>
createQuery(String
The criteria query rendered as a JPA QL string
jpaqlString
,
Class<T>
The result type (the type expected in the result list)
resultClass
,
Selection<X>
The selection(s)
selection
,
HibernateEntityManagerImplementor.QueryOptions
The options to use to build the query.
queryOptions
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Used during "compiling" a JPA criteria query.
public QueryImplementor<R>
createQuery(String
a Java Persistence query string
queryString
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of Query for executing a Java Persistence query language statement.
public <T> QueryImplementor<T>
createQuery(String
a Java Persistence query string
queryString
,
Class<T>
the type of the query result
resultType
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of TypedQuery for executing a Java Persistence query language statement.
public <T> QueryImplementor<T>
createQuery(CriteriaQuery<T>
a criteria query object
criteriaQuery
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of TypedQuery for executing a criteria query.
public QueryImplementor<R>
createQuery(CriteriaUpdate<T>
a criteria update query object
updateQuery
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of Query for executing a criteria update query.
public QueryImplementor<R>
createQuery(CriteriaDelete<T>
a criteria delete query object
deleteQuery
)

Implements org.hibernate.engine.spi.SessionImplementor.createQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create an instance of Query for executing a criteria delete query.
public NativeQueryImplementor<T>
createSQLQuery(String
The SQL query
queryString
)

Implements org.hibernate.engine.spi.SessionImplementor.createSQLQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Create a NativeQuery instance for the given SQL query string.
public ProcedureCall
createStoredProcedureCall(String
The name of the procedure.
procedureName
)

Implements org.hibernate.SharedSessionContract.createStoredProcedureCall.

Deprecated as a consequence of ProcedureCall being deprecated.
Creates a call to a stored procedure.
public ProcedureCall
createStoredProcedureCall(String
The name of the procedure.
procedureName
,
Class<T>...
The entity(s) to map the result on to.
resultClasses
)

Implements org.hibernate.SharedSessionContract.createStoredProcedureCall.

Deprecated as a consequence of ProcedureCall being deprecated.
Creates a call to a stored procedure with specific result set entity mappings.
public ProcedureCall
createStoredProcedureCall(String
The name of the procedure.
procedureName
,
String...
The explicit result set mapping(s) to use for mapping the results
resultSetMappings
)

Implements org.hibernate.SharedSessionContract.createStoredProcedureCall.

Deprecated as a consequence of ProcedureCall being deprecated.
Creates a call to a stored procedure with specific result set entity mappings.
public StoredProcedureQuery
createStoredProcedureQuery(String
name of the stored procedure in the database
procedureName
)

Implements javax.persistence.EntityManager.createStoredProcedureQuery.

Create an instance of StoredProcedureQuery for executing a stored procedure in the database.
public StoredProcedureQuery
createStoredProcedureQuery(String
name of the stored procedure in the database
procedureName
,
Class<T>...
classes to which the result sets produced by the stored procedure are to be mapped
resultClasses
)

Implements javax.persistence.EntityManager.createStoredProcedureQuery.

Create an instance of StoredProcedureQuery for executing a stored procedure in the database.
public StoredProcedureQuery
createStoredProcedureQuery(String
name of the stored procedure in the database
procedureName
,
String...
the names of the result set mappings to be used in mapping result sets returned by the stored procedure
resultSetMappings
)

Implements javax.persistence.EntityManager.createStoredProcedureQuery.

Create an instance of StoredProcedureQuery for executing a stored procedure in the database.
protected SessionImplementor
delegate()

Deprecated as a consequence of SessionImplementor being deprecated.
Returns the underlying delegate.
public void
delete(Object
the instance to be removed
object
)

Implements org.hibernate.Session.delete.

Remove a persistent instance from the datastore.
public void
delete(String
The entity name for the instance to be removed.
entityName
,
Object
the instance to be removed
object
)

Implements org.hibernate.Session.delete.

Remove a persistent instance from the datastore.
public void
delete(String entityName, Object child, boolean isCascadeDeleteEnabled, Set<E> transientEntities)

Implements org.hibernate.engine.spi.SessionImplementor.delete.

public void
detach(Object
entity instance
entity
)

Implements javax.persistence.EntityManager.detach.

Remove the given entity from the persistence context, causing a managed entity to become detached.
public void
disableFetchProfile(String
The name of the fetch profile to be disabled.
name
)

Implements org.hibernate.Session.disableFetchProfile.

Disable a particular fetch profile on this session.
public void
disableFilter(String
The name of the filter to be disabled.
filterName
)

Implements org.hibernate.Session.disableFilter.

Disable the named filter for the current session.
public Connection
disconnect()

Implements org.hibernate.Session.disconnect.

Disconnect the session from its underlying JDBC connection.
public <T> T
doReturningWork(ReturningWork<T>
The work to be performed.
work
)

Overrides default org.hibernate.SharedSessionContract.doReturningWork.

Controller for allowing users to perform JDBC related work using the Connection managed by this Session.
public void
doWork(Work
The work to be performed.
work
)

Overrides default org.hibernate.SharedSessionContract.doWork.

Controller for allowing users to perform JDBC related work using the Connection managed by this Session.
public void
enableFetchProfile(String
The name of the fetch profile to be enabled.
name
)

Implements org.hibernate.Session.enableFetchProfile.

Enable a particular fetch profile on this session.
public Filter
enableFilter(String
The name of the filter to be enabled.
filterName
)

Implements org.hibernate.Session.enableFilter.

Enable the named filter for this current session.
public void
evict(Object
The entity to evict
object
)

Implements org.hibernate.Session.evict.

Remove this instance from the session cache.
public <T> T
execute(LobCreationContext.Callback<T>
The callback to execute .
callback
)

Implements org.hibernate.engine.jdbc.LobCreationContext.execute.

Execute the given callback, making sure it has access to a viable JDBC Connection.
public int
public int
executeUpdate(String query, QueryParameters queryParameters)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.executeUpdate.

Execute a HQL update or delete query
public <T> T
find(Class<T>
entity class
entityClass
,
Object
primary key
primaryKey
)

Implements javax.persistence.EntityManager.find.

Find by primary key.
public <T> T
find(Class<T>
entity class
entityClass
,
Object
primary key
primaryKey
,
Map<String, Object>
standard and vendor-specific properties and hints
properties
)

Implements javax.persistence.EntityManager.find.

Find by primary key, using the specified properties.
public <T> T
find(Class<T>
entity class
entityClass
,
Object
primary key
primaryKey
,
LockModeType
lock mode
lockMode
)

Implements javax.persistence.EntityManager.find.

Find by primary key and lock.
public <T> T
find(Class<T>
entity class
entityClass
,
Object
primary key
primaryKey
,
LockModeType
lock mode
lockMode
,
Map<String, Object>
standard and vendor-specific properties and hints
properties
)

Implements javax.persistence.EntityManager.find.

Find by primary key and lock, using the specified properties.
public void
public void
public void
public EntityKey
generateEntityKey(Serializable
The entity id
id
,
EntityPersister
The entity persister
persister
)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.generateEntityKey.

Hide the changing requirements of entity key creation
public <T> T
get(Class<T>
The entity type
theClass
,
Serializable
an identifier
id
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.
public <T> T
get(Class<T>
The entity type
theClass
,
Serializable
an identifier
id
,
LockMode
the lock mode
lockMode
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.
public <T> T
get(Class<T>
The entity type
theClass
,
Serializable
an identifier
id
,
LockOptions
the lock mode
lockOptions
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.
public Object
get(String
the entity name
entityName
,
Serializable
an identifier
id
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given named entity with the given identifier, or null if there is no such persistent instance.
public Object
get(String
the entity name
entityName
,
Serializable
an identifier
id
,
LockMode
the lock mode
lockMode
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.
public Object
get(String
the entity name
entityName
,
Serializable
an identifier
id
,
LockOptions
contains the lock mode
lockOptions
)

Implements org.hibernate.Session.get.

Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance.
public ActionQueue
public CacheMode
public CacheTransactionSynchronization
public Serializable
getContextEntityIdentifier(Object object)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getContextEntityIdentifier.

Return the identifier of the persistent object, or null if not associated with the session
public CriteriaBuilder
getCriteriaBuilder()

Implements javax.persistence.EntityManager.getCriteriaBuilder.

Return an instance of CriteriaBuilder for the creation of CriteriaQuery objects.
public LockMode
getCurrentLockMode(Object
a persistent instance
object
)

Implements org.hibernate.Session.getCurrentLockMode.

Determine the current lock mode of the given object.
public Object
getDelegate()

Implements javax.persistence.EntityManager.getDelegate.

This is an implementation of EntityManager#getDelegate().
public int
public Filter
getEnabledFilter(String
The name of the filter to be retrieved.
filterName
)

Implements org.hibernate.Session.getEnabledFilter.

Retrieve a currently enabled filter by name.
public RootGraphImplementor<?>
getEntityGraph(String
name of an existing entity graph
graphName
)

Implements org.hibernate.engine.spi.SessionImplementor.getEntityGraph.

Return a named EntityGraph.
public <T> List<EntityGraph<? super T>>
getEntityGraphs(Class<T>
entity class
entityClass
)

Overrides default org.hibernate.Session.getEntityGraphs.

Implements javax.persistence.EntityManager.getEntityGraphs.

Return all named EntityGraphs that have been defined for the provided class type.
public EntityManagerFactory
getEntityManagerFactory()

Implements javax.persistence.EntityManager.getEntityManagerFactory.

Return the entity manager factory for the entity manager.
public String
getEntityName(Object
a persistent entity
object
)

Implements org.hibernate.Session.getEntityName.

Return the entity name for a persistent entity.
public EntityPersister
getEntityPersister(String
optional entity name
entityName
,
Object
the entity instance
object
)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getEntityPersister.

Get the EntityPersister for any instance
public Object
getEntityUsingInterceptor(EntityKey key)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getEntityUsingInterceptor.

Get the entity instance associated with the given Key, calling the Interceptor if necessary
public SessionEventListenerManager
public ExceptionConverter
getExceptionConverter()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getExceptionConverter.

The converter associated to a Session might be lazily initialized: only invoke this getter when there is actual need to use it.
public SessionFactoryImplementor
public FlushModeType
public FlushMode
public Serializable
getIdentifier(Object
a persistent instance
object
)

Implements org.hibernate.Session.getIdentifier.

Return the identifier value of the given entity as associated with this session.
public Interceptor
getInterceptor()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getInterceptor.

Retrieves the interceptor currently in use by this event source.
public Integer
public JdbcConnectionAccess
public JdbcCoordinator
public JdbcServices
public JdbcSessionContext
public TimeZone
getJdbcTimeZone()

Implements org.hibernate.type.descriptor.WrapperOptions.getJdbcTimeZone.

The JDBC TimeZone used when persisting Timestamp and DateTime properties into the database.
public LoadQueryInfluencers
getLoadQueryInfluencers()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getLoadQueryInfluencers.

Get the load query influencers associated with this session.
public LobCreator
public LobHelper
getLobHelper()

Implements org.hibernate.Session.getLobHelper.

Retrieve this session's helper/delegate for creating LOB instances.
public LockModeType
getLockMode(Object
entity instance
entity
)

Implements javax.persistence.EntityManager.getLockMode.

Get the current lock mode for the entity instance.
public LockOptions
getLockRequest(LockModeType
is the requested lock type
lockModeType
,
Map<String, Object>
are the lock properties
properties
)

Implements org.hibernate.jpa.spi.HibernateEntityManagerImplementor.getLockRequest.

Convert from JPA 2 javax.persistence.LockModeType & properties into org.hibernate.LockOptions
public Metamodel
getMetamodel()

Implements javax.persistence.EntityManager.getMetamodel.

Return an instance of Metamodel interface for access to the metamodel of the persistence unit.
public NativeQueryImplementor<T>
getNamedNativeQuery(String
The name of the pre-defined query
name
)

Implements org.hibernate.engine.spi.SessionImplementor.getNamedNativeQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Get a NativeQuery instance for a named native SQL query
public ProcedureCall
getNamedProcedureCall(String
The name given to the template
name
)

Implements org.hibernate.SharedSessionContract.getNamedProcedureCall.

Deprecated as a consequence of ProcedureCall being deprecated.
Gets a ProcedureCall based on a named template
public QueryImplementor<R>
getNamedQuery(String
the name of a pre-defined, named query
name
)

Implements org.hibernate.engine.spi.SessionImplementor.getNamedQuery.

Deprecated as a consequence of QueryImplementor being deprecated.
Create a Query instance for the named query.
public NativeQueryImplementor<T>
getNamedSQLQuery(String
The name of the pre-defined query
name
)

Implements org.hibernate.engine.spi.SessionImplementor.getNamedSQLQuery.

Deprecated as a consequence of NativeQueryImplementor being deprecated.
Get a NativeQuery instance for a named native SQL query
public PersistenceContext
public PersistenceContext
getPersistenceContextInternal()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getPersistenceContextInternal.

This is similar to getPersistenceContext(), with two main differences: a) this version performs better as it allows for inlining and probably better prediction b) see SessionImplgetPersistenceContext() : it does some checks on the current state of the Session.
public Map<String, Object>
getProperties()

Implements javax.persistence.EntityManager.getProperties.

Get the properties and hints and associated values that are in effect for the entity manager.
public <T> T
getReference(Class<T>
entity class
entityClass
,
Object
primary key
primaryKey
)

Implements javax.persistence.EntityManager.getReference.

Get an instance, whose state may be lazily fetched.
public <T> T
getReference(T
a detached persistent instance
object
)

Overrides default org.hibernate.Session.getReference.

Return a reference to the persistent instance with the same identity as the given instance, which might be detached, making the assumption that the instance is still persistent in the database.
public SessionImplementor
public SessionFactoryImplementor
getSessionFactory()

Implements org.hibernate.engine.spi.SessionImplementor.getSessionFactory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Get the session factory which created this session.
public UUID
public SessionStatistics
getStatistics()

Implements org.hibernate.Session.getStatistics.

Get the statistics for this session.
public String
public long
public Transaction
public TransactionCoordinator
getTransactionCoordinator()

Implements org.hibernate.resource.jdbc.spi.JdbcSessionOwner.getTransactionCoordinator.

Obtain the builder for TransactionCoordinator instances
public long
getTransactionStartTimestamp()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.getTransactionStartTimestamp.

A "timestamp" at or before the start of the current transaction.
public TypeHelper
getTypeHelper()

Implements org.hibernate.Session.getTypeHelper.

Convenience access to the TypeHelper associated with this session's SessionFactory.
public String
guessEntityName(Object entity)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.guessEntityName.

The guessed entity name for an entity not in an association
public Object
public void
initializeCollection(PersistentCollection collection, boolean writing)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.initializeCollection.

Initialize the collection (if not already initialized)
public Object
instantiate(String entityName, Serializable id)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.instantiate.

Instantiate the entity class, initializing with the given identifier
public Object
instantiate(EntityPersister persister, Serializable id)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.instantiate.

Instantiate the entity class of an EntityPersister, initializing with the given identifier.
public Object
internalLoad(String entityName, Serializable id, boolean eager, boolean nullable)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.internalLoad.

Load an instance without checking if it was deleted.
public boolean
public boolean
isClosed()

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.isClosed.

Checks whether the session is closed.
public boolean
isConnected()

Implements org.hibernate.SharedSessionContract.isConnected.

Check if the session is currently connected.
public boolean
isDefaultReadOnly()

Implements org.hibernate.Session.isDefaultReadOnly.

Will entities and proxies that are loaded into this session be made read-only by default?
public boolean
isDirty()

Implements org.hibernate.Session.isDirty.

Does this session contain any changes which must be synchronized with the database?
public boolean
public boolean
isFetchProfileEnabled(String
The name of the profile to be checked.
name
)

Implements org.hibernate.Session.isFetchProfileEnabled.

Is a particular fetch profile enabled on this session?
public boolean
public boolean
isJoinedToTransaction()

Implements javax.persistence.EntityManager.isJoinedToTransaction.

Determine whether the entity manager is joined to the current transaction.
public boolean
public boolean
isOpenOrWaitingForAutoClose()

Overrides default org.hibernate.engine.spi.SharedSessionContractImplementor.isOpenOrWaitingForAutoClose.

Checks whether the session is open or is waiting for auto-close
public boolean
public boolean
isReadOnly(Object
an entity or HibernateProxy
entityOrProxy
)

Implements org.hibernate.Session.isReadOnly.

Is the specified entity or proxy read-only?
public boolean
public Iterator<E>
iterate(String query, QueryParameters queryParameters)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.iterate.

Execute an iterate() query
public Iterator<E>
public void
joinTransaction()

Implements javax.persistence.EntityManager.joinTransaction.

Indicate to the entity manager that a JTA transaction is active and join the persistence context to it.
public List<E>
list(String query, QueryParameters queryParameters)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.list.

Execute a find() query
public List<E>
public List<E>
list(NativeSQLQuerySpecification
The specification of the native SQL query to execute.
spec
,
QueryParameters
The parameters by which to perform the execution.
queryParameters
)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.list.

Execute a native SQL query, and return the results as a fully built list.
public List<E>
public List<E>
listFilter(Object collection, String filter, QueryParameters queryParameters)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.listFilter.

Execute a filter
public <T> T
load(Class<T>
a persistent class
theClass
,
Serializable
a valid identifier of an existing persistent instance of the class
id
,
LockMode
the lock level
lockMode
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode, assuming the instance exists.
public <T> T
load(Class<T>
a persistent class
theClass
,
Serializable
a valid identifier of an existing persistent instance of the class
id
,
LockOptions
contains the lock level
lockOptions
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode, assuming the instance exists.
public Object
load(String
a persistent class
entityName
,
Serializable
a valid identifier of an existing persistent instance of the class
id
,
LockMode
the lock level
lockMode
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode, assuming the instance exists.
public Object
load(String
a persistent class
entityName
,
Serializable
a valid identifier of an existing persistent instance of the class
id
,
LockOptions
contains the lock level
lockOptions
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode, assuming the instance exists.
public <T> T
load(Class<T>
a persistent class
theClass
,
Serializable
a valid identifier of an existing persistent instance of the class
id
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, assuming that the instance exists.
public Object
load(String
a persistent class
entityName
,
Serializable
a valid identifier of an existing persistent instance of the class
id
)

Implements org.hibernate.Session.load.

Return the persistent instance of the given entity class with the given identifier, assuming that the instance exists.
public void
load(Object
an "empty" instance of the persistent class
object
,
Serializable
a valid identifier of an existing persistent instance of the class
id
)

Implements org.hibernate.Session.load.

Read the persistent state associated with the given identifier into the given transient instance.
public void
lock(Object
entity instance
entity
,
LockModeType
lock mode
lockMode
)

Implements javax.persistence.EntityManager.lock.

Lock an entity instance that is contained in the persistence context with the specified lock mode type.
public void
lock(Object
entity instance
entity
,
LockModeType
lock mode
lockMode
,
Map<String, Object>
standard and vendor-specific properties and hints
properties
)

Implements javax.persistence.EntityManager.lock.

Lock an entity instance that is contained in the persistence context with the specified lock mode type and with specified properties.
public void
lock(Object
a persistent or transient instance
object
,
LockMode
the lock level
lockMode
)

Implements org.hibernate.Session.lock.

Obtain the specified lock level upon the given object.
public void
lock(String
The name of the entity
entityName
,
Object
a persistent or transient instance
object
,
LockMode
the lock level
lockMode
)

Implements org.hibernate.Session.lock.

Obtain the specified lock level upon the given object.
public void
public Object
merge(Object
a detached instance with state to be copied
object
)

Implements org.hibernate.Session.merge, javax.persistence.EntityManager.merge.

Copy the state of the given object onto the persistent object with the same identifier.
public Object
merge(String
The entity name
entityName
,
Object
a detached instance with state to be copied
object
)

Implements org.hibernate.Session.merge.

Copy the state of the given object onto the persistent object with the same identifier.
public void
merge(String entityName, Object object, Map<K, V> copiedAlready)

Implements org.hibernate.engine.spi.SessionImplementor.merge.

public void
persist(Object
a transient instance to be made persistent
object
)

Implements org.hibernate.Session.persist, javax.persistence.EntityManager.persist.

Make a transient instance persistent.
public void
persist(String
The entity name
entityName
,
Object
a transient instance to be made persistent
object
)

Implements org.hibernate.Session.persist.

Make a transient instance persistent.
public void
persist(String entityName, Object object, Map<K, V> createdAlready)

Implements org.hibernate.engine.spi.SessionImplementor.persist.

public void
public void
reconnect(Connection
a JDBC connection
connection
)

Implements org.hibernate.Session.reconnect.

Reconnect to the given JDBC connection.
public void
refresh(Object
a persistent or detached instance
object
)

Implements org.hibernate.Session.refresh, javax.persistence.EntityManager.refresh.

Re-read the state of the given instance from the underlying database.
public void
refresh(Object
entity instance
entity
,
Map<String, Object>
standard and vendor-specific properties and hints
properties
)

Implements javax.persistence.EntityManager.refresh.

Refresh the state of the instance from the database, using the specified properties, and overwriting changes made to the entity, if any.
public void
refresh(Object
entity instance
entity
,
LockModeType
lock mode
lockMode
)

Implements javax.persistence.EntityManager.refresh.

Refresh the state of the instance from the database, overwriting changes made to the entity, if any, and lock it with respect to given lock mode type.
public void
refresh(Object
entity instance
entity
,
LockModeType
lock mode
lockMode
,
Map<String, Object>
standard and vendor-specific properties and hints
properties
)

Implements javax.persistence.EntityManager.refresh.

Refresh the state of the instance from the database, overwriting changes made to the entity, if any, and lock it with respect to given lock mode type and with specified properties.
public void
refresh(String
a persistent class
entityName
,
Object
a persistent or detached instance
object
)

Implements org.hibernate.Session.refresh.

Re-read the state of the given instance from the underlying database.
public void
refresh(Object
a persistent or detached instance
object
,
LockMode
the lock mode to use
lockMode
)

Implements org.hibernate.Session.refresh.

Re-read the state of the given instance from the underlying database, with the given LockMode.
public void
refresh(Object
a persistent or detached instance
object
,
LockOptions
contains the lock mode to use
lockOptions
)

Implements org.hibernate.Session.refresh.

Re-read the state of the given instance from the underlying database, with the given LockMode.
public void
refresh(String
a persistent class
entityName
,
Object
a persistent or detached instance
object
,
LockOptions
contains the lock mode to use
lockOptions
)

Implements org.hibernate.Session.refresh.

Re-read the state of the given instance from the underlying database, with the given LockMode.
public void
refresh(String entityName, Object object, Map<K, V> refreshedAlready)

Implements org.hibernate.engine.spi.SessionImplementor.refresh.

public SqlTypeDescriptor
remapSqlTypeDescriptor(SqlTypeDescriptor
The known descriptor
sqlTypeDescriptor
)

Implements org.hibernate.type.descriptor.WrapperOptions.remapSqlTypeDescriptor.

Allow remapping of descriptors for dealing with sql type.
public void
remove(Object
entity instance
entity
)

Implements javax.persistence.EntityManager.remove.

Remove the entity instance.
public void
public void
replicate(Object
a detached instance of a persistent class
object
,
ReplicationMode
The replication mode to use
replicationMode
)

Implements org.hibernate.Session.replicate.

Persist the state of the given detached instance, reusing the current identifier value.
public void
replicate(String
The entity name
entityName
,
Object
a detached instance of a persistent class
object
,
ReplicationMode
The replication mode to use
replicationMode
)

Implements org.hibernate.Session.replicate.

Persist the state of the given detached instance, reusing the current identifier value.
public Serializable
save(Object
a transient instance of a persistent class
object
)

Implements org.hibernate.Session.save.

Persist the given transient instance, first assigning a generated identifier.
public Serializable
save(String
The entity name
entityName
,
Object
a transient instance of a persistent class
object
)

Implements org.hibernate.Session.save.

Persist the given transient instance, first assigning a generated identifier.
public void
saveOrUpdate(Object
a transient or detached instance containing new or updated state
object
)

Implements org.hibernate.Session.saveOrUpdate.

Either save(Object) or update(Object) the given instance, depending upon resolution of the unsaved-value checks (see the manual for discussion of unsaved-value checking).
public void
saveOrUpdate(String
The entity name
entityName
,
Object
a transient or detached instance containing new or updated state
object
)

Implements org.hibernate.Session.saveOrUpdate.

Either save(String, Object) or update(String, Object) the given instance, depending upon resolution of the unsaved-value checks (see the manual for discussion of unsaved-value checking).
public ScrollableResultsImplementor
scroll(String query, QueryParameters queryParameters)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.scroll.

Execute a scroll() query
public ScrollableResultsImplementor
scroll(Criteria criteria, ScrollMode scrollMode)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.scroll.

Execute a criteria query
public ScrollableResultsImplementor
scroll(NativeSQLQuerySpecification
The specification of the native SQL query to execute.
spec
,
QueryParameters
The parameters by which to perform the execution.
queryParameters
)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.scroll.

Execute a native SQL query, and return the results as a scrollable result.
public ScrollableResultsImplementor
public SharedSessionBuilder<T extends SharedSessionBuilder>
sessionWithOptions()

Implements org.hibernate.Session.sessionWithOptions.

Obtain a Session builder with the ability to grab certain information from this session.
public void
setAutoClear(boolean enabled)

Implements org.hibernate.engine.spi.SharedSessionContractImplementor.setAutoClear.

Enable/disable automatic cache clearing from after transaction completion (for EJB3)
public void
public void
setDefaultReadOnly(boolean
true, the default for loaded entities/proxies is read-only; false, the default for loaded entities/proxies is modifiable
readOnly
)

Implements org.hibernate.Session.setDefaultReadOnly.

Change the default for entities and proxies loaded into this session from modifiable to read-only mode, or from modifiable to read-only mode.
public void
setFlushMode(FlushModeType
flush mode
flushModeType
)

Implements javax.persistence.EntityManager.setFlushMode.

Set the flush mode that applies to all objects contained in the persistence context.
public void
public void
public void
setJdbcBatchSize(Integer
Session-level JDBC batch size
jdbcBatchSize
)

Implements org.hibernate.SharedSessionContract.setJdbcBatchSize.

Set the Session-level JDBC batch size.
public void
setProperty(String
name of property or hint
propertyName
,
Object
value for property or hint
value
)

Implements javax.persistence.EntityManager.setProperty.

Set an entity manager property or hint.
public void
setReadOnly(Object
an entity or HibernateProxy
entityOrProxy
,
boolean
true if the entity or proxy should be made read-only; false if the entity or proxy should be made modifiable
readOnly
)

Implements org.hibernate.Session.setReadOnly.

Set an unmodified persistent object to read-only mode, or a read-only object to modifiable mode.
public boolean
public boolean
shouldAutoJoinTransaction()

Implements org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options.shouldAutoJoinTransaction.

Indicates whether an active transaction should be automatically joined.
public void
startTransactionBoundary()

Implements org.hibernate.resource.jdbc.spi.JdbcSessionOwner.startTransactionBoundary.

Callback indicating recognition of entering into a transactional context whether that is explicitly via the Hibernate org.hibernate.Transaction API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction
public <T> T
unwrap(Class<T>
the class of the object to be returned. This is normally either the underlying EntityManager implementation class or an interface that it implements.
cls
)

Implements javax.persistence.EntityManager.unwrap.

Return an object of the specified type to allow access to the provider-specific API.
public void
update(Object
a detached instance containing updated state
object
)

Implements org.hibernate.Session.update.

Update the persistent instance with the identifier of the given detached instance.
public void
update(String
The entity name
entityName
,
Object
a detached instance containing updated state
object
)

Implements org.hibernate.Session.update.

Update the persistent instance with the identifier of the given detached instance.
public boolean
useStreamForLobBinding()

Implements org.hibernate.type.descriptor.WrapperOptions.useStreamForLobBinding.

Should streams be used for binding LOB values.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait