Namespaces

Types

Type BatchFetchQueue

Namespace NHibernate.Engine

Methods

Public instance methods

void AddBatchLoadableEntityKey(EntityKey key)

If an EntityKey represents a batch loadable entity, add it to the queue.
Note that the contract here is such that any key passed in should previously have been been checked for existence within the ISession ; failure to do so may cause the referenced entity to be included in a batch even though it is already associated with the ISession .
Parameters
EntityKey key

void AddSubselect(EntityKey key, SubselectFetch subquery)

Adds a subselect fetch decriptor for the given entity key.
Parameters
EntityKey key The entity for which to register the subselect fetch.
SubselectFetch subquery The fetch descriptor.

void Clear()

Clears all entries from this fetch queue.

void ClearSubselects()

Clears all pending subselect fetches from the queue.
Called after flushing.

bool Equals(object obj)

Parameters
return bool
object obj

Object[] GetCollectionBatch(ICollectionPersister collectionPersister, object id, int batchSize)

Get a batch of uninitialized collection keys for a given role
Parameters
return Object[] an array of collection keys, of length batchSize (padded with nulls)
ICollectionPersister collectionPersister The persister for the collection role.
object id A key that must be included in the batch fetch
int batchSize the maximum number of keys to return

Object[] GetEntityBatch(IEntityPersister persister, object id, int batchSize)

Get a batch of unloaded identifiers for this class, using a slightly complex algorithm that tries to grab keys registered immediately after the given key.
Parameters
return Object[] an array of identifiers, of length batchSize (possibly padded with nulls)
IEntityPersister persister The persister for the entities being loaded.
object id The identifier of the entity currently demanding load.
int batchSize The maximum number of keys to return

int GetHashCode()

Parameters
return int

SubselectFetch GetSubselect(EntityKey key)

Retrieve the fetch descriptor associated with the given entity key.
Parameters
return SubselectFetch The fetch descriptor; may return null if no subselect fetch queued for this entity key.
EntityKey key The entity key for which to locate any defined subselect fetch.

Type GetType()

Parameters
return Type

void RemoveBatchLoadableEntityKey(EntityKey key)

After evicting or deleting or loading an entity, we don't need to batch fetch it anymore, remove it from the queue if necessary
Parameters
EntityKey key

void RemoveSubselect(EntityKey key)

After evicting or deleting an entity, we don't need to know the query that was used to load it anymore (don't call this after loading the entity, since we might still need to load its collections)
Parameters
EntityKey key

string ToString()

Parameters
return string