The StatefulPersistenceContext type exposes the following members.
Constructors
Name | Description | |
---|---|---|
StatefulPersistenceContext | Constructs a PersistentContext, bound to the given session. |
Methods
Name | Description | |
---|---|---|
AddChildParent | ||
AddCollectionHolder | Register a PersistentCollection object for an array.
Associates a holder with an array - MUST be called after loading
array, since the array instance is not created until endLoad().
| |
AddEntity(EntityKey, Object) | Add a canonical mapping from entity key to entity instance | |
AddEntity(EntityUniqueKey, Object) | Add an entity to the cache by unique key | |
AddEntity(Object, Status, array<Object>[]()[][], EntityKey, Object, LockMode, Boolean, IEntityPersister, Boolean, Boolean) | Adds an entity to the internal caches. | |
AddEntry |
Generates an appropriate EntityEntry instance and adds it
to the event source's internal caches.
| |
AddInitializedCollection | add a collection we just pulled out of the cache (does not need initializing) | |
AddInitializedDetachedCollection |
add an (initialized) collection that was created by another session and passed
into update() (ie. one with a snapshot and existing state on the database)
| |
AddNewCollection |
Add a new collection (ie. a newly created one, just instantiated by the
application, with no database state or snapshot)
| |
AddNonLazyCollection |
Register a collection for non-lazy loading at the end of the two-phase load
| |
AddNullProperty |
Record the fact that the association belonging to the keyed entity is null.
| |
AddProxy | Add a proxy to the session cache | |
AddUninitializedCollection | add a collection we just loaded up (still needs initializing) | |
AddUninitializedDetachedCollection | add a detached uninitialized collection | |
AddUnownedCollection | Add a collection which has no owner loaded | |
AfterLoad | Call this after finishing a two-phase load | |
AfterTransactionCompletion | Called after transactions end | |
BeforeLoad | Call this before begining a two-phase load | |
CheckUniqueness |
Attempts to check whether the given key represents an entity already loaded within the
current session.
| |
Clear | Clear the state of the persistence context | |
ContainsCollection | Is the given collection associated with this persistence context? | |
ContainsEntity | Is there an entity with the given key in the persistence context | |
ContainsProxy | Is the given proxy associated with this persistence context? | |
DecrementCascadeLevel | Called after cascading | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCachedDatabaseSnapshot |
Retrieve the cached database snapshot for the requested entity key.
| |
GetCollection | Get the collection instance associated with the CollectionKey | |
GetCollectionEntry | Get the collection entry for a persistent collection | |
GetCollectionEntryOrNull |
Get the collection entry for a collection passed to filter,
which might be a collection wrapper, an array, or an unwrapped
collection. Return null if there is no entry.
| |
GetCollectionHolder | Get the PersistentCollection object for an array | |
GetCollectionOwner | Get the entity that owns this persistent collection | |
GetDatabaseSnapshot |
Get the current state of the entity as known to the underlying
database, or null if there is no corresponding row
| |
GetEntity(EntityKey) |
Get the entity instance associated with the given EntityKey | |
GetEntity(EntityUniqueKey) | Get an entity cached by unique key | |
GetEntry |
Retrieve the EntityEntry representation of the given entity.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetIndexInOwner |
Search the persistence context for an index of the child object, given a collection role
| |
GetLoadedCollectionOwnerIdOrNull | Get the ID for the entity that owned this persistent collection when it was loaded | |
GetLoadedCollectionOwnerOrNull | Get the entity that owned this persistent collection when it was loaded | |
GetNaturalIdSnapshot |
Get the values of the natural id fields as known to the underlying
database, or null if the entity has no natural id or there is no
corresponding row.
| |
GetOwnerId |
Search the persistence context for an owner for the child object,
given a collection role
| |
GetProxy | Get an existing proxy by key | |
GetSnapshot | Get the snapshot of the pre-flush collection state | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IncrementCascadeLevel | Called before cascading | |
InitializeNonLazyCollections |
Force initialization of all non-lazy collections encountered during
the current two-phase load (actually, this is a no-op, unless this
is the "outermost" load)
| |
IsEntryFor | Is there an EntityEntry for this instance? | |
IsPropertyNull | Is the association property belonging to the keyed entity null? | |
IsReadOnly |
Is the specified entity (or proxy) read-only?
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NarrowProxy |
If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy
and overwrite the registration of the old one. This breaks == and occurs only for
"class" proxies rather than "interface" proxies. Also init the proxy to point to
the given target implementation if necessary.
| |
ProxyFor(Object) |
Return the existing proxy associated with the given EntityKey, or the
argument (the entity associated with the key) if no proxy exists.
(slower than the form above)
| |
ProxyFor(IEntityPersister, EntityKey, Object) |
Return the existing proxy associated with the given EntityKey, or the
third argument (the entity associated with the key) if no proxy exists. Init
the proxy to the target implementation, if necessary.
| |
ReassociateIfUninitializedProxy |
Takes the given object and, if it represents a proxy, reassociates it with this event source.
| |
ReassociateProxy |
If a deleted entity instance is re-saved, and it has a proxy, we need to
reset the identifier of the proxy
| |
RemoveChildParent | ||
RemoveCollectionHolder |
Remove the mapping of collection to holder during eviction of the owning entity
| |
RemoveEntity |
Remove an entity from the session cache, also clear
up other state associated with the entity, all except
for the EntityEntry | |
RemoveEntry | Remove an entity entry from the session cache | |
RemoveProxy | Remove a proxy from the session cache | |
ReplaceDelayedEntityIdentityInsertKeys | ||
SetEntryStatus | Set the status of an entry | |
SetReadOnly |
Change the read-only status of an entity (or proxy).
| |
ToString | (Overrides Object..::..ToString()()()().) | |
Unproxy |
Get the entity instance underlying the given proxy, throwing
an exception if the proxy is uninitialized. If the given object
is not a proxy, simply return the argument.
| |
UnproxyAndReassociate |
Possibly unproxy the given reference and reassociate it with the current session.
| |
UseUnownedCollection |
Get and remove a collection whose owner is not yet loaded,
when its owner is being loaded
|
Extension Methods
Name | Description | |
---|---|---|
As<(Of <<'(T>)>>) | (Defined by TypeHelperExtensionMethods.) | |
IsBetween |
Apply a "between" constraint to the named property
Note: throws an exception outside of a QueryOver expression
(Defined by RestrictionExtensions.) | |
IsIn(array<Object>[]()[][]) | Overloaded.
Apply an "in" constraint to the named property
Note: throws an exception outside of a QueryOver expression
(Defined by RestrictionExtensions.) | |
IsIn(ICollection) | Overloaded.
Apply an "in" constraint to the named property
Note: throws an exception outside of a QueryOver expression
(Defined by RestrictionExtensions.) | |
IsProxy | (Defined by NHibernateProxyHelper.) | |
ToTypeParameters | (Defined by ReflectHelper.) |
Fields
Name | Description | |
---|---|---|
NoRow |
Properties
Name | Description | |
---|---|---|
BatchFetchQueue |
Get the BatchFetchQueue, instantiating one if necessary.
| |
CascadeLevel | How deep are we cascaded? | |
CollectionEntries | Get the mapping from collection instance to collection entry | |
CollectionsByKey | Get the mapping from collection key to collection instance | |
DefaultReadOnly |
The read-only status for entities (and proxies) loaded into this persistence context.
| |
EntitiesByKey | Get the mapping from key value to entity instance | |
EntityEntries | Get the mapping from entity instance to entity entry | |
Flushing | Is a flush cycle currently in process? | |
HasNonReadOnlyEntities | False if we know for certain that all the entities are read-only | |
IsLoadFinished | ||
IsStateless | ||
LoadContexts |
Retrieve this persistence context's managed load context.
| |
NullifiableEntityKeys | Retrieve the set of EntityKeys representing nullifiable references | |
Session |
Get the session to which this persistence context is bound.
|