public abstract class AbstractDelegateSessionImplementor extends Object implements SessionImplementor
LobCreationContext.Callback<T>| Modifier and Type | Field and Description |
|---|---|
protected SessionImplementor |
delegate |
| Constructor and Description |
|---|
AbstractDelegateSessionImplementor(SessionImplementor delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterScrollOperation() |
void |
applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges)
Apply non-flushed changes from a different session to this session.
|
String |
bestGuessEntityName(Object object)
The best guess entity name for an entity not in an association
|
Connection |
connection() |
void |
disableTransactionAutoJoin()
Disable automatic transaction joining.
|
abstract Object |
doImmediateLoad(String entityName) |
<T> T |
execute(LobCreationContext.Callback<T> callback)
Execute the given callback, making sure it has access to a viable JDBC
Connection. |
int |
executeNativeUpdate(NativeSQLQuerySpecification specification,
QueryParameters queryParameters)
Execute a native SQL update or delete query
|
int |
executeUpdate(String query,
QueryParameters queryParameters)
Execute a HQL update or delete query
|
void |
flush() |
CacheKey |
generateCacheKey(Serializable id,
Type type,
String entityOrRoleName)
Hide the changing requirements of cache key creation.
|
EntityKey |
generateEntityKey(Serializable id,
EntityPersister persister)
Hide the changing requirements of entity key creation
|
CacheMode |
getCacheMode() |
Serializable |
getContextEntityIdentifier(Object object)
Return the identifier of the persistent object, or null if
not associated with the session
|
int |
getDontFlushFromFind() |
Map |
getEnabledFilters()
Return the currently enabled filters.
|
EntityPersister |
getEntityPersister(String entityName,
Object object)
Get the EntityPersister for any instance
|
Object |
getEntityUsingInterceptor(EntityKey key)
Get the entity instance associated with the given Key,
calling the Interceptor if necessary
|
SessionFactoryImplementor |
getFactory()
Get the creating SessionFactoryImplementor
|
String |
getFetchProfile()
Get the internal fetch profile currently associated with this session.
|
Type |
getFilterParameterType(String filterParameterName)
Retreive the type for a given filter parrameter.
|
Object |
getFilterParameterValue(String filterParameterName)
Retreive the currently set value for a filter parameter.
|
FlushMode |
getFlushMode() |
Interceptor |
getInterceptor()
Retrieves the interceptor currently in use by this event source.
|
JdbcConnectionAccess |
getJdbcConnectionAccess()
Provides access to JDBC connections
|
LoadQueryInfluencers |
getLoadQueryInfluencers()
Get the load query influencers associated with this session.
|
Query |
getNamedQuery(String name)
Get a Query instance for a named query or named native SQL query
|
Query |
getNamedSQLQuery(String name)
Get a Query instance for a named native SQL query
|
NonFlushedChanges |
getNonFlushedChanges()
Return changes to this session that have not been flushed yet.
|
PersistenceContext |
getPersistenceContext()
Get the persistence context for this session
|
String |
getTenantIdentifier()
Match te method on
Session and StatelessSession |
long |
getTimestamp()
System time before the start of the transaction
|
TransactionCoordinator |
getTransactionCoordinator()
Retrieve access to the session's transaction coordinator.
|
String |
guessEntityName(Object entity)
The guessed entity name for an entity not in an association
|
Object |
immediateLoad(String entityName,
Serializable id)
Load an instance immediately.
|
void |
initializeCollection(PersistentCollection collection,
boolean writing)
Initialize the collection (if not already initialized)
|
Object |
instantiate(String entityName,
Serializable id)
Instantiate the entity class, initializing with the given identifier
|
Object |
internalLoad(String entityName,
Serializable id,
boolean eager,
boolean nullable)
Load an instance without checking if it was deleted.
|
boolean |
isClosed()
Determine whether the session is closed.
|
boolean |
isConnected() |
boolean |
isEventSource() |
boolean |
isOpen() |
boolean |
isTransactionInProgress()
Does this Session have an active Hibernate transaction
or is there a JTA transaction in progress?
|
Iterator |
iterate(String query,
QueryParameters queryParameters)
Execute an iterate() query
|
Iterator |
iterateFilter(Object collection,
String filter,
QueryParameters queryParameters)
Iterate a filter
|
List |
list(CriteriaImpl criteria)
Execute a criteria query
|
List |
list(NativeSQLQuerySpecification spec,
QueryParameters queryParameters)
Execute a native SQL query, and return the results as a fully built list.
|
List |
list(String query,
QueryParameters queryParameters)
Execute a find() query
|
List |
listCustomQuery(CustomQuery customQuery,
QueryParameters queryParameters)
Execute an SQL Query
|
List |
listFilter(Object collection,
String filter,
QueryParameters queryParameters)
Execute a filter
|
ScrollableResults |
scroll(CriteriaImpl criteria,
ScrollMode scrollMode)
Execute a criteria query
|
ScrollableResults |
scroll(NativeSQLQuerySpecification spec,
QueryParameters queryParameters)
Execute a native SQL query, and return the results as a scrollable result.
|
ScrollableResults |
scroll(String query,
QueryParameters queryParameters)
Execute a scroll() query
|
ScrollableResults |
scrollCustomQuery(CustomQuery customQuery,
QueryParameters queryParameters)
Execute an SQL Query
|
void |
setAutoClear(boolean enabled)
Enable/disable automatic cache clearing from after transaction
completion (for EJB3)
|
void |
setCacheMode(CacheMode cm) |
void |
setFetchProfile(String name)
Set the current internal fetch profile for this session.
|
void |
setFlushMode(FlushMode fm) |
protected SessionImplementor delegate
public AbstractDelegateSessionImplementor(SessionImplementor delegate)
public Object immediateLoad(String entityName, Serializable id) throws HibernateException
SessionImplementorimmediateLoad in interface SessionImplementorHibernateExceptionpublic String getTenantIdentifier()
SessionImplementorSession and StatelessSessiongetTenantIdentifier in interface SessionImplementorpublic JdbcConnectionAccess getJdbcConnectionAccess()
SessionImplementorgetJdbcConnectionAccess in interface SessionImplementorpublic EntityKey generateEntityKey(Serializable id, EntityPersister persister)
SessionImplementorgenerateEntityKey in interface SessionImplementorid - The entity idpersister - The entity persisterpublic CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
SessionImplementorgenerateCacheKey in interface SessionImplementorid - The entity identifier or collection key.type - The typeentityOrRoleName - The entity name or collection role.public <T> T execute(LobCreationContext.Callback<T> callback)
LobCreationContextConnection.execute in interface LobCreationContextcallback - The callback to execute .public LoadQueryInfluencers getLoadQueryInfluencers()
SessionImplementorgetLoadQueryInfluencers in interface SessionImplementorpublic Interceptor getInterceptor()
SessionImplementorgetInterceptor in interface SessionImplementorpublic void setAutoClear(boolean enabled)
SessionImplementorsetAutoClear in interface SessionImplementorpublic void disableTransactionAutoJoin()
SessionImplementorSynchronization).
JPA however defines an explicit join transaction operation.
See javax.persistence.EntityManager#joinTransactiondisableTransactionAutoJoin in interface SessionImplementorpublic boolean isTransactionInProgress()
SessionImplementorisTransactionInProgress in interface SessionImplementorpublic void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException
SessionImplementorinitializeCollection in interface SessionImplementorHibernateExceptionpublic Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException
SessionImplementorinternalLoad in interface SessionImplementorHibernateExceptionpublic long getTimestamp()
SessionImplementorgetTimestamp in interface SessionImplementorpublic SessionFactoryImplementor getFactory()
SessionImplementorgetFactory in interface SessionImplementorpublic List list(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementorlist in interface SessionImplementorHibernateExceptionpublic Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementoriterate in interface SessionImplementorHibernateExceptionpublic ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementorscroll in interface SessionImplementorHibernateExceptionpublic ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode)
SessionImplementorscroll in interface SessionImplementorpublic List list(CriteriaImpl criteria)
SessionImplementorlist in interface SessionImplementorpublic List listFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementorlistFilter in interface SessionImplementorHibernateExceptionpublic Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementoriterateFilter in interface SessionImplementorHibernateExceptionpublic EntityPersister getEntityPersister(String entityName, Object object) throws HibernateException
SessionImplementorgetEntityPersister in interface SessionImplementorentityName - optional entity nameobject - the entity instanceHibernateExceptionpublic Object getEntityUsingInterceptor(EntityKey key) throws HibernateException
SessionImplementorgetEntityUsingInterceptor in interface SessionImplementorHibernateExceptionpublic Serializable getContextEntityIdentifier(Object object)
SessionImplementorgetContextEntityIdentifier in interface SessionImplementorpublic String bestGuessEntityName(Object object)
SessionImplementorbestGuessEntityName in interface SessionImplementorpublic String guessEntityName(Object entity) throws HibernateException
SessionImplementorguessEntityName in interface SessionImplementorHibernateExceptionpublic Object instantiate(String entityName, Serializable id) throws HibernateException
SessionImplementorinstantiate in interface SessionImplementorHibernateExceptionpublic List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
SessionImplementorlistCustomQuery in interface SessionImplementorHibernateExceptionpublic ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
SessionImplementorscrollCustomQuery in interface SessionImplementorHibernateExceptionpublic List list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
SessionImplementorlist in interface SessionImplementorspec - The specification of the native SQL query to execute.queryParameters - The parameters by which to perform the execution.HibernateExceptionpublic ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
SessionImplementorscroll in interface SessionImplementorspec - The specification of the native SQL query to execute.queryParameters - The parameters by which to perform the execution.HibernateExceptionpublic Object getFilterParameterValue(String filterParameterName)
SessionImplementorgetFilterParameterValue in interface SessionImplementorfilterParameterName - The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.public Type getFilterParameterType(String filterParameterName)
SessionImplementorgetFilterParameterType in interface SessionImplementorfilterParameterName - The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.public Map getEnabledFilters()
SessionImplementorFilterImpl
instance.getEnabledFilters in interface SessionImplementorpublic int getDontFlushFromFind()
getDontFlushFromFind in interface SessionImplementorpublic PersistenceContext getPersistenceContext()
SessionImplementorgetPersistenceContext in interface SessionImplementorpublic int executeUpdate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementorexecuteUpdate in interface SessionImplementorHibernateExceptionpublic int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters) throws HibernateException
SessionImplementorexecuteNativeUpdate in interface SessionImplementorHibernateExceptionpublic NonFlushedChanges getNonFlushedChanges() throws HibernateException
SessionImplementorgetNonFlushedChanges in interface SessionImplementorHibernateExceptionpublic void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException
SessionImplementorapplyNonFlushedChanges in interface SessionImplementornonFlushedChanges - the non-flushed changesHibernateExceptionpublic CacheMode getCacheMode()
getCacheMode in interface SessionImplementorpublic void setCacheMode(CacheMode cm)
setCacheMode in interface SessionImplementorpublic boolean isOpen()
isOpen in interface SessionImplementorpublic boolean isConnected()
isConnected in interface SessionImplementorpublic FlushMode getFlushMode()
getFlushMode in interface SessionImplementorpublic void setFlushMode(FlushMode fm)
setFlushMode in interface SessionImplementorpublic Connection connection()
connection in interface SessionImplementorpublic void flush()
flush in interface SessionImplementorpublic Query getNamedQuery(String name)
SessionImplementorgetNamedQuery in interface SessionImplementorpublic Query getNamedSQLQuery(String name)
SessionImplementorgetNamedSQLQuery in interface SessionImplementorpublic boolean isEventSource()
isEventSource in interface SessionImplementorpublic void afterScrollOperation()
afterScrollOperation in interface SessionImplementorpublic void setFetchProfile(String name)
SessionImplementorsetFetchProfile in interface SessionImplementorname - The internal fetch profile name to usepublic String getFetchProfile()
SessionImplementorgetFetchProfile in interface SessionImplementorpublic TransactionCoordinator getTransactionCoordinator()
SessionImplementorgetTransactionCoordinator in interface SessionImplementorpublic boolean isClosed()
SessionImplementorSessionImplementor.isOpen() as this method does not attempt any JTA synchronization
registration, where as SessionImplementor.isOpen() does; which makes this one
nicer to use for most internal purposes.isClosed in interface SessionImplementorCopyright © 2012 JBoss by Red Hat. All Rights Reserved.