Package org.hibernate.collection
Class PersistentIndexedElementHolder
java.lang.Object
org.hibernate.collection.AbstractPersistentCollection
org.hibernate.collection.PersistentIndexedElementHolder
- All Implemented Interfaces:
Serializable,PersistentCollection
- Direct Known Subclasses:
PersistentListElementHolder,PersistentMapElementHolder
A persistent wrapper for an XML element
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection
AbstractPersistentCollection.DelayedOperation -
Field Summary
FieldsFields inherited from class org.hibernate.collection.AbstractPersistentCollection
UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionPersistentIndexedElementHolder(SessionImplementor session, org.dom4j.Element element) PersistentIndexedElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeInitialize(CollectionPersister persister, int anticipatedSize) Called before any elements are read into the collection, allowing appropriate initializations to occur.booleanempty()Is the initialized collection empty?entries(CollectionPersister persister) Iterate all collection entries, during update of the databasebooleanentryExists(Object entry, int i) Does an element exist at this entry in the collection?booleanequalsSnapshot(CollectionPersister persister) Does the current state exactly match the snapshot?getDeletes(CollectionPersister persister, boolean indexIsFormula) Get all the elements that need deletinggetElement(Object entry) Get the value of the given collection entrygetIndex(Object entry, int i, CollectionPersister persister) Get the index of the given collection entryprotected static StringgetIndex(org.dom4j.Element element, String indexNodeName, int i) protected static StringgetIndexAttributeName(CollectionPersister persister) getOrphans(Serializable snapshot, String entityName) get all "orphaned" elementsgetSnapshot(CollectionPersister persister) Return a new snapshot of the current state of the collectiongetSnapshotElement(Object entry, int i) Get the snapshot value of the given collection entrygetValue()return the user-visible collection (or array) instancebooleanCould the application possibly have a direct reference to the underlying collection implementation?booleanisSnapshotEmpty(Serializable snapshot) Is the snapshot empty?booleanIs this the wrapper for the given underlying collection instance?booleanneedsInserting(Object entry, int i, Type elementType) Do we need to insert this element?booleanneedsUpdating(Object entry, int i, Type elementType) Do we need to update this element?readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) Read a row from the JDBC result setprotected static voidsetIndex(org.dom4j.Element element, String indexNodeName, String index) Methods inherited from class org.hibernate.collection.AbstractPersistentCollection
afterInitialize, afterRowInsert, beginRead, clearDirty, dirty, endRead, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, hasQueuedOperations, initialize, isClearQueueEnabled, isDirty, isOperationQueueEnabled, isPutQueueEnabled, isRowUpdatePossible, isUnreferenced, needsRecreate, performQueuedOperations, postAction, preInsert, queuedAdditionIterator, queueOperation, read, readElementByIndex, readElementExistence, readIndexExistence, readSize, setCurrentSession, setDirectlyAccessible, setInitialized, setOwner, setSnapshot, unsetSession, wasInitialized, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.collection.PersistentCollection
disassemble, initializeFromCache
-
Field Details
-
element
-
-
Constructor Details
-
PersistentIndexedElementHolder
-
PersistentIndexedElementHolder
public PersistentIndexedElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key) throws HibernateException - Throws:
HibernateException
-
-
Method Details
-
getIndex
-
setIndex
-
getIndexAttributeName
-
getSnapshot
Description copied from interface:PersistentCollectionReturn a new snapshot of the current state of the collection- Throws:
HibernateException
-
getOrphans
Description copied from class:AbstractPersistentCollectionget all "orphaned" elements- Specified by:
getOrphansin interfacePersistentCollection- Specified by:
getOrphansin classAbstractPersistentCollection- Throws:
HibernateException
-
isWrapper
Description copied from interface:PersistentCollectionIs this the wrapper for the given underlying collection instance? -
equalsSnapshot
Description copied from interface:PersistentCollectionDoes the current state exactly match the snapshot?- Throws:
HibernateException
-
isSnapshotEmpty
Description copied from interface:PersistentCollectionIs the snapshot empty? -
empty
public boolean empty()Description copied from class:AbstractPersistentCollectionIs the initialized collection empty?- Specified by:
emptyin interfacePersistentCollection- Specified by:
emptyin classAbstractPersistentCollection
-
readFrom
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException Description copied from interface:PersistentCollectionRead a row from the JDBC result set- Throws:
HibernateExceptionSQLException
-
entries
Description copied from interface:PersistentCollectionIterate all collection entries, during update of the database -
beforeInitialize
Description copied from interface:PersistentCollectionCalled 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()Description copied from class:AbstractPersistentCollectionCould the application possibly have a direct reference to the underlying collection implementation?- Specified by:
isDirectlyAccessiblein interfacePersistentCollection- Overrides:
isDirectlyAccessiblein classAbstractPersistentCollection
-
getValue
Description copied from class:AbstractPersistentCollectionreturn the user-visible collection (or array) instance- Specified by:
getValuein interfacePersistentCollection- Overrides:
getValuein classAbstractPersistentCollection
-
getDeletes
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException Description copied from interface:PersistentCollectionGet all the elements that need deleting- Throws:
HibernateException
-
needsInserting
Description copied from interface:PersistentCollectionDo we need to insert this element?- Throws:
HibernateException
-
needsUpdating
Description copied from interface:PersistentCollectionDo we need to update this element?- Throws:
HibernateException
-
getIndex
Description copied from interface:PersistentCollectionGet the index of the given collection entry- Parameters:
persister- it was more elegant before we added this...
-
getElement
Description copied from interface:PersistentCollectionGet the value of the given collection entry -
getSnapshotElement
Description copied from interface:PersistentCollectionGet the snapshot value of the given collection entry -
entryExists
Description copied from interface:PersistentCollectionDoes an element exist at this entry in the collection?
-