The IEventSource type exposes the following members.
Methods
Name | Description | |
---|---|---|
AfterTransactionBegin |
Notify the session that an NHibernate transaction has begun.
(Inherited from ISessionImplementor.) | |
AfterTransactionCompletion |
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.
(Inherited from ISessionImplementor.) | |
BeforeTransactionCompletion |
Notify the session that the transaction is about to complete
(Inherited from ISessionImplementor.) | |
BeginTransaction()()()() |
Begin a unit of work and return the associated ITransaction object.
(Inherited from ISession.) | |
BeginTransaction(IsolationLevel) |
Begin a transaction with the specified isolationLevel (Inherited from ISession.) | |
BestGuessEntityName | The best guess entity name for an entity not in an association (Inherited from ISessionImplementor.) | |
CancelQuery |
Cancel execution of the current query.
(Inherited from ISession.) | |
Clear |
Completely clear the session. Evict all loaded instances and cancel all pending
saves, updates and deletions. Do not close open enumerables or instances of
ScrollableResults.
(Inherited from ISession.) | |
Close |
End the ISession by disconnecting from the ADO.NET connection and cleaning up.
(Inherited from ISession.) | |
CloseSessionFromDistributedTransaction | (Inherited from ISessionImplementor.) | |
Contains |
Is this instance associated with this Session?
(Inherited from ISession.) | |
CreateCriteria(String) |
Create a new Criteria instance, for the given entity name.
(Inherited from ISession.) | |
CreateCriteria(Type) |
Creates a new Criteria for the entity class.
(Inherited from ISession.) | |
CreateCriteria(String, String) |
Create a new Criteria instance, for the given entity name,
with the given alias.
(Inherited from ISession.) | |
CreateCriteria(Type, String) |
Creates a new Criteria for the entity class with a specific alias
(Inherited from ISession.) | |
CreateCriteria<(Of <<'(T>)>>)()()()() |
Creates a new Criteria for the entity class.
(Inherited from ISession.) | |
CreateCriteria<(Of <<'(T>)>>)(String) |
Creates a new Criteria for the entity class with a specific alias
(Inherited from ISession.) | |
CreateFilter |
Create a new instance of Query for the given collection and filter string
(Inherited from ISession.) | |
CreateMultiCriteria |
An IMultiCriteria that can return a list of all the results
of all the criterias.
(Inherited from ISession.) | |
CreateMultiQuery |
Create a multi query, a query that can send several
queries to the server, and return all their results in a single
call.
(Inherited from ISession.) | |
CreateQuery(String) |
Create a new instance of Query for the given query string
(Inherited from ISession.) | |
CreateQuery(IQueryExpression) |
Create a new instance of Query for the given query expression
A hibernate query expression (Inherited from ISessionImplementor.)Return ValueThe query | |
CreateSQLQuery |
Create a new instance of ISQLQuery for the given SQL query string.
(Inherited from ISession.) | |
Delete(Object) |
Remove a persistent instance from the datastore.
(Inherited from ISession.) | |
Delete(String) |
Delete all objects returned by the query.
(Inherited from ISession.) | |
Delete(String, Object) |
Remove a persistent instance from the datastore. The object argument may be
an instance associated with the receiving ISession or a transient
instance with an identifier associated with existing persistent state.
This operation cascades to associated instances if the association is mapped
with cascade="delete".
(Inherited from ISession.) | |
Delete(String, Object, IType) |
Delete all objects returned by the query.
(Inherited from ISession.) | |
Delete(String, array<Object>[]()[][], array<IType>[]()[][]) |
Delete all objects returned by the query.
(Inherited from ISession.) | |
Delete(String, Object, Boolean, ISet) | Cascade delete an entity instance | |
DisableFilter |
Disable the named filter for the current session.
(Inherited from ISession.) | |
Disconnect |
Disconnect the ISession from the current ADO.NET connection.
(Inherited from ISession.) | |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
EnableFilter |
Enable the named filter for this current session.
(Inherited from ISession.) | |
Enumerable(String, QueryParameters) |
Execute an Iterate() query
(Inherited from ISessionImplementor.) | |
Enumerable<(Of <<'(T>)>>)(String, QueryParameters) |
Strongly-typed version of Enumerable(String, QueryParameters) (Inherited from ISessionImplementor.) | |
EnumerableFilter(Object, String, QueryParameters) |
Collection from a filter
(Inherited from ISessionImplementor.) | |
EnumerableFilter<(Of <<'(T>)>>)(Object, String, QueryParameters) |
Strongly-typed version of EnumerableFilter(Object, String, QueryParameters) (Inherited from ISessionImplementor.) | |
Evict |
Remove this instance from the session cache.
(Inherited from ISession.) | |
ExecuteNativeUpdate | Execute a native SQL update or delete query (Inherited from ISessionImplementor.) | |
ExecuteUpdate | Execute a HQL update or delete query (Inherited from ISessionImplementor.) | |
Flush()()()() |
Force the ISession to flush.
(Inherited from ISession.) | |
Flush()()()() | (Inherited from ISessionImplementor.) | |
ForceFlush | Force an immediate flush | |
Get(String, Object) |
Return the persistent instance of the given named entity with the given identifier,
or null if there is no such persistent instance. (If the instance, or a proxy for the
instance, is already associated with the session, return that instance or proxy.)
(Inherited from ISession.) | |
Get(Type, Object) |
Return the persistent instance of the given entity class with the given identifier, or null
if there is no such persistent instance. (If the instance, or a proxy for the instance, is
already associated with the session, return that instance or proxy.)
(Inherited from ISession.) | |
Get(Type, Object, LockMode) |
Return the persistent instance of the given entity class with the given identifier, or null
if there is no such persistent instance. Obtain the specified lock mode if the instance
exists.
(Inherited from ISession.) | |
Get<(Of <<'(T>)>>)(Object) |
Strongly-typed version of Get(Type, Object) (Inherited from ISession.) | |
Get<(Of <<'(T>)>>)(Object, LockMode) |
Strongly-typed version of Get(Type, Object, LockMode) (Inherited from ISession.) | |
GetContextEntityIdentifier |
Return the identifier of the persistent object, or null if transient
(Inherited from ISessionImplementor.) | |
GetCurrentLockMode |
Determine the current lock mode of the given object
(Inherited from ISession.) | |
GetEnabledFilter |
Retrieve a currently enabled filter by name.
(Inherited from ISession.) | |
GetEntityName |
Return the entity name for a persistent entity
(Inherited from ISession.) | |
GetEntityPersister | Get the IEntityPersister for any instance (Inherited from ISessionImplementor.) | |
GetEntityUsingInterceptor |
Get the entity instance associated with the given Key,
calling the Interceptor if necessary
(Inherited from ISessionImplementor.) | |
GetFilterParameterType |
Retrieve the type for a given filter parameter.
(Inherited from ISessionImplementor.) | |
GetFilterParameterValue |
Retrieve the currently set value for a filter parameter.
(Inherited from ISessionImplementor.) | |
GetIdentifier |
Return the identifier of an entity instance cached by the ISession (Inherited from ISession.) | |
GetNamedQuery(String) |
Obtain an instance of IQuery for a named query string defined in the
mapping file.
(Inherited from ISession.) | |
GetNamedQuery(String) | (Inherited from ISessionImplementor.) | |
GetNamedSQLQuery | (Inherited from ISessionImplementor.) | |
GetQueries | (Inherited from ISessionImplementor.) | |
GetSession |
Starts a new Session with the given entity mode in effect. This secondary
Session inherits the connection, transaction, and other context
information from the primary Session. It doesn't need to be flushed
or closed by the developer.
(Inherited from ISession.) | |
GetSessionImplementation |
Gets the session implementation.
(Inherited from ISession.) | |
GuessEntityName | The guessed entity name for an entity not in an association (Inherited from ISessionImplementor.) | |
ImmediateLoad |
Load an instance immediately. Do not return a proxy.
(Inherited from ISessionImplementor.) | |
Initialize |
Initialize the session after its construction was complete
(Inherited from ISessionImplementor.) | |
InitializeCollection |
Initialize the collection (if not already initialized)
(Inherited from ISessionImplementor.) | |
Instantiate(String, Object) |
Instantiate the entity class, initializing with the given identifier
(Inherited from ISessionImplementor.) | |
Instantiate(IEntityPersister, Object) |
Instantiate an entity instance, using either an interceptor,
or the given persister
| |
InternalLoad |
Load an instance without checking if it was deleted. If it does not exist and isn't nullable, throw an exception.
This method may create a new proxy or return an existing proxy.
(Inherited from ISessionImplementor.) | |
IsDirty |
Does this ISession contain any changes which must be
synchronized with the database? Would any SQL be executed if
we flushed this session?
(Inherited from ISession.) | |
IsReadOnly |
Is the specified entity (or proxy) read-only?
(Inherited from ISession.) | |
List(CriteriaImpl) | (Inherited from ISessionImplementor.) | |
List(String, QueryParameters) |
Execute a List() query
(Inherited from ISessionImplementor.) | |
List(CriteriaImpl, IList) | (Inherited from ISessionImplementor.) | |
List(IQueryExpression, QueryParameters) |
Execute a List() expression query
(Inherited from ISessionImplementor.) | |
List(NativeSQLQuerySpecification, QueryParameters) |
Execute an SQL Query
(Inherited from ISessionImplementor.) | |
List(String, QueryParameters, IList) | (Inherited from ISessionImplementor.) | |
List(NativeSQLQuerySpecification, QueryParameters, IList) | (Inherited from ISessionImplementor.) | |
List<(Of <<'(T>)>>)(CriteriaImpl) |
Strongly-typed version of List(CriteriaImpl) (Inherited from ISessionImplementor.) | |
List<(Of <<'(T>)>>)(String, QueryParameters) |
Strongly-typed version of List(String, QueryParameters) (Inherited from ISessionImplementor.) | |
List<(Of <<'(T>)>>)(NativeSQLQuerySpecification, QueryParameters) |
Strongly-typed version of List(NativeSQLQuerySpecification, QueryParameters) (Inherited from ISessionImplementor.) | |
ListCustomQuery(ICustomQuery, QueryParameters, IList) | Execute an SQL Query (Inherited from ISessionImplementor.) | |
ListCustomQuery<(Of <<'(T>)>>)(ICustomQuery, QueryParameters) | (Inherited from ISessionImplementor.) | |
ListFilter(Object, String, QueryParameters) |
Execute a filter
(Inherited from ISessionImplementor.) | |
ListFilter<(Of <<'(T>)>>)(Object, String, QueryParameters) |
Execute a filter (strongly-typed version).
(Inherited from ISessionImplementor.) | |
Load(Object, Object) |
Read the persistent state associated with the given identifier into the given transient
instance.
(Inherited from ISession.) | |
Load(String, Object) |
Return the persistent instance of the given entityName with the given identifier,
assuming that the instance exists.
(Inherited from ISession.) | |
Load(Type, Object) |
Return the persistent instance of the given entity class with the given identifier,
assuming that the instance exists.
(Inherited from ISession.) | |
Load(String, Object, LockMode) |
Return the persistent instance of the given entity class with the given identifier,
obtaining the specified lock mode, assuming the instance exists.
(Inherited from ISession.) | |
Load(Type, Object, LockMode) |
Return the persistent instance of the given entity class with the given identifier,
obtaining the specified lock mode.
(Inherited from ISession.) | |
Load<(Of <<'(T>)>>)(Object) |
Return the persistent instance of the given entity class with the given identifier,
assuming that the instance exists.
(Inherited from ISession.) | |
Load<(Of <<'(T>)>>)(Object, LockMode) |
Return the persistent instance of the given entity class with the given identifier,
obtaining the specified lock mode.
(Inherited from ISession.) | |
Lock(Object, LockMode) |
Obtain the specified lock level upon the given object.
(Inherited from ISession.) | |
Lock(String, Object, LockMode) |
Obtain the specified lock level upon the given object.
(Inherited from ISession.) | |
Merge(Object) |
Copy the state of the given object onto the persistent object with the same
identifier. If there is no persistent instance currently associated with
the session, it will be loaded. Return the persistent instance. If the
given instance is unsaved, save a copy of and return it as a newly persistent
instance. The given instance does not become associated with the session.
This operation cascades to associated instances if the association is mapped
with cascade="merge". (Inherited from ISession.)The semantics of this method are defined by JSR-220. | |
Merge(String, Object) |
Copy the state of the given object onto the persistent object with the same
identifier. If there is no persistent instance currently associated with
the session, it will be loaded. Return the persistent instance. If the
given instance is unsaved, save a copy of and return it as a newly persistent
instance. The given instance does not become associated with the session.
This operation cascades to associated instances if the association is mapped
with cascade="merge". (Inherited from ISession.)The semantics of this method are defined by JSR-220. Name of the entity.a detached instance with state to be copied Return Valuean updated persistent instance | |
Merge(String, Object, IDictionary) | Cascade merge an entity instance | |
Merge<(Of <<'(T>)>>)(T) |
Copy the state of the given object onto the persistent object with the same
identifier. If there is no persistent instance currently associated with
the session, it will be loaded. Return the persistent instance. If the
given instance is unsaved, save a copy of and return it as a newly persistent
instance. The given instance does not become associated with the session.
This operation cascades to associated instances if the association is mapped
with cascade="merge". (Inherited from ISession.)The semantics of this method are defined by JSR-220. | |
Merge<(Of <<'(T>)>>)(String, T) |
Copy the state of the given object onto the persistent object with the same
identifier. If there is no persistent instance currently associated with
the session, it will be loaded. Return the persistent instance. If the
given instance is unsaved, save a copy of and return it as a newly persistent
instance. The given instance does not become associated with the session.
This operation cascades to associated instances if the association is mapped
with cascade="merge". (Inherited from ISession.)The semantics of this method are defined by JSR-220. Name of the entity.a detached instance with state to be copied Return Valuean updated persistent instance | |
Persist(Object) |
Make a transient instance persistent. This operation cascades to associated
instances if the association is mapped with cascade="persist". (Inherited from ISession.)The semantics of this method are defined by JSR-220. | |
Persist(String, Object) |
Make a transient instance persistent. This operation cascades to associated
instances if the association is mapped with cascade="persist". (Inherited from ISession.)The semantics of this method are defined by JSR-220. | |
Persist(String, Object, IDictionary) | Cascade persist an entity instance | |
PersistOnFlush | Cascade persist an entity instance during the flush process | |
QueryOver<(Of <<'(T>)>>)()()()() |
Creates a new IQueryOver<T> for the entity class.
(Inherited from ISession.) | |
QueryOver<(Of <<'(T>)>>)(Expression<(Of <<'(Func<(Of <<'(T>)>>)>)>>)) |
Creates a new IQueryOver<T> for the entity class.
(Inherited from ISession.) | |
QueryOver<(Of <<'(T>)>>)(String) |
Creates a new IQueryOver{T}; for the entity class.
(Inherited from ISession.) | |
QueryOver<(Of <<'(T>)>>)(String, Expression<(Of <<'(Func<(Of <<'(T>)>>)>)>>)) |
Creates a new IQueryOver{T} for the entity class.
(Inherited from ISession.) | |
Reconnect()()()() |
Obtain a new ADO.NET connection.
(Inherited from ISession.) | |
Reconnect(IDbConnection) |
Reconnect to the given ADO.NET connection.
(Inherited from ISession.) | |
Refresh(Object) |
Re-read the state of the given instance from the underlying database.
(Inherited from ISession.) | |
Refresh(Object, LockMode) |
Re-read the state of the given instance from the underlying database, with
the given LockMode.
(Inherited from ISession.) | |
Refresh(Object, IDictionary) | Cascade refresh an entity instance | |
Replicate(Object, ReplicationMode) |
Persist all reachable transient objects, reusing the current identifier
values. Note that this will not trigger the Interceptor of the Session.
(Inherited from ISession.) | |
Replicate(String, Object, ReplicationMode) |
Persist the state of the given detached instance, reusing the current
identifier value. This operation cascades to associated instances if
the association is mapped with cascade="replicate".
(Inherited from ISession.) | |
Save(Object) |
Persist the given transient instance, first assigning a generated identifier.
(Inherited from ISession.) | |
Save(Object, Object) |
Persist the given transient instance, using the given identifier.
(Inherited from ISession.) | |
Save(String, Object) |
Persist the given transient instance, first assigning a generated identifier. (Or
using the current value of the identifier property if the assigned
generator is used.)
(Inherited from ISession.) | |
SaveOrUpdate(Object) |
Either Save() or Update() the given instance, depending upon the value of
its identifier property.
(Inherited from ISession.) | |
SaveOrUpdate(String, Object) |
Either Save(String, Object) or Update(String, Object)
the given instance, depending upon resolution of the unsaved-value checks
(see the manual for discussion of unsaved-value checking).
(Inherited from ISession.) | |
SaveOrUpdateCopy(Object) | Obsolete.
Copy the state of the given object onto the persistent object with the same
identifier. If there is no persistent instance currently associated with
the session, it will be loaded. Return the persistent instance. If the
given instance is unsaved or does not exist in the database, save it and
return it as a newly persistent instance. Otherwise, the given instance
does not become associated with the session.
(Inherited from ISession.) | |
SaveOrUpdateCopy(Object, Object) | Obsolete.
Copy the state of the given object onto the persistent object with the
given identifier. If there is no persistent instance currently associated
with the session, it will be loaded. Return the persistent instance. If
there is no database row with the given identifier, save the given instance
and return it as a newly persistent instance. Otherwise, the given instance
does not become associated with the session.
(Inherited from ISession.) | |
SaveOrUpdateCopy(String, Object, IDictionary) | Obsolete. Cascade copy an entity instance | |
SetBatchSize |
Sets the batch size of the session
(Inherited from ISession.) | |
SetReadOnly |
Change the read-only status of an entity (or proxy).
(Inherited from ISession.) | |
Update(Object) |
Update the persistent instance with the identifier of the given transient instance.
(Inherited from ISession.) | |
Update(Object, Object) |
Update the persistent state associated with the given identifier.
(Inherited from ISession.) | |
Update(String, Object) |
Update the persistent instance with the identifier of the given detached
instance.
(Inherited from ISession.) |
Extension Methods
Name | Description | |
---|---|---|
Query<(Of <<'(T>)>>) | (Defined by LinqExtensionMethods.) |
Properties
Name | Description | |
---|---|---|
ActionQueue | Get the ActionQueue for this session | |
ActiveEntityMode | The entity mode in effect for this session. (Inherited from ISession.) | |
Batcher |
Get the prepared statement Batcher for this session
(Inherited from ISessionImplementor.) | |
CacheMode | The current cache mode. (Inherited from ISession.) | |
CacheMode | (Inherited from ISessionImplementor.) | |
Connection |
Gets the ADO.NET connection.
(Inherited from ISession.) | |
Connection | (Inherited from ISessionImplementor.) | |
ConnectionManager | (Inherited from ISessionImplementor.) | |
DefaultReadOnly |
The read-only status for entities (and proxies) loaded into this Session.
(Inherited from ISession.) | |
DontFlushFromFind | (Inherited from ISessionImplementor.) | |
EnabledFilters |
Return the currently enabled filters. The filter map is keyed by filter
name, with values corresponding to the FilterImpl
instance.
(Inherited from ISessionImplementor.) | |
EntityMode | Retrieve the entity mode in effect for this session. (Inherited from ISessionImplementor.) | |
Factory |
Get the creating SessionFactoryImplementor
(Inherited from ISessionImplementor.) | |
FetchProfile | (Inherited from ISessionImplementor.) | |
FlushMode |
Determines at which points Hibernate automatically flushes the session.
(Inherited from ISession.) | |
FlushMode | (Inherited from ISessionImplementor.) | |
FutureCriteriaBatch | (Inherited from ISessionImplementor.) | |
FutureQueryBatch | (Inherited from ISessionImplementor.) | |
Interceptor | (Inherited from ISessionImplementor.) | |
IsClosed | Determine whether the session is closed. Provided separately 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.
(Inherited from ISessionImplementor.) | |
IsConnected |
Is the ISession currently connected?
(Inherited from ISession.) | |
IsConnected |
Is the ISession currently connected?
(Inherited from ISessionImplementor.) | |
IsEventSource | (Inherited from ISessionImplementor.) | |
IsOpen |
Is the ISession still open?
(Inherited from ISession.) | |
IsOpen |
Is the ISession still open?
(Inherited from ISessionImplementor.) | |
Listeners | Retrieves the configured event listeners from this event source. (Inherited from ISessionImplementor.) | |
PersistenceContext | Get the persistence context for this session (Inherited from ISessionImplementor.) | |
SessionFactory |
Get the ISessionFactory that created this instance.
(Inherited from ISession.) | |
SessionId | (Inherited from ISessionImplementor.) | |
Statistics | Get the statistics for this session. (Inherited from ISession.) | |
Timestamp |
System time before the start of the transaction
(Inherited from ISessionImplementor.) | |
Transaction |
Get the current Unit of Work and return the associated ITransaction object.
(Inherited from ISession.) | |
TransactionContext | (Inherited from ISessionImplementor.) | |
TransactionInProgress |
Does this Session have an active Hibernate transaction
or is there a JTA transaction in progress?
(Inherited from ISessionImplementor.) |