| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | afterRowInsert(CollectionPersister
The collection persister persister, Object The collection element just inserted entry, int The element position/index i)Called after inserting a row, to fetch the natively generated id |
| public void | beforeInitialize(CollectionPersister
The underlying collection persister. persister, int The anticipated size of the collection after initialization is complete. anticipatedSize)Called before any elements are read into the collection, allowing appropriate initializations to occur. |
| public void | |
| public void | |
| public void | |
| public Serializable | Returns: The disassembled stateThe collection persister persister)Disassemble the collection to get it ready for the cache |
| public boolean | |
| public boolean | |
| public Iterator | Returns: The iteratorThe collection persister. persister)Iterate all collection entries, during update of the database |
| public boolean | Returns: true if the given entry is a collection elementThe object to check if it exists as a collection element entry, int Unused i)Does the given element/entry exist in the collection? |
| public boolean | Returns: true if the current state and the snapshot state match.The collection persister persister)Does the current state exactly match the snapshot? |
| public Iterator | Returns: An iterator over the elements to deleteThe collection persister persister, boolean For indexed collections, tells whether the index is a formula (calculated value) mapping indexIsFormula)Get all the elements that need deleting |
| public Object | Returns: The corresponding object that is part of the collection elements.The object instance for which to get the collection element instance. entry)Get the value of the given collection entry. |
| public Object | Returns: The identifier valueThe collection entry/element entry, int The assumed identifier (?) i)Get the identifier of the given collection entry. |
| public Object | Returns: The index valueThe collection entry/element entry, int The assumed index i, CollectionPersister it was more elegant before we added this... persister)Get the index of the given collection entry |
| public Serializable | |
| public Collection | Returns: The orphansThe snapshot state snapshot, String The name of the entity that are the elements of the collection entityName)get all "orphaned" elements |
| public Object | |
| public Collection | Returns: The orphaned elementsThe name of the entity that makes up the elements entityName)Get the "queued" orphans |
| public String | |
| public Serializable | Returns: The snapshotThe collection persister persister)Return a new snapshot of the current state of the collection |
| public Object | Returns: The snapshot state for that elementThe entry entry, int The index i)Get the snapshot value of the given collection entry |
| public Serializable | Returns: The internally stored snapshot stateGet the snapshot cached by the collection instance |
| public Object | Returns: The underlying collection/arrayReturn the user-visible collection (or array) instance |
| public boolean | Returns: true indicates there are pending, queued, delayed operationsDoes this instance have any "queued" operations? |
| public void | initializeFromCache(CollectionPersister
The collection persister persister, Serializable The disassembled cached state disassembled, Object The collection owner owner)Read the state of the collection from a disassembled cached value |
| public boolean | Returns: true indicates that the application might have access to the underlying collection/array.Could the application possibly have a direct reference to the underlying collection implementation? |
| public default boolean | Returns: true, ifcollection was provided directly to this
PersistentCollection; false, otherwise.The collection collection)Was |
| public boolean | |
| public default boolean | |
| public default boolean | Returns: true if the collection is newly instantiatedIs the collection newly instantiated? |
| public boolean | Returns: true if the row for each element is knownCan each element in the collection be mapped unequivocally to a single row in the database? |
| public boolean | Returns: true if the given snapshot is emptyThe snapshot to check snapshot)Is the snapshot empty? |
| public boolean | Returns: true if the collection is no longer referenced by an ownerIs the collection unreferenced? |
| public boolean | |
| public boolean | Returns: true if the element needs insertingThe collection element to check entry, int The index (for indexed collections) i, Type The type for the element elemType)Do we need to insert this element? |
| public boolean | Returns: true if a change requires a recreate.The collection persister persister)Do we need to completely recreate this collection when it changes? |
| public boolean | Returns: true if the element needs updatingThe collection element to check entry, int The index (for indexed collections) i, Type The type for the element elemType)Do we need to update this element? |
| public void | postAction()
After flushing, clear any "queued" additions, since the database state is now synchronized with the memory state. |
| public void | preInsert(CollectionPersister
The collection persister persister)Called before inserting rows, to ensure that any surrogate keys are fully generated |
| public Iterator | |
| public Object | Returns: The read objectThe JDBC ResultSet rs, CollectionPersister The collection role role, CollectionAliases The aliases used for the columns making up the collection descriptor, Object The collection owner owner)Read a row from the JDBC result set |
| public boolean | Returns: false if the collection was already associated with the sessionThe session to associate with session)Associate the collection with the given session. |
| public void | |
| public void | setSnapshot(Serializable
The collection instance key (fk value). key, String The collection role role, Serializable The snapshot state snapshot)After flushing, re-init snapshot state. |
| public boolean | Returns: true if this was currently associated with the given sessionThe session we are disassociating from. Used for validations. currentSession)Disassociate this collection from the given session. |
| afterInitialize | back to summary |
|---|---|
| public boolean afterInitialize() Called after initializing from cache
| |
| afterRowInsert | back to summary |
|---|---|
| public void afterRowInsert(CollectionPersister persister, Object entry, int i) Called after inserting a row, to fetch the natively generated id
| |
| beforeInitialize | back to summary |
|---|---|
| public void beforeInitialize(CollectionPersister persister, int anticipatedSize) Called before any elements are read into the collection, allowing appropriate initializations to occur.
| |
| beginRead | back to summary |
|---|---|
| public void beginRead() Called just before reading any rows from the JDBC result set | |
| clearDirty | back to summary |
|---|---|
| public void clearDirty() Clear the dirty flag, after flushing changes to the database. | |
| dirty | back to summary |
|---|---|
| public void dirty() Mark the collection as dirty | |
| disassemble | back to summary |
|---|---|
| public Serializable disassemble(CollectionPersister persister) Disassemble the collection to get it ready for the cache
| |
| empty | back to summary |
|---|---|
| public boolean empty() Is the collection empty? (don't try to initialize the collection)
| |
| endRead | back to summary |
|---|---|
| public boolean endRead() Called after reading all rows from the JDBC result set
| |
| entries | back to summary |
|---|---|
| public Iterator Iterate all collection entries, during update of the database
| |
| entryExists | back to summary |
|---|---|
| public boolean entryExists(Object entry, int i) Does the given element/entry exist in the collection?
| |
| equalsSnapshot | back to summary |
|---|---|
| public boolean equalsSnapshot(CollectionPersister persister) Does the current state exactly match the snapshot?
| |
| getDeletes | back to summary |
|---|---|
| public Iterator Get all the elements that need deleting
| |
| getElement | back to summary |
|---|---|
| public Object getElement(Object entry) Get the value of the given collection entry. Generally the given entry parameter value will just be returned. Might get a different value for a duplicate entries in a Set. | |
| getIdentifier | back to summary |
|---|---|
| public Object getIdentifier(Object entry, int i) Get the identifier of the given collection entry. This refers to the collection identifier, not the
identifier of the (possibly) entity elements. This is only valid for invocation on the
| |
| getIndex | back to summary |
|---|---|
| public Object getIndex(Object entry, int i, CollectionPersister persister) Get the index of the given collection entry
| |
| getKey | back to summary |
|---|---|
| public Serializable getKey() Get the current collection key value
| |
| getOrphans | back to summary |
|---|---|
| public Collection get all "orphaned" elements
| |
| getOwner | back to summary |
|---|---|
| public Object getOwner() Get the owning entity. Note that the owner is only set during the flush cycle, and when a new collection wrapper is created while loading an entity.
| |
| getQueuedOrphans | back to summary |
|---|---|
| public Collection Get the "queued" orphans
| |
| getRole | back to summary |
|---|---|
| public String getRole() Get the current role name
| |
| getSnapshot | back to summary |
|---|---|
| public Serializable getSnapshot(CollectionPersister persister) Return a new snapshot of the current state of the collection
| |
| getSnapshotElement | back to summary |
|---|---|
| public Object getSnapshotElement(Object entry, int i) Get the snapshot value of the given collection entry | |
| getStoredSnapshot | back to summary |
|---|---|
| public Serializable getStoredSnapshot() Get the snapshot cached by the collection instance
| |
| getValue | back to summary |
|---|---|
| public Object getValue() Return the user-visible collection (or array) instance
| |
| hasQueuedOperations | back to summary |
|---|---|
| public boolean hasQueuedOperations() Does this instance have any "queued" operations?
| |
| initializeFromCache | back to summary |
|---|---|
| public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) Read the state of the collection from a disassembled cached value
| |
| isDirectlyAccessible | back to summary |
|---|---|
| public boolean isDirectlyAccessible() Could the application possibly have a direct reference to the underlying collection implementation?
| |
| isDirectlyProvidedCollection | back to summary |
|---|---|
| public default boolean isDirectlyProvidedCollection(Object collection) Was Implementors that can copy elements out of a directly provided collection into the wrapped collection should override this method.
| |
| isDirty | back to summary |
|---|---|
| public boolean isDirty() Is the collection dirty? Note that this is only reliable during the flush cycle, after the collection elements are dirty checked against the snapshot.
| |
| isElementRemoved | back to summary |
|---|---|
| public default boolean isElementRemoved() | |
| isNewlyInstantiated | back to summary |
|---|---|
| public default boolean isNewlyInstantiated() Is the collection newly instantiated?
| |
| isRowUpdatePossible | back to summary |
|---|---|
| public boolean isRowUpdatePossible() Can each element in the collection be mapped unequivocally to a single row in the database? Generally bags and sets are the only collections that cannot be.
| |
| isSnapshotEmpty | back to summary |
|---|---|
| public boolean isSnapshotEmpty(Serializable snapshot) Is the snapshot empty?
| |
| isUnreferenced | back to summary |
|---|---|
| public boolean isUnreferenced() Is the collection unreferenced?
| |
| isWrapper | back to summary |
|---|---|
| public boolean isWrapper(Object collection) Is this the wrapper for the given collection instance?
| |
| needsInserting | back to summary |
|---|---|
| public boolean needsInserting(Object entry, int i, Type elemType) Do we need to insert this element? | |
| needsRecreate | back to summary |
|---|---|
| public boolean needsRecreate(CollectionPersister persister) Do we need to completely recreate this collection when it changes?
| |
| needsUpdating | back to summary |
|---|---|
| public boolean needsUpdating(Object entry, int i, Type elemType) Do we need to update this element? | |
| postAction | back to summary |
|---|---|
| public void postAction() After flushing, clear any "queued" additions, since the database state is now synchronized with the memory state. | |
| preInsert | back to summary |
|---|---|
| public void preInsert(CollectionPersister persister) Called before inserting rows, to ensure that any surrogate keys are fully generated
| |
| queuedAdditionIterator | back to summary |
|---|---|
| public Iterator Iterator over the "queued" additions
| |
| readFrom | back to summary |
|---|---|
| public Object readFrom(ResultSet rs, CollectionPersister role, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException Read a row from the JDBC result set
| |
| setCurrentSession | back to summary |
|---|---|
| public boolean setCurrentSession(SharedSessionContractImplementor session) throws HibernateException Associate the collection with the given session.
| |
| setOwner | back to summary |
|---|---|
| public void setOwner(Object entity) Set the reference to the owning entity
| |
| setSnapshot | back to summary |
|---|---|
| public void setSnapshot(Serializable key, String role, Serializable snapshot) After flushing, re-init snapshot state.
| |
| unsetSession | back to summary |
|---|---|
| public boolean unsetSession(SharedSessionContractImplementor currentSession) Disassociate this collection from the given session.
| |