org.hibernate.impl

Class AbstractSessionImpl

Implemented Interfaces:
Serializable, SessionImplementor
Known Direct Subclasses:
SessionImpl, StatelessSessionImpl

public abstract class AbstractSessionImpl
extends java.lang.Object
implements SessionImplementor

Functionality common to stateless and stateful sessions
Author:
Gavin King

Field Summary

protected SessionFactoryImpl
factory

Constructor Summary

AbstractSessionImpl(SessionFactoryImpl factory)

Method Summary

Query
createQuery(String queryString)
SQLQuery
createSQLQuery(String sql)
protected void
errorIfClosed()
SessionFactoryImplementor
getFactory()
protected HQLQueryPlan
getHQLQueryPlan(String query, boolean shallow)
Query
getNamedQuery(String queryName)
Query
getNamedSQLQuery(String queryName)
protected NativeSQLQueryPlan
getNativeSQLQueryPlan(NativeSQLQuerySpecification spec)
boolean
isClosed()
List
list(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
ScrollableResults
scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
protected void
setClosed()

Field Details

factory

protected SessionFactoryImpl factory

Constructor Details

AbstractSessionImpl

protected AbstractSessionImpl(SessionFactoryImpl factory)

Method Details

createQuery

public Query createQuery(String queryString)

createSQLQuery

public SQLQuery createSQLQuery(String sql)

errorIfClosed

protected void errorIfClosed()

getFactory

public SessionFactoryImplementor getFactory()
Specified by:
getFactory in interface SessionImplementor

getHQLQueryPlan

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

getNamedQuery

public Query getNamedQuery(String queryName)
            throws MappingException
Specified by:
getNamedQuery in interface SessionImplementor

getNamedSQLQuery

public Query getNamedSQLQuery(String queryName)
            throws MappingException
Specified by:
getNamedSQLQuery in interface SessionImplementor

getNativeSQLQueryPlan

protected NativeSQLQueryPlan getNativeSQLQueryPlan(NativeSQLQuerySpecification spec)
            throws HibernateException

isClosed

public boolean isClosed()
Specified by:
isClosed in interface SessionImplementor

list

public List list(NativeSQLQuerySpecification spec,
                 QueryParameters queryParameters)
            throws HibernateException
Specified by:
list in interface SessionImplementor

scroll

public ScrollableResults scroll(NativeSQLQuerySpecification spec,
                                QueryParameters queryParameters)
            throws HibernateException
Specified by:
scroll in interface SessionImplementor

setClosed

protected void setClosed()