org.hibernate.collection

Class PersistentIndexedElementHolder

Implemented Interfaces:
Serializable, PersistentCollection
Known Direct Subclasses:
PersistentListElementHolder, PersistentMapElementHolder

public abstract class PersistentIndexedElementHolder
extends AbstractPersistentCollection

A persistent wrapper for an XML element
Author:
Gavin King

Nested Class Summary

static class
PersistentIndexedElementHolder.IndexedValue

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

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

Method Summary

void
beforeInitialize(CollectionPersister persister, int anticipatedSize)
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)
protected static String
getIndex(Element element, String indexNodeName, int i)
Object
getIndex(Object entry, int i, CollectionPersister persister)
protected static String
getIndexAttributeName(CollectionPersister persister)
Collection
getOrphans(Serializable snapshot, String entityName)
Serializable
getSnapshot(CollectionPersister persister)
Object
getSnapshotElement(Object entry, int i)
Object
getValue()
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)
protected static void
setIndex(Element element, String indexNodeName, String index)

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

PersistentIndexedElementHolder

public PersistentIndexedElementHolder(SessionImplementor session,
                                      Element element)

PersistentIndexedElementHolder

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

Method Details

beforeInitialize

public void beforeInitialize(CollectionPersister persister,
                             int anticipatedSize)
Specified by:
beforeInitialize 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

protected static String getIndex(Element element,
                                 String indexNodeName,
                                 int i)

getIndex

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

getIndexAttributeName

protected static String getIndexAttributeName(CollectionPersister persister)

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

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

setIndex

protected static void setIndex(Element element,
                               String indexNodeName,
                               String index)