public class LoadContexts extends Object
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...Constructor and Description |
---|
LoadContexts(PersistenceContext persistenceContext)
Creates and binds this to the given persistence context.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Release internal state associated with *all* result sets.
|
void |
cleanup(ResultSet resultSet)
Release internal state associated with the given result set.
|
CollectionLoadContext |
getCollectionLoadContext(ResultSet resultSet)
Get the
CollectionLoadContext associated with the given
ResultSet , creating one if needed. |
EntityLoadContext |
getEntityLoadContext(ResultSet resultSet)
Currently unused
|
PersistenceContext |
getPersistenceContext()
Retrieves the persistence context to which this is bound.
|
boolean |
hasLoadingCollectionEntries()
Do we currently have any internal entries corresponding to loading
collections?
|
boolean |
hasRegisteredLoadingCollectionEntries()
Do we currently have any registered internal entries corresponding to loading
collections?
|
PersistentCollection |
locateLoadingCollection(CollectionPersister persister,
Serializable ownerKey)
Attempt to locate the loading collection given the owner's key.
|
public LoadContexts(PersistenceContext persistenceContext)
persistenceContext
- The persistence context to which this
will be bound.public PersistenceContext getPersistenceContext()
public void cleanup(ResultSet resultSet)
resultSet
- The result set for which it is ok to release
associated resources.public void cleanup()
public boolean hasLoadingCollectionEntries()
public boolean hasRegisteredLoadingCollectionEntries()
public CollectionLoadContext getCollectionLoadContext(ResultSet resultSet)
CollectionLoadContext
associated with the given
ResultSet
, creating one if needed.resultSet
- The result set for which to retrieve the context.public PersistentCollection locateLoadingCollection(CollectionPersister persister, Serializable ownerKey)
persister
- The collection persisterownerKey
- The owner keypublic EntityLoadContext getEntityLoadContext(ResultSet resultSet)
resultSet
- The result setCopyright © 2001-2017 Red Hat, Inc. All Rights Reserved.