Top Description Fields Constructors Methods
org.hibernate.impl

public abstract Class AbstractSessionImpl

extends Object
implements SessionImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.SessionImplementor, java.io.Serializable
Known Direct Subclasses
org.hibernate.impl.SessionImpl, org.hibernate.impl.StatelessSessionImpl
Imports
org.hibernate.MappingException, .Query, .SQLQuery, .HibernateException, .ScrollableResults, .SessionException, org.hibernate.engine.query.sql.NativeSQLQuerySpecification, org.hibernate.engine.NamedQueryDefinition, .NamedSQLQueryDefinition, .SessionImplementor, .QueryParameters, .SessionFactoryImplementor, org.hibernate.engine.query.HQLQueryPlan, .NativeSQLQueryPlan, java.util.List

Functionality common to stateless and stateful sessions
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean
protected transient SessionFactoryImpl

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public Query
createQuery(String queryString)

public SQLQuery
protected void
public SessionFactoryImplementor
getFactory()

Implements org.hibernate.engine.SessionImplementor.getFactory.

Get the creating SessionFactoryImplementor
protected HQLQueryPlan
getHQLQueryPlan(String query, boolean shallow)

public Query
getNamedQuery(String queryName)

Implements org.hibernate.engine.SessionImplementor.getNamedQuery.

Get a Query instance for a named query or named native SQL query
public Query
getNamedSQLQuery(String queryName)

Implements org.hibernate.engine.SessionImplementor.getNamedSQLQuery.

Get a Query instance for a named native SQL query
protected NativeSQLQueryPlan
private void
public boolean
isClosed()

Implements org.hibernate.engine.SessionImplementor.isClosed.

Determine whether the session is closed.
public List<E>
list(NativeSQLQuerySpecification
The specification of the native SQL query to execute.
spec
,
QueryParameters
The parameters by which to perform the execution.
queryParameters
)

Implements org.hibernate.engine.SessionImplementor.list.

Execute a native SQL query, and return the results as a fully built list.
public ScrollableResults
scroll(NativeSQLQuerySpecification
The specification of the native SQL query to execute.
spec
,
QueryParameters
The parameters by which to perform the execution.
queryParameters
)

Implements org.hibernate.engine.SessionImplementor.scroll.

Execute a native SQL query, and return the results as a scrollable result.
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closedback to summary
private boolean closed
factoryback to summary
protected transient SessionFactoryImpl factory

Constructor Detail

AbstractSessionImplback to summary
protected AbstractSessionImpl(SessionFactoryImpl factory)

Method Detail

createQueryback to summary
public Query createQuery(String queryString)
createSQLQueryback to summary
public SQLQuery createSQLQuery(String sql)
errorIfClosedback to summary
protected void errorIfClosed()
getFactoryback to summary
public SessionFactoryImplementor getFactory()

Implements org.hibernate.engine.SessionImplementor.getFactory.

Doc from org.hibernate.engine.SessionImplementor.getFactory.

Get the creating SessionFactoryImplementor

getHQLQueryPlanback to summary
protected HQLQueryPlan getHQLQueryPlan(String query, boolean shallow) throws HibernateException
getNamedQueryback to summary
public Query getNamedQuery(String queryName) throws MappingException

Implements org.hibernate.engine.SessionImplementor.getNamedQuery.

Doc from org.hibernate.engine.SessionImplementor.getNamedQuery.

Get a Query instance for a named query or named native SQL query

getNamedSQLQueryback to summary
public Query getNamedSQLQuery(String queryName) throws MappingException

Implements org.hibernate.engine.SessionImplementor.getNamedSQLQuery.

Doc from org.hibernate.engine.SessionImplementor.getNamedSQLQuery.

Get a Query instance for a named native SQL query

getNativeSQLQueryPlanback to summary
protected NativeSQLQueryPlan getNativeSQLQueryPlan(NativeSQLQuerySpecification spec) throws HibernateException
initQueryback to summary
private void initQuery(Query query, NamedQueryDefinition nqd)
isClosedback to summary
public boolean isClosed()

Implements org.hibernate.engine.SessionImplementor.isClosed.

Doc from org.hibernate.engine.SessionImplementor.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.

Returns:boolean

True if the session is closed; false otherwise.

listback to summary
public List<E> list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException

Implements org.hibernate.engine.SessionImplementor.list.

Doc from org.hibernate.engine.SessionImplementor.list.

Execute a native SQL query, and return the results as a fully built list.

Parameters
spec:NativeSQLQuerySpecification

The specification of the native SQL query to execute.

queryParameters:QueryParameters

The parameters by which to perform the execution.

Returns:List<E>

The result list.

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

Implements org.hibernate.engine.SessionImplementor.scroll.

Doc from org.hibernate.engine.SessionImplementor.scroll.

Execute a native SQL query, and return the results as a scrollable result.

Parameters
spec:NativeSQLQuerySpecification

The specification of the native SQL query to execute.

queryParameters:QueryParameters

The parameters by which to perform the execution.

Returns:ScrollableResults

The resulting scrollable result.

setClosedback to summary
protected void setClosed()