Methods Summary |
---|
public void | addCollectionHolder(org.hibernate.collection.PersistentCollection holder)Register a PersistentCollection object for an array.
Associates a holder with an array - MUST be called after loading
array, since the array instance is not created until endLoad().
|
public void | addEntity(EntityKey key, java.lang.Object entity)Add a canonical mapping from entity key to entity instance
|
public void | addEntity(EntityUniqueKey euk, java.lang.Object entity)Add an entity to the cache by unique key
|
public EntityEntry | addEntity(java.lang.Object entity, Status status, java.lang.Object[] loadedState, EntityKey entityKey, java.lang.Object version, org.hibernate.LockMode lockMode, boolean existsInDatabase, org.hibernate.persister.entity.EntityPersister persister, boolean disableVersionIncrement, boolean lazyPropertiesAreUnfetched)Adds an entity to the internal caches.
|
public EntityEntry | addEntry(java.lang.Object entity, Status status, java.lang.Object[] loadedState, java.lang.Object rowId, java.io.Serializable id, java.lang.Object version, org.hibernate.LockMode lockMode, boolean existsInDatabase, org.hibernate.persister.entity.EntityPersister persister, boolean disableVersionIncrement, boolean lazyPropertiesAreUnfetched)Generates an appropriate EntityEntry instance and adds it
to the event source's internal caches.
|
public CollectionEntry | addInitializedCollection(org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.collection.PersistentCollection collection, java.io.Serializable id)add a collection we just pulled out of the cache (does not need initializing)
|
public void | addInitializedDetachedCollection(org.hibernate.persister.collection.CollectionPersister collectionPersister, org.hibernate.collection.PersistentCollection collection)add an (initialized) collection that was created by another session and passed
into update() (ie. one with a snapshot and existing state on the database)
|
public void | addNewCollection(org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.collection.PersistentCollection collection)Add a new collection (ie. a newly created one, just instantiated by the
application, with no database state or snapshot)
|
public void | addNonLazyCollection(org.hibernate.collection.PersistentCollection collection)Register a collection for non-lazy loading at the end of the
two-phase load
|
public void | addNullProperty(EntityKey ownerKey, java.lang.String propertyName)Record the fact that the association belonging to the keyed
entity is null.
|
public void | addProxy(EntityKey key, java.lang.Object proxy)Add a proxy to the session cache
|
public void | addUninitializedCollection(org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.collection.PersistentCollection collection, java.io.Serializable id)add a collection we just loaded up (still needs initializing)
|
public void | addUninitializedDetachedCollection(org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.collection.PersistentCollection collection)add a detached uninitialized collection
|
public void | addUnownedCollection(CollectionKey key, org.hibernate.collection.PersistentCollection collection)Add a collection which has no owner loaded
|
public void | afterLoad()Call this after finishing a two-phase load
|
public void | afterTransactionCompletion()Called after transactions end
|
public void | beforeLoad()Call this before begining a two-phase load
|
public void | checkUniqueness(EntityKey key, java.lang.Object object)Attempts to check whether the given key represents an entity already loaded within the
current session.
|
public void | clear()Clear the state of the persistence context
|
public boolean | containsCollection(org.hibernate.collection.PersistentCollection collection)Is the given collection associated with this persistence context?
|
public boolean | containsEntity(EntityKey key)Is there an entity with the given key in the persistence context
|
public boolean | containsProxy(java.lang.Object proxy)Is the given proxy associated with this persistence context?
|
public int | decrementCascadeLevel()Called after cascading
|
public BatchFetchQueue | getBatchFetchQueue()Get the BatchFetchQueue, instantiating one if
necessary.
|
public java.lang.Object[] | getCachedDatabaseSnapshot(EntityKey key)
|
public int | getCascadeLevel()How deep are we cascaded?
|
public org.hibernate.collection.PersistentCollection | getCollection(CollectionKey collectionKey)Get the collection instance associated with the CollectionKey
|
public java.util.Map | getCollectionEntries()Get the mapping from collection instance to collection entry
|
public CollectionEntry | getCollectionEntry(org.hibernate.collection.PersistentCollection coll)Get the collection entry for a persistent collection
|
public CollectionEntry | getCollectionEntryOrNull(java.lang.Object collection)Get the collection entry for a collection passed to filter,
which might be a collection wrapper, an array, or an unwrapped
collection. Return null if there is no entry.
|
public org.hibernate.collection.PersistentCollection | getCollectionHolder(java.lang.Object array)Get the PersistentCollection object for an array
|
public java.lang.Object | getCollectionOwner(java.io.Serializable key, org.hibernate.persister.collection.CollectionPersister collectionPersister)Get the entity that owns this persistent collection
|
public java.util.Map | getCollectionsByKey()Get the mapping from collection key to collection instance
|
public java.lang.Object[] | getDatabaseSnapshot(java.io.Serializable id, org.hibernate.persister.entity.EntityPersister persister)Get the current state of the entity as known to the underlying
database, or null if there is no corresponding row
|
public java.util.Map | getEntitiesByKey()Get the mapping from key value to entity instance
|
public java.lang.Object | getEntity(EntityKey key)Get the entity instance associated with the given
EntityKey
|
public java.lang.Object | getEntity(EntityUniqueKey euk)Get an entity cached by unique key
|
public java.util.Map | getEntityEntries()Get the mapping from entity instance to entity entry
|
public EntityEntry | getEntry(java.lang.Object entity)Retreive the EntityEntry representation of the given entity.
|
public java.lang.Object | getIndexInOwner(java.lang.String entity, java.lang.String property, java.lang.Object childObject, java.util.Map mergeMap)Search the persistence context for an index of the child object,
given a collection role
|
public org.hibernate.engine.loading.LoadContexts | getLoadContexts()Retrieve this persistence context's managed load context.
|
public java.lang.Object[] | getNaturalIdSnapshot(java.io.Serializable id, org.hibernate.persister.entity.EntityPersister persister)Get the values of the natural id fields as known to the underlying
database, or null if the entity has no natural id or there is no
corresponding row.
|
public java.util.HashSet | getNullifiableEntityKeys()Retrieve the set of EntityKeys representing nullifiable references
|
public java.io.Serializable | getOwnerId(java.lang.String entity, java.lang.String property, java.lang.Object childObject, java.util.Map mergeMap)Search the persistence context for an owner for the child object,
given a collection role
|
public java.lang.Object | getProxy(EntityKey key)Get an existing proxy by key
|
public SessionImplementor | getSession()Get the session to which this persistence context is bound.
|
public java.io.Serializable | getSnapshot(org.hibernate.collection.PersistentCollection coll)Get the snapshot of the pre-flush collection state
|
public boolean | hasNonReadOnlyEntities()
|
public int | incrementCascadeLevel()Called before cascading
|
public void | initializeNonLazyCollections()Force initialization of all non-lazy collections encountered during
the current two-phase load (actually, this is a no-op, unless this
is the "outermost" load)
|
public boolean | isEntryFor(java.lang.Object entity)Is there an EntityEntry for this instance?
|
public boolean | isFlushing()Is a flush cycle currently in process?
|
public boolean | isPropertyNull(EntityKey ownerKey, java.lang.String propertyName)Is the association property belonging to the keyed entity null?
|
public boolean | isStateless()
|
public java.lang.Object | narrowProxy(java.lang.Object proxy, org.hibernate.persister.entity.EntityPersister persister, EntityKey key, java.lang.Object object)If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy
and overwrite the registration of the old one. This breaks == and occurs only for
"class" proxies rather than "interface" proxies. Also init the proxy to point to
the given target implementation if necessary.
|
public java.lang.Object | proxyFor(org.hibernate.persister.entity.EntityPersister persister, EntityKey key, java.lang.Object impl)Return the existing proxy associated with the given EntityKey, or the
third argument (the entity associated with the key) if no proxy exists. Init
the proxy to the target implementation, if necessary.
|
public java.lang.Object | proxyFor(java.lang.Object impl)Return the existing proxy associated with the given EntityKey, or the
argument (the entity associated with the key) if no proxy exists.
(slower than the form above)
|
public boolean | reassociateIfUninitializedProxy(java.lang.Object value)Takes the given object and, if it represents a proxy, reassociates it with this event source.
|
public void | reassociateProxy(java.lang.Object value, java.io.Serializable id)If a deleted entity instance is re-saved, and it has a proxy, we need to
reset the identifier of the proxy
|
public org.hibernate.collection.PersistentCollection | removeCollectionHolder(java.lang.Object array)Remove the mapping of collection to holder during eviction
of the owning entity
|
public java.lang.Object | removeEntity(EntityKey key)Remove an entity from the session cache, also clear
up other state associated with the entity, all except
for the EntityEntry
|
public EntityEntry | removeEntry(java.lang.Object entity)Remove an entity entry from the session cache
|
public java.lang.Object | removeProxy(EntityKey key)Remove a proxy from the session cache
|
public void | replaceDelayedEntityIdentityInsertKeys(EntityKey oldKey, java.io.Serializable generatedId)
|
public void | setEntryStatus(EntityEntry entry, Status status)Set the status of an entry
|
public void | setFlushing(boolean flushing)Called before and after the flushcycle
|
public void | setReadOnly(java.lang.Object entity, boolean readOnly)Set the object to read only and discard it's snapshot
|
public java.lang.String | toString()Returns a string representation of the object.
|
public java.lang.Object | unproxy(java.lang.Object maybeProxy)Get the entity instance underlying the given proxy, throwing
an exception if the proxy is uninitialized. If the given object
is not a proxy, simply return the argument.
|
public java.lang.Object | unproxyAndReassociate(java.lang.Object maybeProxy)Possibly unproxy the given reference and reassociate it with the current session.
|
public org.hibernate.collection.PersistentCollection | useUnownedCollection(CollectionKey key)Get and remove a collection whose owner is not yet loaded,
when its owner is being loaded
|