Top Description Inners Fields Constructors Methods
org.hibernate.collection

public abstract Class PersistentIndexedElementHolder

extends AbstractPersistentCollection
Class Inheritance
Known Direct Subclasses
org.hibernate.collection.PersistentListElementHolder, org.hibernate.collection.PersistentMapElementHolder
Imports
java.io.Serializable, java.sql.ResultSet, .SQLException, java.util.ArrayList, .Collection, .HashMap, .Iterator, .List, .Map, org.dom4j.Element, org.hibernate.AssertionFailure, .HibernateException, org.hibernate.loader.CollectionAliases, org.hibernate.engine.SessionFactoryImplementor, .SessionImplementor, org.hibernate.persister.collection.CollectionPersister, org.hibernate.type.Type, .XmlRepresentableType, org.hibernate.util.CollectionHelper

A persistent wrapper for an XML element
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
protected Element
Inherited from org.hibernate.collection.AbstractPersistentCollection:
UNKNOWN

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
beforeInitialize(CollectionPersister
The underlying collection persister.
persister
,
int
The anticipated size of the collection after initilization is complete.
anticipatedSize
)

Implements org.hibernate.collection.PersistentCollection.beforeInitialize.

Called before any elements are read into the collection, allowing appropriate initializations to occur.
public boolean
public Iterator<E>
entries(CollectionPersister persister)

Implements org.hibernate.collection.PersistentCollection.entries.

Iterate all collection entries, during update of the database
public boolean
entryExists(Object entry, int i)

Implements org.hibernate.collection.PersistentCollection.entryExists.

Does an element exist at this entry in the collection?
public boolean
equalsSnapshot(CollectionPersister persister)

Implements org.hibernate.collection.PersistentCollection.equalsSnapshot.

Does the current state exactly match the snapshot?
public Iterator<E>
getDeletes(CollectionPersister persister, boolean indexIsFormula)

Implements org.hibernate.collection.PersistentCollection.getDeletes.

Get all the elements that need deleting
public Object
getElement(Object entry)

Implements org.hibernate.collection.PersistentCollection.getElement.

Get the value of the given collection entry
protected static String
getIndex(Element element, String indexNodeName, int i)

public Object
getIndex(Object entry, int i, CollectionPersister
it was more elegant before we added this...
persister
)

Implements org.hibernate.collection.PersistentCollection.getIndex.

Get the index of the given collection entry
protected static String
public Collection<E>
public Serializable
getSnapshot(CollectionPersister persister)

Implements org.hibernate.collection.PersistentCollection.getSnapshot.

Return a new snapshot of the current state of the collection
public Object
getSnapshotElement(Object entry, int i)

Implements org.hibernate.collection.PersistentCollection.getSnapshotElement.

Get the snapshot value of the given collection entry
public Object
public boolean
isDirectlyAccessible()

Overrides org.hibernate.collection.AbstractPersistentCollection.isDirectlyAccessible.

Implements org.hibernate.collection.PersistentCollection.isDirectlyAccessible.

Could the application possibly have a direct reference to the underlying collection implementation?
public boolean
public boolean
isWrapper(Object collection)

Implements org.hibernate.collection.PersistentCollection.isWrapper.

Is this the wrapper for the given underlying collection instance?
public boolean
needsInserting(Object entry, int i, Type elementType)

Implements org.hibernate.collection.PersistentCollection.needsInserting.

Do we need to insert this element?
public boolean
needsUpdating(Object entry, int i, Type elementType)

Implements org.hibernate.collection.PersistentCollection.needsUpdating.

Do we need to update this element?
public Object
readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)

Implements org.hibernate.collection.PersistentCollection.readFrom.

Read a row from the JDBC result set
protected static void
setIndex(Element element, String indexNodeName, String index)

Inherited from org.hibernate.collection.AbstractPersistentCollection:
afterInitializeafterRowInsertbeginReadclearDirtydirtyendReadforceInitializationgetCachedSizegetIdentifiergetKeygetOrphansgetOwnergetQueuedOrphansgetRolegetSessiongetSnapshotgetStoredSnapshothasQueuedOperationsidentityRemoveinitializeisClearQueueEnabledisDirtyisOperationQueueEnabledisPutQueueEnabledisRowUpdatePossibleisUnreferencedneedsRecreateperformQueuedOperationspostActionpreInsertqueuedAdditionIteratorqueueOperationreadreadElementByIndexreadElementExistencereadIndexExistencereadSizesetCurrentSessionsetDirectlyAccessiblesetInitializedsetOwnersetSnapshotunsetSessionwasInitializedwrite

Field Detail

elementback to summary
protected Element element

Constructor Detail

PersistentIndexedElementHolderback to summary
public PersistentIndexedElementHolder(SessionImplementor session, Element element)
PersistentIndexedElementHolderback to summary
public PersistentIndexedElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key) throws HibernateException

Method Detail

beforeInitializeback to summary
public void beforeInitialize(CollectionPersister persister, int anticipatedSize)

Implements org.hibernate.collection.PersistentCollection.beforeInitialize.

Doc from org.hibernate.collection.PersistentCollection.beforeInitialize.

Called before any elements are read into the collection, allowing appropriate initializations to occur.

Parameters
persister:CollectionPersister

The underlying collection persister.

anticipatedSize:int

The anticipated size of the collection after initilization is complete.

emptyback to summary
public boolean empty()

Implements abstract org.hibernate.collection.AbstractPersistentCollection.empty.

