| org.hibernate.engine.SessionImplementor
All known Subclasses: org.hibernate.impl.AbstractSessionImpl,
SessionImplementor | public interface SessionImplementor extends Serializable(Code) | | Defines the internal contract between the Session and other parts of
Hibernate such as implementors of Type or EntityPersister.
See Also: org.hibernate.Session See Also: the interface to the application See Also: org.hibernate.impl.SessionImpl See Also: the actual implementation author: Gavin King |
Method Summary | |
public void | afterScrollOperation() | public void | afterTransactionCompletion(boolean successful, Transaction tx) Notify the session that the transaction completed, so we no longer
own the old locks. | public void | beforeTransactionCompletion(Transaction tx) | public String | bestGuessEntityName(Object object) | public Connection | connection() | int | executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters) | int | executeUpdate(String query, QueryParameters queryParameters) | public void | flush() | public Batcher | getBatcher() | public CacheMode | getCacheMode() | public Serializable | getContextEntityIdentifier(Object object) | public int | getDontFlushFromFind() | public Map | getEnabledFilters() Return the currently enabled filters. | public EntityMode | getEntityMode() | public EntityPersister | getEntityPersister(String entityName, Object object) | public Object | getEntityUsingInterceptor(EntityKey key) | public SessionFactoryImplementor | getFactory() | public String | getFetchProfile() | public Type | getFilterParameterType(String filterParameterName) Retreive the type for a given filter parrameter. | public Object | getFilterParameterValue(String filterParameterName) Retreive the currently set value for a filter parameter.
Parameters: filterParameterName - The filter parameter name in the format{FILTER_NAME.PARAMETER_NAME}. | public FlushMode | getFlushMode() | public Interceptor | getInterceptor() Retrieves the interceptor currently in use by this event source. | public JDBCContext | getJDBCContext() | public EventListeners | getListeners() Retrieves the configured event listeners from this event source. | public Query | getNamedQuery(String name) | public Query | getNamedSQLQuery(String name) | public PersistenceContext | getPersistenceContext() | public long | getTimestamp() | public String | guessEntityName(Object entity) | public Object | immediateLoad(String entityName, Serializable id) Load an instance immediately. | public void | initializeCollection(PersistentCollection collection, boolean writing) | public Object | instantiate(String entityName, Serializable id) | public Object | internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) Load an instance without checking if it was deleted. | public boolean | isClosed() Determine whether the session is closed. | public boolean | isConnected() | public boolean | isEventSource() | public boolean | isOpen() | public boolean | isTransactionInProgress() | public Iterator | iterate(String query, QueryParameters queryParameters) | public Iterator | iterateFilter(Object collection, String filter, QueryParameters queryParameters) | public List | list(String query, QueryParameters queryParameters) | public List | list(CriteriaImpl criteria) | public List | list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) Execute a native SQL query, and return the results as a fully built list.
Parameters: spec - The specification of the native SQL query to execute. Parameters: queryParameters - The parameters by which to perform the execution. | public List | listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) | public List | listFilter(Object collection, String filter, QueryParameters queryParameters) | public ScrollableResults | scroll(String query, QueryParameters queryParameters) | public ScrollableResults | scroll(CriteriaImpl criteria, ScrollMode scrollMode) | public ScrollableResults | scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) Execute a native SQL query, and return the results as a scrollable result.
Parameters: spec - The specification of the native SQL query to execute. Parameters: queryParameters - The parameters by which to perform the execution. | public ScrollableResults | scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) | public void | setAutoClear(boolean enabled) | public void | setCacheMode(CacheMode cm) | public void | setFetchProfile(String name) | public void | setFlushMode(FlushMode fm) |
afterScrollOperation | public void afterScrollOperation()(Code) | | |
afterTransactionCompletion | public void afterTransactionCompletion(boolean successful, Transaction tx)(Code) | | 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)(Code) | | Notify the session that the transaction is about to complete
|
bestGuessEntityName | public String bestGuessEntityName(Object object)(Code) | | The best guess entity name for an entity not in an association
|
flush | public void flush()(Code) | | |
getBatcher | public Batcher getBatcher()(Code) | | Get the prepared statement Batcher for this session
|
getContextEntityIdentifier | public Serializable getContextEntityIdentifier(Object object)(Code) | | Return the identifier of the persistent object, or null if
not associated with the session
|
getDontFlushFromFind | public int getDontFlushFromFind()(Code) | | |
getEnabledFilters | public Map getEnabledFilters()(Code) | | Return the currently enabled filters. The filter map is keyed by filter
name, with values corresponding to the
org.hibernate.impl.FilterImpl instance.
The currently enabled filters. |
getEntityUsingInterceptor | public Object getEntityUsingInterceptor(EntityKey key) throws HibernateException(Code) | | Get the entity instance associated with the given Key,
calling the Interceptor if necessary
|
getFilterParameterType | public Type getFilterParameterType(String filterParameterName)(Code) | | Retreive the type for a given filter parrameter.
Parameters: filterParameterName - The filter parameter name in the format{FILTER_NAME.PARAMETER_NAME}. |
getFilterParameterValue | public Object getFilterParameterValue(String filterParameterName)(Code) | | Retreive the currently set value for a filter parameter.
Parameters: filterParameterName - The filter parameter name in the format{FILTER_NAME.PARAMETER_NAME}. The filter parameter value. |
getInterceptor | public Interceptor getInterceptor()(Code) | | Retrieves the interceptor currently in use by this event source.
The interceptor. |
getListeners | public EventListeners getListeners()(Code) | | Retrieves the configured event listeners from this event source.
The configured event listeners. |
getNamedQuery | public Query getNamedQuery(String name)(Code) | | Get a Query instance for a named query or named native SQL query
|
getNamedSQLQuery | public Query getNamedSQLQuery(String name)(Code) | | Get a Query instance for a named native SQL query
|
getPersistenceContext | public PersistenceContext getPersistenceContext()(Code) | | Get the persistence context for this session
|
getTimestamp | public long getTimestamp()(Code) | | System time before the start of the transaction
|
internalLoad | public Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException(Code) | | 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()(Code) | | Determine whether the session is closed. Provided seperately from
SessionImplementor.isOpen() as this method does not attempt any JTA synch
registration, where as
SessionImplementor.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()(Code) | | |
isEventSource | public boolean isEventSource()(Code) | | |
isOpen | public boolean isOpen()(Code) | | |
isTransactionInProgress | public boolean isTransactionInProgress()(Code) | | Does this Session have an active Hibernate transaction
or is there a JTA transaction in progress?
|
setAutoClear | public void setAutoClear(boolean enabled)(Code) | | Enable/disable automatic cache clearing from after transaction
completion (for EJB3)
|
setFetchProfile | public void setFetchProfile(String name)(Code) | | |
|
|