Methods Summary |
---|
public void | afterScrollOperation()
|
public void | afterTransactionCompletion(boolean successful, org.hibernate.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(org.hibernate.Transaction tx)Notify the session that the transaction is about to complete
|
public java.lang.String | bestGuessEntityName(java.lang.Object object)The best guess entity name for an entity not in an association
|
public java.sql.Connection | connection()
|
public int | executeNativeUpdate(org.hibernate.engine.query.sql.NativeSQLQuerySpecification specification, QueryParameters queryParameters)Execute a native SQL update or delete query
|
public int | executeUpdate(java.lang.String query, QueryParameters queryParameters)Execute a HQL update or delete query
|
public void | flush()
|
public org.hibernate.jdbc.Batcher | getBatcher()Get the prepared statement Batcher for this session
|
public org.hibernate.CacheMode | getCacheMode()
|
public java.io.Serializable | getContextEntityIdentifier(java.lang.Object object)Return the identifier of the persistent object, or null if
not associated with the session
|
public int | getDontFlushFromFind()
|
public java.util.Map | getEnabledFilters()Return the currently enabled filters. The filter map is keyed by filter
name, with values corresponding to the {@link org.hibernate.impl.FilterImpl}
instance.
|
public org.hibernate.EntityMode | getEntityMode()
|
public org.hibernate.persister.entity.EntityPersister | getEntityPersister(java.lang.String entityName, java.lang.Object object)Get the EntityPersister for any instance
|
public java.lang.Object | getEntityUsingInterceptor(EntityKey key)Get the entity instance associated with the given Key,
calling the Interceptor if necessary
|
public SessionFactoryImplementor | getFactory()Get the creating SessionFactoryImplementor
|
public java.lang.String | getFetchProfile()
|
public org.hibernate.type.Type | getFilterParameterType(java.lang.String filterParameterName)Retreive the type for a given filter parrameter.
|
public java.lang.Object | getFilterParameterValue(java.lang.String filterParameterName)Retreive the currently set value for a filter parameter.
|
public org.hibernate.FlushMode | getFlushMode()
|
public org.hibernate.Interceptor | getInterceptor()Retrieves the interceptor currently in use by this event source.
|
public org.hibernate.jdbc.JDBCContext | getJDBCContext()
|
public org.hibernate.event.EventListeners | getListeners()Retrieves the configured event listeners from this event source.
|
public org.hibernate.Query | getNamedQuery(java.lang.String name)Get a Query instance for a named query or named native SQL query
|
public org.hibernate.Query | getNamedSQLQuery(java.lang.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 java.lang.String | guessEntityName(java.lang.Object entity)The guessed entity name for an entity not in an association
|
public java.lang.Object | immediateLoad(java.lang.String entityName, java.io.Serializable id)Load an instance immediately. This method is only called when lazily initializing a proxy.
Do not return the proxy.
|
public void | initializeCollection(org.hibernate.collection.PersistentCollection collection, boolean writing)Initialize the collection (if not already initialized)
|
public java.lang.Object | instantiate(java.lang.String entityName, java.io.Serializable id)Instantiate the entity class, initializing with the given identifier
|
public java.lang.Object | internalLoad(java.lang.String entityName, java.io.Serializable id, boolean eager, boolean nullable)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
{@link #isOpen()} as this method does not attempt any JTA synch
registration, where as {@link #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 java.util.Iterator | iterate(java.lang.String query, QueryParameters queryParameters)Execute an iterate() query
|
public java.util.Iterator | iterateFilter(java.lang.Object collection, java.lang.String filter, QueryParameters queryParameters)Iterate a filter
|
public java.util.List | list(java.lang.String query, QueryParameters queryParameters)Execute a find() query
|
public java.util.List | list(org.hibernate.impl.CriteriaImpl criteria)Execute a criteria query
|
public java.util.List | list(org.hibernate.engine.query.sql.NativeSQLQuerySpecification spec, QueryParameters queryParameters)Execute a native SQL query, and return the results as a fully built list.
|
public java.util.List | listCustomQuery(org.hibernate.loader.custom.CustomQuery customQuery, QueryParameters queryParameters)Execute an SQL Query
|
public java.util.List | listFilter(java.lang.Object collection, java.lang.String filter, QueryParameters queryParameters)Execute a filter
|
public org.hibernate.ScrollableResults | scroll(java.lang.String query, QueryParameters queryParameters)Execute a scroll() query
|
public org.hibernate.ScrollableResults | scroll(org.hibernate.impl.CriteriaImpl criteria, org.hibernate.ScrollMode scrollMode)Execute a criteria query
|
public org.hibernate.ScrollableResults | scroll(org.hibernate.engine.query.sql.NativeSQLQuerySpecification spec, QueryParameters queryParameters)Execute a native SQL query, and return the results as a scrollable result.
|
public org.hibernate.ScrollableResults | scrollCustomQuery(org.hibernate.loader.custom.CustomQuery customQuery, QueryParameters queryParameters)Execute an SQL Query
|
public void | setAutoClear(boolean enabled)Enable/disable automatic cache clearing from after transaction
completion (for EJB3)
|
public void | setCacheMode(org.hibernate.CacheMode cm)
|
public void | setFetchProfile(java.lang.String name)
|
public void | setFlushMode(org.hibernate.FlushMode fm)
|