Implements org.hibernate.collection.PersistentCollection.empty.

Doc from org.hibernate.collection.AbstractPersistentCollection.empty.

Is the initialized collection empty?

entriesback to summary
public Iterator<E> entries(CollectionPersister persister)

Implements org.hibernate.collection.PersistentCollection.entries.

Doc from org.hibernate.collection.PersistentCollection.entries.

Iterate all collection entries, during update of the database

entryExistsback to summary
public boolean entryExists(Object entry, int i)

Implements org.hibernate.collection.PersistentCollection.entryExists.

Doc from org.hibernate.collection.PersistentCollection.entryExists.

Does an element exist at this entry in the collection?

equalsSnapshotback to summary
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException

Implements org.hibernate.collection.PersistentCollection.equalsSnapshot.

Doc from org.hibernate.collection.PersistentCollection.equalsSnapshot.

Does the current state exactly match the snapshot?

getDeletesback to summary
public Iterator<E> getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException

Implements org.hibernate.collection.PersistentCollection.getDeletes.

Doc from org.hibernate.collection.PersistentCollection.getDeletes.

Get all the elements that need deleting

getElementback to summary
public Object getElement(Object entry)

Implements org.hibernate.collection.PersistentCollection.getElement.

Doc from org.hibernate.collection.PersistentCollection.getElement.

Get the value of the given collection entry

getIndexback to summary
protected static String getIndex(Element element, String indexNodeName, int i)
getIndexback to summary
public Object getIndex(Object entry, int i, CollectionPersister persister)

Implements org.hibernate.collection.PersistentCollection.getIndex.

Doc from org.hibernate.collection.PersistentCollection.getIndex.

Get the index of the given collection entry

Parameters
persister:CollectionPersister

it was more elegant before we added this...

getIndexAttributeNameback to summary
protected static String getIndexAttributeName(CollectionPersister persister)
getOrphansback to summary
public Collection<E> getOrphans(Serializable snapshot, String entityName) throws HibernateException

Implements abstract org.hibernate.collection.AbstractPersistentCollection.getOrphans.

Implements org.hibernate.collection.PersistentCollection.getOrphans.

Doc from org.hibernate.collection.AbstractPersistentCollection.getOrphans.

get all "orphaned" elements

getSnapshotback to summary
public Serializable getSnapshot(CollectionPersister persister) throws HibernateException

Implements org.hibernate.collection.PersistentCollection.getSnapshot.

Doc from org.hibernate.collection.PersistentCollection.getSnapshot.

Return a new snapshot of the current state of the collection

getSnapshotElementback to summary
public Object getSnapshotElement(Object entry, int i)

Implements org.hibernate.collection.PersistentCollection.getSnapshotElement.

Doc from org.hibernate.collection.PersistentCollection.getSnapshotElement.

Get the snapshot value of the given collection entry

getValueback to summary
public Object getValue()

Overrides org.hibernate.collection.AbstractPersistentCollection.getValue.

Implements org.hibernate.collection.PersistentCollection.getValue.

Doc from org.hibernate.collection.AbstractPersistentCollection.getValue.

return the user-visible collection (or array) instance

isDirectlyAccessibleback to summary
public boolean isDirectlyAccessible()

Overrides org.hibernate.collection.AbstractPersistentCollection.isDirectlyAccessible.

Implements org.hibernate.collection.PersistentCollection.isDirectlyAccessible.

Doc from org.hibernate.collection.AbstractPersistentCollection.isDirectlyAccessible.

Could the application possibly have a direct reference to the underlying collection implementation?

isSnapshotEmptyback to summary
public boolean isSnapshotEmpty(Serializable snapshot)

Implements org.hibernate.collection.PersistentCollection.isSnapshotEmpty.

Doc from org.hibernate.collection.PersistentCollection.isSnapshotEmpty.

Is the snapshot empty?

isWrapperback to summary
public boolean isWrapper(Object collection)

Implements org.hibernate.collection.PersistentCollection.isWrapper.

Doc from org.hibernate.collection.PersistentCollection.isWrapper.

Is this the wrapper for the given underlying collection instance?

needsInsertingback to summary
public boolean needsInserting(Object entry, int i, Type elementType) throws HibernateException

Implements org.hibernate.collection.PersistentCollection.needsInserting.

Doc from org.hibernate.collection.PersistentCollection.needsInserting.

Do we need to insert this element?

needsUpdatingback to summary
public boolean needsUpdating(Object entry, int i, Type elementType) throws HibernateException

Implements org.hibernate.collection.PersistentCollection.needsUpdating.

Doc from org.hibernate.collection.PersistentCollection.needsUpdating.

Do we need to update this element?

readFromback to summary
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException

Implements org.hibernate.collection.PersistentCollection.readFrom.

Doc from org.hibernate.collection.PersistentCollection.readFrom.

Read a row from the JDBC result set

setIndexback to summary
protected static void setIndex(Element element, String indexNodeName, String index)
org.hibernate.collection back to summary

public final Class PersistentIndexedElementHolder.IndexedValue

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.collection.PersistentIndexedElementHolder.IndexedValue

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv Object

Constructor Summary

AccessConstructor and Description
pack-priv
IndexedValue(String index, Object value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indexback to summary
pack-priv String index
valueback to summary
pack-priv Object value

Constructor Detail

IndexedValueback to summary
pack-priv IndexedValue(String index, Object value)