Package org.hibernate.impl
Class AbstractSessionImpl
java.lang.Object
org.hibernate.impl.AbstractSessionImpl
- All Implemented Interfaces:
Serializable,SessionImplementor
- Direct Known Subclasses:
SessionImpl,StatelessSessionImpl
Functionality common to stateless and stateful sessions
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateQuery(String queryString) createSQLQuery(String sql) protected voidGet the creating SessionFactoryImplementorprotected HQLQueryPlangetHQLQueryPlan(String query, boolean shallow) getNamedQuery(String queryName) Get a Query instance for a named query or named native SQL querygetNamedSQLQuery(String queryName) Get a Query instance for a named native SQL queryprotected NativeSQLQueryPlanbooleanisClosed()Determine whether the session is closed.list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) Execute a native SQL query, and return the results as a fully built list.scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) Execute a native SQL query, and return the results as a scrollable result.protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
factory
-
-
Constructor Details
-
AbstractSessionImpl
-
-
Method Details
-
getFactory
Description copied from interface:SessionImplementorGet the creating SessionFactoryImplementor- Specified by:
getFactoryin interfaceSessionImplementor
-
isClosed
public boolean isClosed()Description copied from interface:SessionImplementorDetermine whether the session is closed. Provided seperately fromSessionImplementor.isOpen()as this method does not attempt any JTA synch registration, where asSessionImplementor.isOpen()does; which makes this one nicer to use for most internal purposes.- Specified by:
isClosedin interfaceSessionImplementor- Returns:
- True if the session is closed; false otherwise.
-
setClosed
protected void setClosed() -
errorIfClosed
protected void errorIfClosed() -
getNamedQuery
Description copied from interface:SessionImplementorGet a Query instance for a named query or named native SQL query- Specified by:
getNamedQueryin interfaceSessionImplementor- Throws:
MappingException
-
getNamedSQLQuery
Description copied from interface:SessionImplementorGet a Query instance for a named native SQL query- Specified by:
getNamedSQLQueryin interfaceSessionImplementor- Throws:
MappingException
-
createQuery
-
createSQLQuery
-
getHQLQueryPlan
- 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:SessionImplementorExecute a native SQL query, and return the results as a fully built list.- Specified by:
listin interfaceSessionImplementor- 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:SessionImplementorExecute a native SQL query, and return the results as a scrollable result.- Specified by:
scrollin interfaceSessionImplementor- 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
-