Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.impl
Class AbstractSessionImpl

    java.lang.Object
      org.hibernate.impl.AbstractSessionImpl

All Implemented Interfaces:
  Serializable, SessionImplementor

Direct Known Subclasses:
  SessionImpl, StatelessSessionImpl

    public abstract class AbstractSessionImpl

extends Object
implements SessionImplementor

Functionality common to stateless and stateful sessions

Author:
  Gavin King
See Also:
  Serialized Form

Field Summary
`protected SessionFactoryImpl` | `factory`

Constructor Summary
`protected` | `AbstractSessionImpl(SessionFactoryImpl factory)`

Method Summary
`Query` | `createQuery(String queryString)`
`SQLQuery` | `createSQLQuery(String sql)`
`protected void` | `errorIfClosed()`
`SessionFactoryImplementor` | `getFactory()` Get the creating `SessionFactoryImplementor`
`protected HQLQueryPlan` | `getHQLQueryPlan(String query, boolean shallow)`
`Query` | `getNamedQuery(String queryName)` Get a Query instance for a named query or named native SQL query
`Query` | `getNamedSQLQuery(String queryName)` Get a Query instance for a named native SQL query
`protected NativeSQLQueryPlan` | `getNativeSQLQueryPlan(NativeSQLQuerySpecification spec)`
`boolean` | `isClosed()` Determine whether the session is closed.
`List` | `list(NativeSQLQuerySpecification spec, QueryParameters queryParameters)` Execute a native SQL query, and return the results as a fully built list.
`ScrollableResults` | `scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters)` Execute a native SQL query, and return the results as a scrollable result.
`protected void` | `setClosed()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.hibernate.engine.SessionImplementor
`afterScrollOperation, afterTransactionCompletion, applyNonFlushedChanges, beforeTransactionCompletion, bestGuessEntityName, connection, executeNativeUpdate, executeUpdate, flush, getBatcher, getCacheMode, getContextEntityIdentifier, getDontFlushFromFind, getEnabledFilters, getEntityMode, getEntityPersister, getEntityUsingInterceptor, getFetchProfile, getFilterParameterType, getFilterParameterValue, getFlushMode, getInterceptor, getJDBCContext, getListeners, getLoadQueryInfluencers, getNonFlushedChanges, getPersistenceContext, getTimestamp, guessEntityName, immediateLoad, initializeCollection, instantiate, internalLoad, isConnected, isEventSource, isOpen, isTransactionInProgress, iterate, iterateFilter, list, list, listCustomQuery, listFilter, scroll, scroll, scrollCustomQuery, setAutoClear, setCacheMode, setFetchProfile, setFlushMode`

Field Detail

### factory

    protected transient SessionFactoryImpl factory

Constructor Detail

### AbstractSessionImpl

    protected AbstractSessionImpl(SessionFactoryImpl factory)

Method Detail

### getFactory

    public SessionFactoryImplementor getFactory()

  Description copied from interface: `SessionImplementor`
  Get the creating `SessionFactoryImplementor`

  Specified by:
    `getFactory` in interface `SessionImplementor`

### isClosed

    public boolean isClosed()

  Description copied from interface: `SessionImplementor`
  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.

  Specified by:
    `isClosed` in interface `SessionImplementor`
  Returns:
    True if the session is closed; false otherwise.

### setClosed

    protected void setClosed()

### errorIfClosed

    protected void errorIfClosed()

### getNamedQuery

    public Query getNamedQuery(String queryName)
                        throws MappingException

  Description copied from interface: `SessionImplementor`
  Get a Query instance for a named query or named native SQL query

  Specified by:
    `getNamedQuery` in interface `SessionImplementor`
  Throws:
    `MappingException`

### getNamedSQLQuery

    public Query getNamedSQLQuery(String queryName)
                           throws MappingException

  Description copied from interface: `SessionImplementor`
  Get a Query instance for a named native SQL query

  Specified by:
    `getNamedSQLQuery` in interface `SessionImplementor`
  Throws:
    `MappingException`

### createQuery

    public Query createQuery(String queryString)

### createSQLQuery

    public SQLQuery createSQLQuery(String sql)

### getHQLQueryPlan

    protected HQLQueryPlan getHQLQueryPlan(String query,
                                           boolean shallow)
                                    throws HibernateException

  Throws:
    `HibernateException`

### getNativeSQLQueryPlan

    protected NativeSQLQueryPlan getNativeSQLQueryPlan(NativeSQLQuerySpecification spec)
                                                throws HibernateException

  Throws:
    `HibernateException`

### list

    public List list(NativeSQLQuerySpecification spec,
                     QueryParameters queryParameters)
              throws HibernateException

  Description copied from interface: `SessionImplementor`
  Execute a native SQL query, and return the results as a fully built list.

  Specified by:
    `list` in interface `SessionImplementor`
  Parameters:
    `spec` - The specification of the native SQL query to execute.
    `queryParameters` - The parameters by which to perform the execution.
  Returns:
    The result list.
  Throws:
    `HibernateException`

### scroll

    public ScrollableResults scroll(NativeSQLQuerySpecification spec,
                                    QueryParameters queryParameters)
                             throws HibernateException

  Description copied from interface: `SessionImplementor`
  Execute a native SQL query, and return the results as a scrollable result.

  Specified by:
    `scroll` in interface `SessionImplementor`
  Parameters:
    `spec` - The specification of the native SQL query to execute.
    `queryParameters` - The parameters by which to perform the execution.
  Returns:
    The resulting scrollable result.
  Throws:
    `HibernateException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.