Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » collection » [javadoc | source]
org.hibernate.collection
abstract public class: AbstractPersistentCollection [javadoc | source]
java.lang.Object
   org.hibernate.collection.AbstractPersistentCollection

All Implemented Interfaces:
    PersistentCollection, Serializable

Direct Known Subclasses:
    PersistentIdentifierBag, PersistentSet, PersistentArrayHolder, PersistentBag, PersistentList, PersistentMapElementHolder, PersistentIndexedElementHolder, PersistentListElementHolder, PersistentElementHolder, PersistentSortedMap, PersistentSortedSet, PersistentMap

Base class implementing PersistentCollection
Nested Class Summary:
final class  AbstractPersistentCollection.IteratorProxy   
final class  AbstractPersistentCollection.ListIteratorProxy   
class  AbstractPersistentCollection.SetProxy   
final class  AbstractPersistentCollection.ListProxy   
protected interface  AbstractPersistentCollection.DelayedOperation   
Field Summary
protected static final  Object UNKNOWN     
Constructor:
 public AbstractPersistentCollection() 
 protected AbstractPersistentCollection(SessionImplementor session) 
Method from org.hibernate.collection.AbstractPersistentCollection Summary:
afterInitialize,   afterRowInsert,   beginRead,   clearDirty,   dirty,   empty,   endRead,   forceInitialization,   getCachedSize,   getIdentifier,   getKey,   getOrphans,   getOrphans,   getOwner,   getQueuedOrphans,   getRole,   getSession,   getSnapshot,   getStoredSnapshot,   getValue,   hasQueuedOperations,   identityRemove,   initialize,   isClearQueueEnabled,   isDirectlyAccessible,   isDirty,   isOperationQueueEnabled,   isPutQueueEnabled,   isRowUpdatePossible,   isUnreferenced,   needsRecreate,   performQueuedOperations,   postAction,   preInsert,   queueOperation,   queuedAdditionIterator,   read,   readElementByIndex,   readElementExistence,   readIndexExistence,   readSize,   setCurrentSession,   setDirectlyAccessible,   setInitialized,   setOwner,   setSnapshot,   unsetSession,   wasInitialized,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.collection.AbstractPersistentCollection Detail:
 public boolean afterInitialize() 
 public  void afterRowInsert(CollectionPersister persister,
    Object entry,
    int i) throws HibernateException 
    Called after inserting a row, to fetch the natively generated id
 public  void beginRead() 
    Called just before reading any rows from the JDBC result set
 public final  void clearDirty() 
 public final  void dirty() 
 abstract public boolean empty()
    Is the initialized collection empty?
 public boolean endRead() 
    Called after reading all rows from the JDBC result set
 public final  void forceInitialization() throws HibernateException 
    To be called internally by the session, forcing immediate initialization.
 protected int getCachedSize() 
 public Object getIdentifier(Object entry,
    int i) 
 public final Serializable getKey() 
 abstract public Collection getOrphans(Serializable snapshot,
    String entityName) throws HibernateException
    get all "orphaned" elements
 protected static Collection getOrphans(Collection oldElements,
    Collection currentElements,
    String entityName,
    SessionImplementor session) throws HibernateException 
    Given a collection of entity instances that used to belong to the collection, and a collection of instances that currently belong, return a collection of orphans
 public Object getOwner() 
 public final Collection getQueuedOrphans(String entityName) 
    Iterate the "queued" additions
 public final String getRole() 
 public final SessionImplementor getSession() 
    Get the current session
 protected final Serializable getSnapshot() 
    Get the current snapshot from the session
 public final Serializable getStoredSnapshot() 
 public Object getValue() 
    return the user-visible collection (or array) instance
 public final boolean hasQueuedOperations() 
    Does this instance have any "queued" additions?
 static  void identityRemove(Collection list,
    Object object,
    String entityName,
    SessionImplementor session) throws HibernateException 
 protected final  void initialize(boolean writing) 
    Initialize the collection, if possible, wrapping any exceptions in a runtime exception
 protected boolean isClearQueueEnabled() 
    Is this collection in a state that would allow us to "queue" clear? This is a special case, because of orphan delete.
 public boolean isDirectlyAccessible() 
    Could the application possibly have a direct reference to the underlying collection implementation?
 public final boolean isDirty() 
 protected boolean isOperationQueueEnabled() 
    Is this collection in a state that would allow us to "queue" operations?
 protected boolean isPutQueueEnabled() 
    Is this collection in a state that would allow us to "queue" puts? This is a special case, because of orphan delete.
 public boolean isRowUpdatePossible() 
 public final boolean isUnreferenced() 
 public boolean needsRecreate(CollectionPersister persister) 
    Do we need to completely recreate this collection when it changes?
 protected final  void performQueuedOperations() 
    After reading all existing elements from the database, add the queued elements to the underlying collection.
 public  void postAction() 
    After flushing, clear any "queued" additions, since the database state is now synchronized with the memory state.
 public  void preInsert(CollectionPersister persister) throws HibernateException 
    Called before inserting rows, to ensure that any surrogate keys are fully generated
 protected final  void queueOperation(Object element) 
    Queue an addition
 public final Iterator queuedAdditionIterator() 
    Iterate the "queued" additions
 protected final  void read() 
    Called by any read-only method of the collection interface
 protected Object readElementByIndex(Object index) 
 protected Boolean readElementExistence(Object element) 
 protected Boolean readIndexExistence(Object index) 
 protected boolean readSize() 
    Called by the size() method
 public final boolean setCurrentSession(SessionImplementor session) throws HibernateException 
    Associate the collection with the given session.
 protected final  void setDirectlyAccessible(boolean directlyAccessible) 
 protected final  void setInitialized() 
 public  void setOwner(Object owner) 
 public  void setSnapshot(Serializable key,
    String role,
    Serializable snapshot) 
    After flushing, re-init snapshot state.
 public final boolean unsetSession(SessionImplementor currentSession) 
    Disassociate this collection from the given session.
 public final boolean wasInitialized() 
    Is this instance initialized?
 protected final  void write() 
    Called by any writer method of the collection interface