java.lang.Object | |
↳ | org.hibernate.engine.BatchFetchQueue |
Tracks entity and collection keys that are available for batch fetching, and the queries which were used to load entities, which can be re-used as a subquery for loading owned collections.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MARKER |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a queue for the given context.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
If an EntityKey represents a batch loadable entity, add
it to the queue.
| |||||||||||
Adds a subselect fetch decriptor for the given entity key.
| |||||||||||
Clears all entries from this fetch queue.
| |||||||||||
Clears all pending subselect fetches from the queue.
| |||||||||||
Get a batch of uninitialized collection keys for a given role
| |||||||||||
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.
| |||||||||||
Retrieve the fetch descriptor associated with the given entity 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
| |||||||||||
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)
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a queue for the given context.
context | The owning context. |
---|
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 thePersistenceContext
; failure to do so may cause the
referenced entity to be included in a batch even though it is
already associated with the PersistenceContext
.
Adds a subselect fetch decriptor for the given entity key.
key | The entity for which to register the subselect fetch. |
---|---|
subquery | The fetch descriptor. |
Clears all entries from this fetch queue.
Clears all pending subselect fetches from the queue.
Called after flushing.Get a batch of uninitialized collection keys for a given role
collectionPersister | The persister for the collection role. |
---|---|
id | A key that must be included in the batch fetch |
batchSize | the maximum number of keys to return |
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.
persister | The persister for the entities being loaded. |
---|---|
id | The identifier of the entity currently demanding load. |
batchSize | The maximum number of keys to return |
Retrieve the fetch descriptor associated with the given entity key.
key | The entity key for which to locate any defined subselect fetch. |
---|
After evicting or deleting or loading an entity, we don't need to batch fetch it anymore, remove it from the queue if necessary
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)