Type Parameters

T

An unordered, unkeyed collection that can contain the same element multiple times. The .NET collections API, has no Bag. The ICollection<(Of T>) interface closely resembles bag semantics, however NHibernate for .NET 1.1 used IList so IList<(Of T>) is used to ensure the easiest transition to generics.

The following tables list the members exposed by the PersistentGenericBag<(Of T>) generic type.

Public Methods

  NameDescription
Add
AfterInitialize (Inherited from AbstractPersistentCollection.)
AfterRowInsert
Called after inserting a row, to fetch the natively generated id
(Inherited from AbstractPersistentCollection.)
BeforeInitialize (Overrides .BeforeInitialize(ICollectionPersister).)
BeginRead
Called just before reading any rows from the IDataReader
(Inherited from AbstractPersistentCollection.)
Clear
ClearDirty (Inherited from AbstractPersistentCollection.)
Contains
CopyTo
DelayedAddAll (Overrides .DelayedAddAll(ICollection, ICollectionPersister).)
Dirty (Inherited from AbstractPersistentCollection.)
Disassemble (Overrides .Disassemble(ICollectionPersister).)
EndRead
Called after reading all rows from the IDataReader
(Inherited from AbstractPersistentCollection.)
Entries (Overrides .Entries().)
EntryExists (Overrides .EntryExists(Object, Int32).)
EqualsSnapshot (Overrides .EqualsSnapshot(IType).)
ForceInitialization
To be called internally by the session, forcing immediate initalization.
(Inherited from AbstractPersistentCollection.)
GetDeletes (Overrides .GetDeletes(IType, Boolean).)
GetElement (Overrides .GetElement(Object).)
GetIdentifier (Inherited from AbstractPersistentCollection.)
GetIndex (Overrides .GetIndex(Object, Int32).)
GetOrphans (Overrides .GetOrphans(Object, Type).)
GetSnapshotElement (Overrides .GetSnapshotElement(Object, Int32).)
GetValue
Return the user-visible collection (or array) instance
(Inherited from AbstractPersistentCollection.)
IndexOf
InitializeFromCache (Overrides .InitializeFromCache(ICollectionPersister, Object, Object).)
Insert
IsSnapshotEmpty (Inherited from AbstractPersistentCollection.)
IsWrapper
Is this the wrapper for the given underlying bag instance?
(Overrides .IsWrapper(Object).)
NeedsInserting (Overrides .NeedsInserting(Object, Int32, IType).)
NeedsRecreate
Gets a Boolean indicating if this Bag needs to be recreated in the database.
(Overrides .NeedsRecreate(ICollectionPersister).)
NeedsUpdating (Overrides .NeedsUpdating(Object, Int32, IType).)
PostAction
Clears out any Queued Additions.
(Inherited from AbstractPersistentCollection.)
PreInsert
Called before inserting rows, to ensure that any surrogate keys are fully generated
(Inherited from AbstractPersistentCollection.)
Read
Called by any read-only method of the collection interface
(Inherited from AbstractPersistentCollection.)
ReadFrom (Overrides .ReadFrom(IDataReader, ICollectionPersister, ICollectionAliases, Object).)
Remove
RemoveAt
SetCurrentSession
Associate the collection with the given session.
(Inherited from AbstractPersistentCollection.)
UnsetSession
Disassociate this collection from the given session.
(Inherited from AbstractPersistentCollection.)

Protected Methods

  NameDescription
Initialize
Initialize the collection, if possible, wrapping any exceptions in a runtime exception
(Inherited from AbstractPersistentCollection.)
MakeDirtyIfTrue (Inherited from AbstractPersistentCollection.)
QueueAdd
Queue an addition if the peristent collection supports it
(Inherited from AbstractPersistentCollection.)
QueueAddAll
Queue additions
(Inherited from AbstractPersistentCollection.)
SetInitialized
Mark the collection as initialized.
(Inherited from AbstractPersistentCollection.)
Snapshot (Overrides .Snapshot(ICollectionPersister).)
Write
Called by any writer method of the collection interface
(Inherited from AbstractPersistentCollection.)

Public Constructors

  NameDescription
PersistentGenericBag<(Of T>)NewOverloaded.

Public Properties

  NameDescription
CollectionSnapshot
(Inherited from AbstractPersistentCollection.)
Count
Empty
Is the initialized GenericBag empty?
(Overrides .Empty.)
HasQueuedAdds
(Inherited from AbstractPersistentCollection.)
IsDirectlyAccessible
Gets a Boolean indicating if the underlying collection is directly accessable through code.
(Inherited from AbstractPersistentCollection.)
IsDirty (Inherited from AbstractPersistentCollection.)
Item
Owner (Inherited from AbstractPersistentCollection.)
QueuedAddsCollection
(Inherited from AbstractPersistentCollection.)
WasInitialized
(Inherited from AbstractPersistentCollection.)

Protected Properties

  NameDescription
Session
(Inherited from AbstractPersistentCollection.)