Top Description Fields Constructors Methods
org.hibernate.engine

public final Class Collections

extends Object
Class Inheritance
Imports
org.slf4j.Logger, .LoggerFactory, org.hibernate.AssertionFailure, .EntityMode, .HibernateException, org.hibernate.collection.PersistentCollection, org.hibernate.persister.collection.CollectionPersister, org.hibernate.pretty.MessageHelper, org.hibernate.type.CollectionType, java.io.Serializable

Implements book-keeping for the collection persistence by reachability algorithm
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
private static void
private static void
public static void
processReachableCollection(PersistentCollection
The collection to be updated by reachibility.
collection
,
CollectionType
The type of the collection.
type
,
Object
The owner of the collection.
entity
,
SessionImplementor session)

Initialize the role of the collection.

public static void
processUnreachableCollection(PersistentCollection
The collection to be updated by unreachability.
coll
,
SessionImplementor session)

record the fact that this collection was dereferenced

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log

Constructor Detail

Collectionsback to summary
private Collections()

Method Detail

prepareCollectionForUpdateback to summary
private static void prepareCollectionForUpdate(PersistentCollection collection, CollectionEntry entry, EntityMode entityMode, SessionFactoryImplementor factory) throws HibernateException

1. record the collection role that this collection is referenced by 2. decide if the collection needs deleting/creating/updating (but don't actually schedule the action yet)

processDereferencedCollectionback to summary
private static void processDereferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException
processNeverReferencedCollectionback to summary
private static void processNeverReferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException
processReachableCollectionback to summary
public static void processReachableCollection(PersistentCollection collection, CollectionType type, Object entity, SessionImplementor session) throws HibernateException

Initialize the role of the collection.

Parameters
collection:PersistentCollection

The collection to be updated by reachibility.

type:CollectionType

The type of the collection.

entity:Object

The owner of the collection.

processUnreachableCollectionback to summary
public static void processUnreachableCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException

record the fact that this collection was dereferenced

Parameters
coll:PersistentCollection

The collection to be updated by unreachability.