Home » Hibernate-3.3.2.GA » org.hibernate » engine » [javadoc | source]
org.hibernate.engine
public interface: SessionImplementor [javadoc | source]

All Implemented Interfaces:
    Serializable

All Known Implementing Classes:
    SessionImpl, AbstractSessionImpl, EventSource, StatelessSessionImpl

Defines the internal contract between the Session and other parts of Hibernate such as implementors of Type or EntityPersister.
Method from org.hibernate.engine.SessionImplementor Summary:
afterScrollOperation,   afterTransactionCompletion,   beforeTransactionCompletion,   bestGuessEntityName,   connection,   executeNativeUpdate,   executeUpdate,   flush,   getBatcher,   getCacheMode,   getContextEntityIdentifier,   getDontFlushFromFind,   getEnabledFilters,   getEntityMode,   getEntityPersister,   getEntityUsingInterceptor,   getFactory,   getFetchProfile,   getFilterParameterType,   getFilterParameterValue,   getFlushMode,   getInterceptor,   getJDBCContext,   getListeners,   getNamedQuery,   getNamedSQLQuery,   getPersistenceContext,   getTimestamp,   guessEntityName,   immediateLoad,   initializeCollection,   instantiate,   internalLoad,   isClosed,   isConnected,   isEventSource,   isOpen,   isTransactionInProgress,   iterate,   iterateFilter,   list,   list,   list,   listCustomQuery,   listFilter,   scroll,   scroll,   scroll,   scrollCustomQuery,   setAutoClear,   setCacheMode,   setFetchProfile,   setFlushMode
Method from org.hibernate.engine.SessionImplementor Detail:
 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. (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.
 public  void beforeTransactionCompletion(Transaction tx)
    Notify the session that the transaction is about to complete
 public String bestGuessEntityName(Object object)
    The best guess entity name for an entity not in an association
 public Connection connection()
 public int executeNativeUpdate(NativeSQLQuerySpecification specification,
    QueryParameters queryParameters) throws HibernateException
    Execute a native SQL update or delete query
 public int executeUpdate(String query,
    QueryParameters queryParameters) throws HibernateException
    Execute a HQL update or delete query
 public  void flush()
 public Batcher getBatcher()
    Get the prepared statement Batcher for this session
 public CacheMode getCacheMode()
 public Serializable getContextEntityIdentifier(Object object)
    Return the identifier of the persistent object, or null if not associated with the session
 public int getDontFlushFromFind()
 public Map getEnabledFilters()
    Return the currently enabled filters. The filter map is keyed by filter name, with values corresponding to the org.hibernate.impl.FilterImpl instance.
 public EntityMode getEntityMode()
 public EntityPersister getEntityPersister(String entityName,
    Object object) throws HibernateException
    Get the EntityPersister for any instance
 public Object getEntityUsingInterceptor(EntityKey key) throws HibernateException
    Get the entity instance associated with the given Key, calling the Interceptor if necessary
 public SessionFactoryImplementor getFactory()
    Get the creating SessionFactoryImplementor
 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.
 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)
    Get a Query instance for a named query or named native SQL query
 public Query getNamedSQLQuery(String name)
    Get a Query instance for a named native SQL query
 public PersistenceContext getPersistenceContext()
    Get the persistence context for this session
 public long getTimestamp()
    System time before the start of the transaction
 public String guessEntityName(Object entity) throws HibernateException
    The guessed entity name for an entity not in an association
 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.
 public  void initializeCollection(PersistentCollection collection,
    boolean writing) throws HibernateException
    Initialize the collection (if not already initialized)
 public Object instantiate(String entityName,
    Serializable id) throws HibernateException
    Instantiate the entity class, initializing with the given identifier
 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
 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.
 public boolean isConnected()
 public boolean isEventSource()
 public boolean isOpen()
 public boolean isTransactionInProgress()
    Does this Session have an active Hibernate transaction or is there a JTA transaction in progress?
 public Iterator iterate(String query,
    QueryParameters queryParameters) throws HibernateException
    Execute an iterate() query
 public Iterator iterateFilter(Object collection,
    String filter,
    QueryParameters queryParameters) throws HibernateException
    Iterate a filter
 public List list(CriteriaImpl criteria)
    Execute a criteria query
 public List list(String query,
    QueryParameters queryParameters) throws HibernateException
    Execute a find() query
 public List list(NativeSQLQuerySpecification spec,
    QueryParameters queryParameters) throws HibernateException
    Execute a native SQL query, and return the results as a fully built list.
 public List listCustomQuery(CustomQuery customQuery,
    QueryParameters queryParameters) throws HibernateException
    Execute an SQL Query
 public List listFilter(Object collection,
    String filter,
    QueryParameters queryParameters) throws HibernateException
    Execute a filter
 public ScrollableResults scroll(String query,
    QueryParameters queryParameters) throws HibernateException
    Execute a scroll() query
 public ScrollableResults scroll(CriteriaImpl criteria,
    ScrollMode scrollMode)
    Execute a criteria query
 public ScrollableResults scroll(NativeSQLQuerySpecification spec,
    QueryParameters queryParameters) throws HibernateException
    Execute a native SQL query, and return the results as a scrollable result.
 public ScrollableResults scrollCustomQuery(CustomQuery customQuery,
    QueryParameters queryParameters) throws HibernateException
    Execute an SQL Query
 public  void setAutoClear(boolean enabled)
    Enable/disable automatic cache clearing from after transaction completion (for EJB3)
 public  void setCacheMode(CacheMode cm)
 public  void setFetchProfile(String name)
 public  void setFlushMode(FlushMode fm)