ResultSet
in regards to loading collections.
Another implementation option to consider is to not expose ResultSets
directly (in the JDBC redesign) but to always "wrap" them and apply a
[series of] context[s] to that wrapper.
| Modifier and Type | Field and Description |
|---|---|
| private final LoadContexts | |
| private Set | |
| private static final CoreMessageLogger | |
| private final ResultSet |
| Access | Constructor and Description |
|---|---|
| public | CollectionLoadContext(LoadContexts
Callback to other collection load contexts. loadContexts, ResultSet The result set this is "wrapping". resultSet)Creates a collection load context for the given result set. |
| Modifier and Type | Method and Description |
|---|---|
| private void | addCollectionToCache(LoadingCollectionEntry
The entry representing the collection to add lce, CollectionPersister The persister persister)Add the collection to the second-level cache |
| pack-priv void | |
| private void | |
| public void | endLoadingCollections(CollectionPersister
The persister for which to complete loading. persister)Finish the process of collection-loading for this bound result set. |
| private void | endLoadingCollections(CollectionPersister persister, List<LoadingCollectionEntry> matchedCollectionEntries)
|
| public LoadContexts | |
| public PersistentCollection | Returns: The loading collection (see discussion above).The persister for the collection being requested. persister, final Serializable The key of the collection being requested. key)Retrieve the collection that is being loaded as part of processing this result set. |
| public ResultSet | |
| public String |
| loadContexts | back to summary |
|---|---|
| private final LoadContexts loadContexts | |
| localLoadingCollectionKeys | back to summary |
|---|---|
| private Set<CollectionKey> localLoadingCollectionKeys | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| resultSet | back to summary |
|---|---|
| private final ResultSet resultSet | |
| CollectionLoadContext | back to summary |
|---|---|
| public CollectionLoadContext(LoadContexts loadContexts, ResultSet resultSet) Creates a collection load context for the given result set.
| |
| addCollectionToCache | back to summary |
|---|---|
| private void addCollectionToCache(LoadingCollectionEntry lce, CollectionPersister persister) Add the collection to the second-level cache
| |
| cleanup | back to summary |
|---|---|
| pack-priv void cleanup() | |
| endLoadingCollection | back to summary |
|---|---|
| private void endLoadingCollection(LoadingCollectionEntry lce, CollectionPersister persister) | |
| endLoadingCollections | back to summary |
|---|---|
| public void endLoadingCollections(CollectionPersister persister) Finish the process of collection-loading for this bound result set. Mainly this involves cleaning up resources and notifying the collections that loading is complete.
| |
| endLoadingCollections | back to summary |
|---|---|
| private void endLoadingCollections(CollectionPersister persister, List<LoadingCollectionEntry> matchedCollectionEntries) | |
| getLoadContext | back to summary |
|---|---|
| public LoadContexts getLoadContext() | |
| getLoadingCollection | back to summary |
|---|---|
| public PersistentCollection getLoadingCollection(final CollectionPersister persister, final Serializable key) Retrieve the collection that is being loaded as part of processing this result set. Basically, there are two valid return values from this method:
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |