org.hibernate.collection.internal
Class PersistentElementHolder

java.lang.Object
  extended by org.hibernate.collection.internal.AbstractPersistentCollection
      extended by org.hibernate.collection.internal.PersistentElementHolder
All Implemented Interfaces:
Serializable, PersistentCollection

Deprecated. To be removed in 5. Removed as part of removing the notion of DOM entity-mode. See Jira issues HHH-7782 and HHH-7783 for more information.

@Deprecated
public class PersistentElementHolder
extends AbstractPersistentCollection

A persistent wrapper for an XML element

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.collection.internal.AbstractPersistentCollection
AbstractPersistentCollection.DelayedOperation, AbstractPersistentCollection.IteratorProxy, AbstractPersistentCollection.LazyInitializationWork<T>, AbstractPersistentCollection.ListIteratorProxy, AbstractPersistentCollection.ListProxy, AbstractPersistentCollection.SetProxy
 
Field Summary
protected  org.dom4j.Element element
          Deprecated.  
 
Fields inherited from class org.hibernate.collection.internal.AbstractPersistentCollection
UNKNOWN
 
Constructor Summary
PersistentElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key)
          Deprecated.  
PersistentElementHolder(SessionImplementor session, org.dom4j.Element element)
          Deprecated.  
 
Method Summary
 void beforeInitialize(CollectionPersister persister, int anticipatedSize)
          Deprecated. Called before any elements are read into the collection, allowing appropriate initializations to occur.
 Serializable disassemble(CollectionPersister persister)
          Deprecated. Disassemble the collection, ready for the cache
 boolean empty()
          Deprecated. Is the initialized collection empty?
 Iterator entries(CollectionPersister persister)
          Deprecated. Iterate all collection entries, during update of the database
 boolean entryExists(Object entry, int i)
          Deprecated. Does an element exist at this entry in the collection?
 boolean equalsSnapshot(CollectionPersister persister)
          Deprecated. Does the current state exactly match the snapshot?
 Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula)
          Deprecated. Get all the elements that need deleting
 Object getElement(Object entry)
          Deprecated. Get the value of the given collection entry
 Object getIndex(Object entry, int i, CollectionPersister persister)
          Deprecated. Get the index of the given collection entry
 Collection getOrphans(Serializable snapshot, String entityName)
          Deprecated. get all "orphaned" elements
 Serializable getSnapshot(CollectionPersister persister)
          Deprecated. Return a new snapshot of the current state of the collection
 Object getSnapshotElement(Object entry, int i)
          Deprecated. Get the snapshot value of the given collection entry
 Object getValue()
          Deprecated. return the user-visible collection (or array) instance
 void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner)
          Deprecated. Read the state of the collection from a disassembled cached value
 boolean isDirectlyAccessible()
          Deprecated. Could the application possibly have a direct reference to the underlying collection implementation?
 boolean isSnapshotEmpty(Serializable snapshot)
          Deprecated. Is the snapshot empty?
 boolean isWrapper(Object collection)
          Deprecated. Is this the wrapper for the given underlying collection instance?
 boolean needsInserting(Object entry, int i, Type elementType)
          Deprecated. Do we need to insert this element?
 boolean needsUpdating(Object entry, int i, Type elementType)
          Deprecated. Do we need to update this element?
 Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
          Deprecated. Read a row from the JDBC result set
 
Methods inherited from class org.hibernate.collection.internal.AbstractPersistentCollection
afterInitialize, afterRowInsert, beginRead, clearDirty, dirty, endRead, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, hasQueuedOperations, identityRemove, initialize, isClearQueueEnabled, isDirty, isOperationQueueEnabled, isPutQueueEnabled, isRowUpdatePossible, isUnreferenced, needsRecreate, performQueuedOperations, postAction, preInsert, prepareForPossibleSpecialSpecjInitialization, queuedAdditionIterator, queueOperation, read, readElementByIndex, readElementExistence, readIndexExistence, readSize, setCurrentSession, setDirectlyAccessible, setInitialized, setOwner, setSnapshot, unsetSession, wasInitialized, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected org.dom4j.Element element
Deprecated. 
Constructor Detail

PersistentElementHolder

public PersistentElementHolder(SessionImplementor session,
                               org.dom4j.Element element)
Deprecated. 

PersistentElementHolder

public PersistentElementHolder(SessionImplementor session,
                               CollectionPersister persister,
                               Serializable key)
                        throws HibernateException
Deprecated. 
Throws:
HibernateException
Method Detail

getSnapshot

public Serializable getSnapshot(CollectionPersister persister)
                         throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Return a new snapshot of the current state of the collection

Throws:
HibernateException

getOrphans

public Collection getOrphans(Serializable snapshot,
                             String entityName)
                      throws HibernateException
Deprecated. 
Description copied from class: AbstractPersistentCollection
get all "orphaned" elements

Specified by:
getOrphans in interface PersistentCollection
Specified by:
getOrphans in class AbstractPersistentCollection
Throws:
HibernateException

isWrapper

public boolean isWrapper(Object collection)
Deprecated. 
Description copied from interface: PersistentCollection
Is this the wrapper for the given underlying collection instance?


equalsSnapshot

public boolean equalsSnapshot(CollectionPersister persister)
                       throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Does the current state exactly match the snapshot?

Throws:
HibernateException

isSnapshotEmpty

public boolean isSnapshotEmpty(Serializable snapshot)
Deprecated. 
Description copied from interface: PersistentCollection
Is the snapshot empty?


empty

public boolean empty()
Deprecated. 
Description copied from class: AbstractPersistentCollection
Is the initialized collection empty?

Specified by:
empty in interface PersistentCollection
Specified by:
empty in class AbstractPersistentCollection

readFrom

public Object readFrom(ResultSet rs,
                       CollectionPersister persister,
                       CollectionAliases descriptor,
                       Object owner)
                throws HibernateException,
                       SQLException
Deprecated. 
Description copied from interface: PersistentCollection
Read a row from the JDBC result set

Throws:
HibernateException
SQLException

entries

public Iterator entries(CollectionPersister persister)
Deprecated. 
Description copied from interface: PersistentCollection
Iterate all collection entries, during update of the database


beforeInitialize

public void beforeInitialize(CollectionPersister persister,
                             int anticipatedSize)
Deprecated. 
Description copied from interface: PersistentCollection
Called before any elements are read into the collection, allowing appropriate initializations to occur.

Parameters:
persister - The underlying collection persister.
anticipatedSize - The anticipated size of the collection after initilization is complete.

isDirectlyAccessible

public boolean isDirectlyAccessible()
Deprecated. 
Description copied from class: AbstractPersistentCollection
Could the application possibly have a direct reference to the underlying collection implementation?

Specified by:
isDirectlyAccessible in interface PersistentCollection
Overrides:
isDirectlyAccessible in class AbstractPersistentCollection

initializeFromCache

public void initializeFromCache(CollectionPersister persister,
                                Serializable disassembled,
                                Object owner)
                         throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Read the state of the collection from a disassembled cached value

Throws:
HibernateException

disassemble

public Serializable disassemble(CollectionPersister persister)
                         throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Disassemble the collection, ready for the cache

Throws:
HibernateException

getValue

public Object getValue()
Deprecated. 
Description copied from class: AbstractPersistentCollection
return the user-visible collection (or array) instance

Specified by:
getValue in interface PersistentCollection
Overrides:
getValue in class AbstractPersistentCollection

getDeletes

public Iterator getDeletes(CollectionPersister persister,
                           boolean indexIsFormula)
                    throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Get all the elements that need deleting

Throws:
HibernateException

needsInserting

public boolean needsInserting(Object entry,
                              int i,
                              Type elementType)
                       throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Do we need to insert this element?

Throws:
HibernateException

needsUpdating

public boolean needsUpdating(Object entry,
                             int i,
                             Type elementType)
                      throws HibernateException
Deprecated. 
Description copied from interface: PersistentCollection
Do we need to update this element?

Throws:
HibernateException

getIndex

public Object getIndex(Object entry,
                       int i,
                       CollectionPersister persister)
Deprecated. 
Description copied from interface: PersistentCollection
Get the index of the given collection entry

persister - it was more elegant before we added this...

getElement

public Object getElement(Object entry)
Deprecated. 
Description copied from interface: PersistentCollection
Get the value of the given collection entry


getSnapshotElement

public Object getSnapshotElement(Object entry,
                                 int i)
Deprecated. 
Description copied from interface: PersistentCollection
Get the snapshot value of the given collection entry


entryExists

public boolean entryExists(Object entry,
                           int i)
Deprecated. 
Description copied from interface: PersistentCollection
Does an element exist at this entry in the collection?



Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.