the interface to the application, the actual implementation
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | afterTransactionCompletion(boolean successful, Transaction tx)
Notify the session that the transaction completed, so we no longer own the old locks. |
| public void | applyNonFlushedChanges(NonFlushedChanges
the non-flushed changes nonFlushedChanges)Apply non-flushed changes from a different session to this session. |
| public void | beforeTransactionCompletion(Transaction tx)
Notify the session that the transaction is about to complete |
| public String | |
| public Connection | |
| public int | executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters)
Execute a native SQL update or delete query |
| public int | |
| public void | |
| public Batcher | |
| public CacheMode | |
| public Serializable | getContextEntityIdentifier(Object object)
Return the identifier of the persistent object, or null if not associated with the session |
| public int | |
| public Map | Returns: The currently enabled filters.
Deprecated
use #getLoadQueryInfluencers instead
Return the currently enabled filters.
|
| public EntityMode | |
| public EntityPersister | getEntityPersister(String
optional entity name entityName, Object the entity instance object)Get the EntityPersister for any instance |
| public Object | getEntityUsingInterceptor(EntityKey key)
Get the entity instance associated with the given Key, calling the Interceptor if necessary |
| public SessionFactoryImplementor | |
| public String | Returns: The current internal fetch profile, or null if none currently associated.
Deprecated
use #getLoadQueryInfluencers instead
Get the internal fetch profile currently associated with this session.
|
| public Type | Returns: The filter param typeThe filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}. filterParameterName)
Deprecated
use #getLoadQueryInfluencers instead
Retreive the type for a given filter parrameter.
|
| public Object | Returns: The filter parameter value.The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}. filterParameterName)
Deprecated
use #getLoadQueryInfluencers instead
Retreive the currently set value for a filter parameter.
|
| public FlushMode | |
| public Interceptor | Returns: The interceptor.Retrieves the interceptor currently in use by this event source. |
| public JDBCContext | |
| public EventListeners | Returns: The configured event listeners.Retrieves the configured event listeners from this event source. |
| public LoadQueryInfluencers | Returns: the load query influencers associated with this session; should never be null.Get the load query influencers associated with this session. |
| public Query | |
| public Query | |
| public NonFlushedChanges | Returns: The non-flushed changes.Return changes to this session that have not been flushed yet. |
| public PersistenceContext | |
| public long | |
| public String | |
| public Object | |
| public void | initializeCollection(PersistentCollection collection, boolean writing)
Initialize the collection (if not already initialized) |
| public Object | instantiate(String entityName, Serializable id)
Instantiate the entity class, initializing with the given identifier |
| public Object | internalLoad(String entityName, Serializable id, boolean eager, boolean nullable)
Load an instance without checking if it was deleted. |
| public boolean | Returns: True if the session is closed; false otherwise.Determine whether the session is closed. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isTransactionInProgress()
Does this Session have an active Hibernate transaction or is there a JTA transaction in progress? |
| public Iterator | |
| public Iterator | |
| public List | |
| public List | |
| public List | Returns: The result list.The specification of the native SQL query to execute. spec, QueryParameters The parameters by which to perform the execution. queryParameters)Execute a native SQL query, and return the results as a fully built list. |
| public List | |
| public List | |
| public ScrollableResults | |
| public ScrollableResults | |
| public ScrollableResults | Returns: The resulting scrollable result.The specification of the native SQL query to execute. spec, QueryParameters The parameters by which to perform the execution. queryParameters)Execute a native SQL query, and return the results as a scrollable result. |
| public ScrollableResults | |
| public void | setAutoClear(boolean enabled)
Enable/disable automatic cache clearing from after transaction completion (for EJB3) |
| public void | |
| public void | setFetchProfile(String
The internal fetch profile name to use name)
Deprecated
use #getLoadQueryInfluencers instead
Set the current internal fetch profile for this session.
|
| public void |
| afterScrollOperation | back to summary |
|---|---|
| public void afterScrollOperation() | |
| afterTransactionCompletion | back to summary |
|---|---|
| public void afterTransactionCompletion(boolean successful, Transaction tx) Notify the session that the transaction completed, so we no longer own the old locks. (Also we should release cache softlocks.) May be called multiple times during the transaction completion process. Also called after an autocommit, in which case the second argument is null. | |
| applyNonFlushedChanges | back to summary |
|---|---|
| public void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException Apply non-flushed changes from a different session to this session. It is assumed that this SessionImpl is "clean" (e.g., has no non-flushed changes, no cached entities, no cached collections, no queued actions). The specified NonFlushedChanges object cannot be bound to any session.
| |
| beforeTransactionCompletion | back to summary |
|---|---|
| public void beforeTransactionCompletion(Transaction tx) Notify the session that the transaction is about to complete | |
| bestGuessEntityName | back to summary |
|---|---|
| public String bestGuessEntityName(Object object) The best guess entity name for an entity not in an association | |
| connection | back to summary |
|---|---|
| public Connection connection() | |
| executeNativeUpdate | back to summary |
|---|---|
| public int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters) throws HibernateException Execute a native SQL update or delete query | |
| executeUpdate | back to summary |
|---|---|
| public int executeUpdate(String query, QueryParameters queryParameters) throws HibernateException Execute a HQL update or delete query | |
| flush | back to summary |
|---|---|
| public void flush() | |
| getBatcher | back to summary |
|---|---|
| public Batcher getBatcher() Get the prepared statement Batcher for this session | |
| getCacheMode | back to summary |
|---|---|
| public CacheMode getCacheMode() | |
| getContextEntityIdentifier | back to summary |
|---|---|
| public Serializable getContextEntityIdentifier(Object object) Return the identifier of the persistent object, or null if not associated with the session | |
| getDontFlushFromFind | back to summary |
|---|---|
| public int getDontFlushFromFind() | |
| getEnabledFilters | back to summary |
|---|---|
| public Map Deprecated use #getLoadQueryInfluencers instead Return the currently enabled filters. The filter map is keyed by filter
name, with values corresponding to the
| |
| getEntityMode | back to summary |
|---|---|
| public EntityMode getEntityMode() | |
| getEntityPersister | back to summary |
|---|---|
| public EntityPersister getEntityPersister(String entityName, Object object) throws HibernateException Get the EntityPersister for any instance | |
| getEntityUsingInterceptor | back to summary |
|---|---|
| public Object getEntityUsingInterceptor(EntityKey key) throws HibernateException Get the entity instance associated with the given Key, calling the Interceptor if necessary | |
| getFactory | back to summary |
|---|---|
| public SessionFactoryImplementor getFactory() Get the creating SessionFactoryImplementor | |
| getFetchProfile | back to summary |
|---|---|
| public String getFetchProfile()
Deprecated use #getLoadQueryInfluencers instead Get the internal fetch profile currently associated with this session.
| |
| getFilterParameterType | back to summary |
|---|---|
| public Type getFilterParameterType(String filterParameterName)
Deprecated use #getLoadQueryInfluencers instead Retreive the type for a given filter parrameter. | |
| getFilterParameterValue | back to summary |
|---|---|
| public Object getFilterParameterValue(String filterParameterName)
Deprecated use #getLoadQueryInfluencers instead Retreive the currently set value for a filter parameter. | |
| getFlushMode | back to summary |
|---|---|
| public FlushMode getFlushMode() | |
| getInterceptor | back to summary |
|---|---|
| public Interceptor getInterceptor() Retrieves the interceptor currently in use by this event source.
| |
| getJDBCContext | back to summary |
|---|---|
| public JDBCContext getJDBCContext() | |
| getListeners | back to summary |
|---|---|
| public EventListeners getListeners() Retrieves the configured event listeners from this event source.
| |
| getLoadQueryInfluencers | back to summary |
|---|---|
| public LoadQueryInfluencers getLoadQueryInfluencers() Get the load query influencers associated with this session.
| |
| getNamedQuery | back to summary |
|---|---|
| public Query getNamedQuery(String name) Get a Query instance for a named query or named native SQL query | |
| getNamedSQLQuery | back to summary |
|---|---|
| public Query getNamedSQLQuery(String name) Get a Query instance for a named native SQL query | |
| getNonFlushedChanges | back to summary |
|---|---|
| public NonFlushedChanges getNonFlushedChanges() throws HibernateException Return changes to this session that have not been flushed yet.
| |
| getPersistenceContext | back to summary |
|---|---|
| public PersistenceContext getPersistenceContext() Get the persistence context for this session | |
| getTimestamp | back to summary |
|---|---|
| public long getTimestamp() System time before the start of the transaction | |
| guessEntityName | back to summary |
|---|---|
| public String guessEntityName(Object entity) throws HibernateException The guessed entity name for an entity not in an association | |
| immediateLoad | back to summary |
|---|---|
| public Object immediateLoad(String entityName, Serializable id) throws HibernateException Load an instance immediately. This method is only called when lazily initializing a proxy. Do not return the proxy. | |
| initializeCollection | back to summary |
|---|---|
| public void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException Initialize the collection (if not already initialized) | |
| instantiate | back to summary |
|---|---|
| public Object instantiate(String entityName, Serializable id) throws HibernateException Instantiate the entity class, initializing with the given identifier | |
| internalLoad | back to summary |
|---|---|
| public Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException Load an instance without checking if it was deleted. When nullable is disabled this method may create a new proxy or return an existing proxy; if it does not exist, throw an exception. When nullable is enabled, the method does not create new proxies (but might return an existing proxy); if it does not exist, return null. When eager is enabled, the object is eagerly fetched | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Determine whether the session is closed. Provided seperately from
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() | |
| isEventSource | back to summary |
|---|---|
| public boolean isEventSource() | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() | |
| isTransactionInProgress | back to summary |
|---|---|
| public boolean isTransactionInProgress() Does this Session have an active Hibernate transaction or is there a JTA transaction in progress? | |
| iterate | back to summary |
|---|---|
| public Iterator Execute an iterate() query | |
| iterateFilter | back to summary |
|---|---|
| public Iterator Iterate a filter | |
| list | back to summary |
|---|---|
| public List Execute a find() query | |
| list | back to summary |
|---|---|
| public List Execute a criteria query | |
| list | back to summary |
|---|---|
| public List Execute a native SQL query, and return the results as a fully built list.
| |
| listCustomQuery | back to summary |
|---|---|
| public List Execute an SQL Query | |
| listFilter | back to summary |
|---|---|
| public List Execute a filter | |
| scroll | back to summary |
|---|---|
| public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException Execute a scroll() query | |
| scroll | back to summary |
|---|---|
| public ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode) Execute a criteria query | |
| scroll | back to summary |
|---|---|
| public ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException Execute a native SQL query, and return the results as a scrollable result.
| |
| scrollCustomQuery | back to summary |
|---|---|
| public ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException Execute an SQL Query | |
| setAutoClear | back to summary |
|---|---|
| public void setAutoClear(boolean enabled) Enable/disable automatic cache clearing from after transaction completion (for EJB3) | |
| setCacheMode | back to summary |
|---|---|
| public void setCacheMode(CacheMode cm) | |
| setFetchProfile | back to summary |
|---|---|
| public void setFetchProfile(String name)
Deprecated use #getLoadQueryInfluencers instead Set the current internal fetch profile for this session.
| |
| setFlushMode | back to summary |
|---|---|
| public void setFlushMode(FlushMode fm) | |