org.hibernate.collection

Class PersistentElementHolder

Implemented Interfaces:
Serializable, PersistentCollection

public class PersistentElementHolder
extends AbstractPersistentCollection

A persistent wrapper for an XML element
Author:
Gavin King

Nested Class Summary

Nested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection

AbstractPersistentCollection.DelayedOperation

Field Summary

protected Element
element

Fields inherited from class org.hibernate.collection.AbstractPersistentCollection

UNKNOWN

Constructor Summary

PersistentElementHolder(SessionImplementor session, Element element)
PersistentElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key)

Method Summary

void
beforeInitialize(CollectionPersister persister, int anticipatedSize)
Serializable
disassemble(CollectionPersister persister)
boolean
empty()
Iterator
entries(CollectionPersister persister)
boolean
entryExists(Object entry, int i)
boolean
equalsSnapshot(CollectionPersister persister)
Iterator
getDeletes(CollectionPersister persister, boolean indexIsFormula)
Object
getElement(Object entry)
Object
getIndex(Object entry, int i, CollectionPersister persister)
Collection
getOrphans(Serializable snapshot, String entityName)
Serializable
getSnapshot(CollectionPersister persister)
Object
getSnapshotElement(Object entry, int i)
Object
getValue()
void
initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner)
boolean
isDirectlyAccessible()
boolean
isSnapshotEmpty(Serializable snapshot)
boolean
isWrapper(Object collection)
boolean
needsInserting(Object entry, int i, Type elementType)
boolean
needsUpdating(Object entry, int i, Type elementType)
Object
readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)

Methods inherited from class org.hibernate.collection.AbstractPersistentCollection

afterInitialize, afterRowInsert, beginRead, clearDirty, dirty, empty, endRead, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, getValue, hasQueuedOperations, 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

Field Details

element

protected Element element

Constructor Details

PersistentElementHolder

public PersistentElementHolder(SessionImplementor session,
                               Element element)

PersistentElementHolder

public PersistentElementHolder(SessionImplementor session,
                               CollectionPersister persister,
                               Serializable key)
            throws HibernateException

Method Details

beforeInitialize

public void beforeInitialize(CollectionPersister persister,
                             int anticipatedSize)
Specified by:
beforeInitialize in interface PersistentCollection

disassemble

public Serializable disassemble(CollectionPersister persister)
            throws HibernateException
Specified by:
disassemble in interface PersistentCollection

empty

public boolean empty()
Specified by:
empty in interface PersistentCollection
Overrides:
empty in interface AbstractPersistentCollection

entries

public Iterator entries(CollectionPersister persister)
Specified by:
entries in interface PersistentCollection

entryExists

public boolean entryExists(Object entry,
                           int i)
Specified by:
entryExists in interface PersistentCollection

equalsSnapshot

public boolean equalsSnapshot(CollectionPersister persister)
            throws HibernateException
Specified by:
equalsSnapshot in interface PersistentCollection

getDeletes

public Iterator getDeletes(CollectionPersister persister,
                           boolean indexIsFormula)
            throws HibernateException
Specified by:
getDeletes in interface PersistentCollection

getElement

public Object getElement(Object entry)
Specified by:
getElement in interface PersistentCollection

getIndex

public Object getIndex(Object entry,
                       int i,
                       CollectionPersister persister)
Specified by:
getIndex in interface PersistentCollection

getOrphans

public Collection getOrphans(Serializable snapshot,
                             String entityName)
            throws HibernateException
Specified by:
getOrphans in interface PersistentCollection
Overrides:
getOrphans in interface AbstractPersistentCollection

getSnapshot

public Serializable getSnapshot(CollectionPersister persister)
            throws HibernateException
Specified by:
getSnapshot in interface PersistentCollection

getSnapshotElement

public Object getSnapshotElement(Object entry,
                                 int i)
Specified by:
getSnapshotElement in interface PersistentCollection

getValue

public Object getValue()
Specified by:
getValue in interface PersistentCollection
Overrides:
getValue in interface AbstractPersistentCollection

initializeFromCache

public void initializeFromCache(CollectionPersister persister,
                                Serializable disassembled,
                                Object owner)
            throws HibernateException
Specified by:
initializeFromCache in interface PersistentCollection

isDirectlyAccessible

public boolean isDirectlyAccessible()
Specified by:
isDirectlyAccessible in interface PersistentCollection
Overrides:
isDirectlyAccessible in interface AbstractPersistentCollection

isSnapshotEmpty

public boolean isSnapshotEmpty(Serializable snapshot)
Specified by:
isSnapshotEmpty in interface PersistentCollection

isWrapper

public boolean isWrapper(Object collection)
Specified by:
isWrapper in interface PersistentCollection

needsInserting

public boolean needsInserting(Object entry,
                              int i,
                              Type elementType)
            throws HibernateException
Specified by:
needsInserting in interface PersistentCollection

needsUpdating

public boolean needsUpdating(Object entry,
                             int i,
                             Type elementType)
            throws HibernateException
Specified by:
needsUpdating in interface PersistentCollection

readFrom

public Object readFrom(ResultSet rs,
                       CollectionPersister persister,
                       CollectionAliases descriptor,
                       Object owner)
            throws HibernateException,
                   SQLException
Specified by:
readFrom in interface PersistentCollection