|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionImplementor
Defines the internal contract between Session
/ StatelessSession
and
other parts of Hibernate such as Type
, EntityPersister
and
CollectionPersister
implementors
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hibernate.engine.jdbc.LobCreationContext |
---|
LobCreationContext.Callback<T> |
Method Summary | |
---|---|
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. |
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()
Deprecated. use #getLoadQueryInfluencers instead |
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()
Deprecated. use #getLoadQueryInfluencers instead |
Type |
getFilterParameterType(String filterParameterName)
Deprecated. use #getLoadQueryInfluencers instead |
Object |
getFilterParameterValue(String filterParameterName)
Deprecated. use #getLoadQueryInfluencers instead |
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)
Deprecated. use getLoadQueryInfluencers() instead |
void |
setFlushMode(FlushMode fm)
|
Methods inherited from interface org.hibernate.engine.jdbc.LobCreationContext |
---|
execute |
Method Detail |
---|
String getTenantIdentifier()
Session
and StatelessSession
JdbcConnectionAccess getJdbcConnectionAccess()
EntityKey generateEntityKey(Serializable id, EntityPersister persister)
id
- The entity idpersister
- The entity persister
CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
id
- The entity identifier or collection key.type
- The typeentityOrRoleName
- The entity name or collection role.
Interceptor getInterceptor()
void setAutoClear(boolean enabled)
void disableTransactionAutoJoin()
Synchronization
).
JPA however defines an explicit join transaction operation.
See javax.persistence.EntityManager#joinTransaction
boolean isTransactionInProgress()
void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException
HibernateException
Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException
HibernateException
Object immediateLoad(String entityName, Serializable id) throws HibernateException
HibernateException
long getTimestamp()
SessionFactoryImplementor getFactory()
List list(String query, QueryParameters queryParameters) throws HibernateException
HibernateException
Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException
HibernateException
ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException
HibernateException
ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode)
List list(CriteriaImpl criteria)
List listFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
HibernateException
Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
HibernateException
EntityPersister getEntityPersister(String entityName, Object object) throws HibernateException
entityName
- optional entity nameobject
- the entity instance
HibernateException
Object getEntityUsingInterceptor(EntityKey key) throws HibernateException
HibernateException
Serializable getContextEntityIdentifier(Object object)
String bestGuessEntityName(Object object)
String guessEntityName(Object entity) throws HibernateException
HibernateException
Object instantiate(String entityName, Serializable id) throws HibernateException
HibernateException
List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
HibernateException
ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
HibernateException
List list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
spec
- The specification of the native SQL query to execute.queryParameters
- The parameters by which to perform the execution.
HibernateException
ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
spec
- The specification of the native SQL query to execute.queryParameters
- The parameters by which to perform the execution.
HibernateException
@Deprecated Object getFilterParameterValue(String filterParameterName)
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
@Deprecated Type getFilterParameterType(String filterParameterName)
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
@Deprecated Map getEnabledFilters()
FilterImpl
instance.
int getDontFlushFromFind()
PersistenceContext getPersistenceContext()
int executeUpdate(String query, QueryParameters queryParameters) throws HibernateException
HibernateException
int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters) throws HibernateException
HibernateException
NonFlushedChanges getNonFlushedChanges() throws HibernateException
HibernateException
void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException
nonFlushedChanges
- the non-flushed changes
HibernateException
CacheMode getCacheMode()
void setCacheMode(CacheMode cm)
boolean isOpen()
boolean isConnected()
FlushMode getFlushMode()
void setFlushMode(FlushMode fm)
Connection connection()
void flush()
Query getNamedQuery(String name)
Query getNamedSQLQuery(String name)
boolean isEventSource()
void afterScrollOperation()
@Deprecated String getFetchProfile()
@Deprecated void setFetchProfile(String name)
getLoadQueryInfluencers()
instead
name
- The internal fetch profile name to useTransactionCoordinator getTransactionCoordinator()
boolean isClosed()
isOpen()
as this method does not attempt any JTA synchronization
registration, where as isOpen()
does; which makes this one
nicer to use for most internal purposes.
LoadQueryInfluencers getLoadQueryInfluencers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |