afterScrollOperation
public void afterScrollOperation()
afterTransactionCompletion
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.
beforeTransactionCompletion
public void beforeTransactionCompletion(Transaction tx)
Notify the session that the transaction is about to complete
bestGuessEntityName
public String bestGuessEntityName(Object object)
The best guess entity name for an entity not in an association
connection
public Connection connection()
getBatcher
public Batcher getBatcher()
Get the prepared statement Batcher for this session
getContextEntityIdentifier
public Serializable getContextEntityIdentifier(Object object)
Return the identifier of the persistent object, or null if
not associated with the session
getDontFlushFromFind
public int getDontFlushFromFind()
getEnabledFilters
public Map getEnabledFilters()
Return the currently enabled filters. The filter map is keyed by filter
name, with values corresponding to the
FilterImpl
instance.
- The currently enabled filters.
getEntityPersister
public EntityPersister getEntityPersister(String entityName,
Object object)
throws HibernateException
Get the EntityPersister for any instance
entityName
- optional entity nameobject
- the entity instance
getEntityUsingInterceptor
public Object getEntityUsingInterceptor(EntityKey key)
throws HibernateException
Get the entity instance associated with the given Key,
calling the Interceptor if necessary
getFetchProfile
public String getFetchProfile()
getFilterParameterType
public Type getFilterParameterType(String filterParameterName)
Retreive the type for a given filter parrameter.
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
getFilterParameterValue
public Object getFilterParameterValue(String filterParameterName)
Retreive the currently set value for a filter parameter.
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
- The filter parameter value.
getInterceptor
public Interceptor getInterceptor()
Retrieves the interceptor currently in use by this event source.
getListeners
public EventListeners getListeners()
Retrieves the configured event listeners from this event source.
- The configured event listeners.
getNamedQuery
public Query getNamedQuery(String name)
Get a Query instance for a named query or named native SQL query
getNamedSQLQuery
public Query getNamedSQLQuery(String name)
Get a Query instance for a named native SQL query
getPersistenceContext
public PersistenceContext getPersistenceContext()
Get the persistence context for this session
getTimestamp
public long getTimestamp()
System time before the start of the transaction
guessEntityName
public String guessEntityName(Object entity)
throws HibernateException
The guessed entity name for an entity not in an association
immediateLoad
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.
instantiate
public Object instantiate(String entityName,
Serializable id)
throws HibernateException
Instantiate the entity class, initializing with the given identifier
internalLoad
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
public boolean isClosed()
Determine whether the session is closed. Provided seperately from
isOpen()
as this method does not attempt any JTA synch
registration, where as
isOpen()
does; which makes this one
nicer to use for most internal purposes.
- True if the session is closed; false otherwise.
isConnected
public boolean isConnected()
isEventSource
public boolean isEventSource()
isOpen
public boolean isOpen()
isTransactionInProgress
public boolean isTransactionInProgress()
Does this Session have an active Hibernate transaction
or is there a JTA transaction in progress?
list
public List list(NativeSQLQuerySpecification spec,
QueryParameters queryParameters)
throws HibernateException
Execute a native SQL query, and return the results as a fully built list.
spec
- The specification of the native SQL query to execute.queryParameters
- The parameters by which to perform the execution.
list
public List list(CriteriaImpl criteria)
Execute a criteria query
setAutoClear
public void setAutoClear(boolean enabled)
Enable/disable automatic cache clearing from after transaction
completion (for EJB3)
setCacheMode
public void setCacheMode(CacheMode cm)
setFetchProfile
public void setFetchProfile(String name)
setFlushMode
public void setFlushMode(FlushMode fm)