result-sets to specific contextual data related to processing that result set
Considering the JDBC-redesign work, would further like this contextual info not mapped separately, but available based on the result set being processed. This would also allow maintaining a single mapping as we could reliably get notification of the result-set closing...
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Map | |
| private static final CoreMessageLogger | |
| private final PersistenceContext | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | LoadContexts(PersistenceContext
The persistence context to which this
will be bound. persistenceContext)Creates and binds this to the given persistence context. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| pack-priv void | |
| public CollectionLoadContext | Returns: The processing context.The result set for which to retrieve the context. resultSet)Get the |
| public EntityLoadContext | Returns: The entity load contextThe result set resultSet)Currently unused |
| pack-priv Map | |
| public PersistenceContext | Returns: The persistence context to which this is bound.Retrieves the persistence context to which this is bound. |
| private SharedSessionContractImplementor | |
| public boolean | Returns: True if we currently hold state pertaining to loading collections; false otherwise.Do we currently have any internal entries corresponding to loading collections? |
| public boolean | Returns: True if we currently hold state pertaining to a registered loading collections; false otherwise.Do we currently have any registered internal entries corresponding to loading collections? |
| public PersistentCollection | Returns: The loading collection, or null if not found.The collection persister persister, CollectionKey The collection key key)Attempt to locate the loading collection given the CollectionKey obtained from the owner's key. |
| pack-priv LoadingCollectionEntry | Returns: The located entry; or null.The collection key. key)Locate the LoadingCollectionEntry within *any* of the tracked
|
| pack-priv void | registerLoadingCollectionXRef(CollectionKey
The xref collection key entryKey, LoadingCollectionEntry The corresponding loading collection entry entry)Register a loading collection xref. |
| pack-priv void | unregisterLoadingCollectionXRef(CollectionKey
The key of the collection we are done processing. key)The inverse of |
| collectionLoadContexts | back to summary |
|---|---|
| private Map<ResultSet, CollectionLoadContext> collectionLoadContexts | |
| entityLoadContexts | back to summary |
|---|---|
| private Map<ResultSet, EntityLoadContext> entityLoadContexts | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| persistenceContext | back to summary |
|---|---|
| private final PersistenceContext persistenceContext | |
| xrefLoadingCollectionEntries | back to summary |
|---|---|
| private Map<CollectionKey, LoadingCollectionEntry> xrefLoadingCollectionEntries | |
| LoadContexts | back to summary |
|---|---|
| public LoadContexts(PersistenceContext persistenceContext) Creates and binds this to the given persistence context.
| |
| cleanup | back to summary |
|---|---|
| public void cleanup(ResultSet resultSet) Release internal state associated with the given result set. This should be called when we are done with processing said result set, ideally as the result set is being closed.
| |
| cleanup | back to summary |
|---|---|
| public void cleanup() Release internal state associated with *all* result sets. This is intended as a "failsafe" process to make sure we get everything cleaned up and released. | |
| cleanupCollectionXRefs | back to summary |
|---|---|
| pack-priv void cleanupCollectionXRefs(Set<CollectionKey> entryKeys) | |
| getCollectionLoadContext | back to summary |
|---|---|
| public CollectionLoadContext getCollectionLoadContext(ResultSet resultSet) Get the
| |
| getEntityLoadContext | back to summary |
|---|---|
| public EntityLoadContext getEntityLoadContext(ResultSet resultSet) Currently unused
| |
| getLoadingCollectionXRefs | back to summary |
|---|---|
pack-priv Map
| |
| getPersistenceContext | back to summary |
|---|---|
| public PersistenceContext getPersistenceContext() Retrieves the persistence context to which this is bound.
| |
| getSession | back to summary |
|---|---|
| private SharedSessionContractImplementor getSession() | |
| hasLoadingCollectionEntries | back to summary |
|---|---|
| public boolean hasLoadingCollectionEntries() Do we currently have any internal entries corresponding to loading collections?
| |
| hasRegisteredLoadingCollectionEntries | back to summary |
|---|---|
| public boolean hasRegisteredLoadingCollectionEntries() Do we currently have any registered internal entries corresponding to loading collections?
| |
| locateLoadingCollection | back to summary |
|---|---|
| public PersistentCollection locateLoadingCollection(CollectionPersister persister, CollectionKey key) Attempt to locate the loading collection given the CollectionKey obtained from the owner's key. The lookup here occurs against all result-set contexts...
| |
| locateLoadingCollectionEntry | back to summary |
|---|---|
| pack-priv LoadingCollectionEntry locateLoadingCollectionEntry(CollectionKey key) Locate the LoadingCollectionEntry within *any* of the tracked
Implementation Note package protected, as this is meant solely for use
by
| |
| registerLoadingCollectionXRef | back to summary |
|---|---|
| pack-priv void registerLoadingCollectionXRef(CollectionKey entryKey, LoadingCollectionEntry entry) Register a loading collection xref. This xref map is used because sometimes a collection is in process of being loaded from one result set, but needs to be accessed from the context of another "nested" result set processing. Implementation Note package protected, as this is meant solely for use
by
| |
| unregisterLoadingCollectionXRef | back to summary |
|---|---|
| pack-priv void unregisterLoadingCollectionXRef(CollectionKey key) The inverse of
The idea here is that other loading collections can now reference said
collection directly from the Implementation Note package protected, as this is meant solely for use
by
| |