Uses of Interface
org.hibernate.collection.spi.PersistentCollection
Packages that use PersistentCollection
Package
Description
This package defines formats for disassembled state kept in the second level cache.
This package defines the SPI of a framework for lazy-initializing
and state-tracking collection wrappers.
This package defines some central internal SPI abstractions
used throughout the implementation of Hibernate.
Defines the event types and event listener interfaces for
events produced by the stateful
Session
.This package abstracts persistence mechanisms for collections.
Defines support for performing mutation operations against collections.
Contains some functions for pretty-printing things for exception and log messages.
A Hibernate
Type
is a strategy for mapping a Java
property type to a JDBC type or types.An API for user-defined custom types which extend the set of built-in
types defined in
org.hibernate.type
.-
Uses of PersistentCollection in org.hibernate.cache.spi.entry
Methods in org.hibernate.cache.spi.entry with parameters of type PersistentCollectionModifier and TypeMethodDescriptionvoid
CollectionCacheEntry.assemble
(PersistentCollection<?> collection, CollectionPersister persister, Object owner) Assembles the collection from the cached state.Constructors in org.hibernate.cache.spi.entry with parameters of type PersistentCollectionModifierConstructorDescriptionCollectionCacheEntry
(PersistentCollection<?> collection, CollectionPersister persister) Constructs a CollectionCacheEntry -
Uses of PersistentCollection in org.hibernate.collection.spi
Classes in org.hibernate.collection.spi that implement PersistentCollectionModifier and TypeClassDescriptionclass
Base class implementingPersistentCollection
class
A dummy collection wrapper for an array.class
An unordered, un-keyed collection that can contain the same element multiple times.class
An "identifier bag" implements "bag" semantics more efficiently than a regular bag by adding a synthetic identifier column to the table.class
A persistent wrapper for aList
.class
PersistentMap<K,
E> A persistent wrapper for aMap
.class
A persistent wrapper for aSet
.class
PersistentSortedMap<K,
E> A persistent wrapper for aSortedMap
.class
A persistent wrapper for aSortedSet
.Methods in org.hibernate.collection.spi that return PersistentCollectionModifier and TypeMethodDescriptionCollectionSemantics.instantiateWrapper
(Object key, CollectionPersister collectionDescriptor, SharedSessionContractImplementor session) Create a wrapper for the collectionCollectionSemantics.wrap
(CE rawCollection, CollectionPersister collectionDescriptor, SharedSessionContractImplementor session) Wrap a raw collection in wrapperMethods in org.hibernate.collection.spi with parameters of type PersistentCollectionModifier and TypeMethodDescriptionstatic void
AbstractPersistentCollection.checkPersister
(PersistentCollection<?> collection, CollectionPersister persister) default boolean
PersistentCollection.includeInInsert
(Object entry, int entryPosition, PersistentCollection<?> collection, PluralAttributeMapping attributeDescriptor) Whether to include the entry for insertion operationsdefault boolean
PersistentCollection.includeInRecreate
(Object entry, int i, PersistentCollection<?> collection, PluralAttributeMapping attributeDescriptor) Whether the given entry should be included in recreation events -
Uses of PersistentCollection in org.hibernate.engine.spi
Methods in org.hibernate.engine.spi that return PersistentCollectionModifier and TypeMethodDescriptionPersistenceContext.addCollectionByKey
(CollectionKey collectionKey, PersistentCollection<?> persistentCollection) Adds a collection in the collections-by-key map.PersistenceContext.getCollection
(CollectionKey collectionKey) Get the collection instance associated with theCollectionKey
PersistenceContext.getCollectionHolder
(Object array) Get thePersistentCollection
object for an arrayPersistenceContext.removeCollectionHolder
(Object array) Remove the mapping of collection to holder during eviction of the owning entityPersistenceContext.useUnownedCollection
(CollectionKey key) Take ownership of a previously unowned collection, if one.Methods in org.hibernate.engine.spi that return types with arguments of type PersistentCollectionModifier and TypeMethodDescription@Nullable Map
<PersistentCollection<?>, CollectionEntry> PersistenceContext.getCollectionEntries()
Doubly internalPersistenceContext.getCollectionsByKey()
Deprecated.this method should be removed; alternative methods are available that better express the intent, allowing for better optimisations.Methods in org.hibernate.engine.spi with parameters of type PersistentCollectionModifier and TypeMethodDescriptionvoid
BatchFetchQueue.addBatchLoadableCollection
(PersistentCollection<?> collection, CollectionEntry ce) If a CollectionEntry represents a batch loadable collection, add it to the queue.PersistenceContext.addCollectionByKey
(CollectionKey collectionKey, PersistentCollection<?> persistentCollection) Adds a collection in the collections-by-key map.void
PersistenceContext.addCollectionHolder
(PersistentCollection<?> holder) Register aPersistentCollection
object for an array.PersistenceContext.addInitializedCollection
(CollectionPersister persister, PersistentCollection<?> collection, Object id) add a collection we just pulled out of the cache (does not need initializing)void
PersistenceContext.addInitializedDetachedCollection
(CollectionPersister collectionPersister, PersistentCollection<?> collection) add an (initialized) collection that was created by another session and passed into update() (ie.void
PersistenceContext.addNewCollection
(CollectionPersister persister, PersistentCollection<?> collection) Add a new collection (ie.void
PersistenceContext.addNonLazyCollection
(PersistentCollection<?> collection) Register a collection for non-lazy loading at the end of the two-phase loadvoid
PersistenceContext.addUninitializedCollection
(CollectionPersister persister, PersistentCollection<?> collection, Object id) add a collection we just loaded up (still needs initializing)void
PersistenceContext.addUninitializedDetachedCollection
(CollectionPersister persister, PersistentCollection<?> collection) add a detached uninitialized collectionvoid
CollectionEntry.afterAction
(PersistentCollection<?> collection) Called after execution of an actionboolean
PersistenceContext.containsCollection
(PersistentCollection<?> collection) Is the given collection associated with this persistence context?PersistenceContext.getCollectionEntry
(PersistentCollection<?> coll) Get the collection entry for a persistent collectionPersistenceContext.getLoadedCollectionOwnerIdOrNull
(PersistentCollection<?> collection) Get the ID for the entity that owned this persistent collection when it was loadedPersistenceContext.getLoadedCollectionOwnerOrNull
(PersistentCollection<?> collection) Get the entity that owned this persistent collection when it was loadedCollection
<?> CollectionEntry.getOrphans
(String entityName, PersistentCollection<?> collection) Get the collection orphans (entities which were removed from the collection)PersistenceContext.getSnapshot
(PersistentCollection<?> coll) Get the snapshot of the pre-flush collection statevoid
SessionDelegatorBaseImpl.initializeCollection
(PersistentCollection<?> collection, boolean writing) void
SharedSessionContractImplementor.initializeCollection
(PersistentCollection<?> collection, boolean writing) Initialize the given collection (if not already initialized).void
SharedSessionDelegatorBaseImpl.initializeCollection
(PersistentCollection<?> collection, boolean writing) boolean
CollectionEntry.isSnapshotEmpty
(PersistentCollection<?> collection) void
EntityEntry.overwriteLoadedStateCollectionValue
(String propertyName, PersistentCollection<?> collection) void
CollectionEntry.postFlush
(PersistentCollection<?> collection) Called after a successful flushvoid
CollectionEntry.postInitialize
(PersistentCollection<?> collection, SharedSessionContractImplementor session) void
CollectionEntry.preFlush
(PersistentCollection<?> collection) PersistenceContext.removeCollectionEntry
(PersistentCollection<?> collection) Remove aPersistentCollection
from thePersistenceContext
.void
PersistenceContext.replaceCollection
(CollectionPersister persister, PersistentCollection<?> oldCollection, PersistentCollection<?> collection) Replaces a directly accessible collection with the given onevoid
CollectionEntry.resetStoredSnapshot
(PersistentCollection<?> collection, Serializable storedSnapshot) Reset the stored snapshot for both the persistent collection and this collection entry.Method parameters in org.hibernate.engine.spi with type arguments of type PersistentCollectionModifier and TypeMethodDescriptionvoid
PersistenceContext.forEachCollectionEntry
(BiConsumer<PersistentCollection<?>, CollectionEntry> action, boolean concurrent) Execute some action on each entry of the collectionEntries map, optionally iterating on a defensive copy.void
PersistenceContext.initializeNonLazyCollections
(Consumer<PersistentCollection<?>> initializeAction) Force initialization of all non-lazy collections encountered during the current two-phase load (actually, this is a no-op, unless this is the "outermost" load) allowing to customize how the initialization should occurConstructors in org.hibernate.engine.spi with parameters of type PersistentCollectionModifierConstructorDescriptionCollectionEntry
(PersistentCollection<?> collection, SessionFactoryImplementor factory) For initialized detached collectionsCollectionEntry
(PersistentCollection<?> collection, CollectionPersister loadedPersister, Object loadedKey, boolean ignore) For collections just loaded from the databaseCollectionEntry
(CollectionPersister persister, PersistentCollection<?> collection) For newly wrapped collections, or dereferenced collection wrappers -
Uses of PersistentCollection in org.hibernate.envers.event.spi
Methods in org.hibernate.envers.event.spi with parameters of type PersistentCollectionModifier and TypeMethodDescriptionprotected final void
BaseEnversCollectionEventListener.onCollectionAction
(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) protected final void
BaseEnversCollectionEventListener.onCollectionActionInversed
(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) -
Uses of PersistentCollection in org.hibernate.event.spi
Methods in org.hibernate.event.spi that return PersistentCollectionMethods in org.hibernate.event.spi with parameters of type PersistentCollectionModifier and TypeMethodDescriptionprotected static CollectionPersister
AbstractCollectionEvent.getLoadedCollectionPersister
(PersistentCollection<?> collection, EventSource source) protected static Object
AbstractCollectionEvent.getLoadedOwnerIdOrNull
(PersistentCollection<?> collection, EventSource source) protected static Object
AbstractCollectionEvent.getLoadedOwnerOrNull
(PersistentCollection<?> collection, EventSource source) Constructors in org.hibernate.event.spi with parameters of type PersistentCollectionModifierConstructorDescriptionAbstractCollectionEvent
(PersistentCollection<?> collection, String entityName, Object affectedOwner, Object affectedOwnerId) Constructs an instance for a stateless session.AbstractCollectionEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source, Object affectedOwner, Object affectedOwnerId) Constructs an instance for a stateful session.InitializeCollectionEvent
(PersistentCollection<?> collection, EventSource source) PostCollectionRecreateEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PostCollectionRecreateEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source) PostCollectionRemoveEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PostCollectionRemoveEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source, Object loadedOwner) PostCollectionUpdateEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PostCollectionUpdateEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source) PreCollectionRecreateEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PreCollectionRecreateEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source) PreCollectionRemoveEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PreCollectionRemoveEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source, Object loadedOwner) PreCollectionUpdateEvent
(PersistentCollection<?> collection, Object id, String entityName, Object loadedOwner) PreCollectionUpdateEvent
(CollectionPersister collectionPersister, PersistentCollection<?> collection, EventSource source) -
Uses of PersistentCollection in org.hibernate.loader.ast.spi
Methods in org.hibernate.loader.ast.spi that return PersistentCollectionModifier and TypeMethodDescriptionCollectionLoader.load
(Object key, SharedSessionContractImplementor session) Load a collection by its key (not necessarily the same as its owner's PK). -
Uses of PersistentCollection in org.hibernate.persister.collection
Methods in org.hibernate.persister.collection with parameters of type PersistentCollectionModifier and TypeMethodDescriptionvoid
BasicCollectionPersister.deleteRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
CollectionPersister.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Delete the persistent state of any elements that were removed from the collectionvoid
OneToManyPersister.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) protected abstract void
AbstractCollectionPersister.doProcessQueuedOps
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) protected void
BasicCollectionPersister.doProcessQueuedOps
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) protected void
OneToManyPersister.doProcessQueuedOps
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
BasicCollectionPersister.insertRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
CollectionPersister.insertRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Insert the persistent state of any new collection elementsvoid
OneToManyPersister.insertRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
AbstractCollectionPersister.processQueuedOps
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) void
CollectionPersister.processQueuedOps
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Process queued operations within the PersistentCollection.void
BasicCollectionPersister.recreate
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
CollectionPersister.recreate
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) (Re)create the collection's persistent statevoid
OneToManyPersister.recreate
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
BasicCollectionPersister.updateRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) void
CollectionPersister.updateRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Update the persistent state of any elements that were modifiedvoid
OneToManyPersister.updateRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) -
Uses of PersistentCollection in org.hibernate.persister.collection.mutation
Methods in org.hibernate.persister.collection.mutation with parameters of type PersistentCollectionModifier and TypeMethodDescriptionvoid
RowMutationOperations.Restrictions.applyRestrictions
(PersistentCollection<?> collection, Object key, Object rowValue, int rowPosition, SharedSessionContractImplementor session, JdbcValueBindings jdbcValueBindings) void
RowMutationOperations.Values.applyValues
(PersistentCollection<?> collection, Object key, Object rowValue, int rowPosition, SharedSessionContractImplementor session, JdbcValueBindings jdbcValueBindings) void
DeleteRowsCoordinator.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Perform the deletionsvoid
DeleteRowsCoordinatorNoOp.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) void
DeleteRowsCoordinatorStandard.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) void
DeleteRowsCoordinatorTablePerSubclass.deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) protected abstract int
AbstractUpdateRowsCoordinator.doUpdate
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) protected int
UpdateRowsCoordinatorOneToMany.doUpdate
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) protected int
UpdateRowsCoordinatorStandard.doUpdate
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) protected int
UpdateRowsCoordinatorTablePerSubclass.doUpdate
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) default boolean
InsertRowsCoordinator.EntryFilter.exclude
(Object entry, int i, PersistentCollection<?> collection, PluralAttributeMapping attributeDescriptor) boolean
InsertRowsCoordinator.EntryFilter.include
(Object entry, int position, PersistentCollection<?> collection, PluralAttributeMapping attributeDescriptor) Whether the entry should be includedvoid
InsertRowsCoordinator.insertRows
(PersistentCollection<?> collection, Object id, InsertRowsCoordinator.EntryFilter entryChecker, SharedSessionContractImplementor session) Perform the creation.void
InsertRowsCoordinatorNoOp.insertRows
(PersistentCollection<?> collection, Object id, InsertRowsCoordinator.EntryFilter entryChecker, SharedSessionContractImplementor session) void
InsertRowsCoordinatorStandard.insertRows
(PersistentCollection<?> collection, Object id, InsertRowsCoordinator.EntryFilter entryChecker, SharedSessionContractImplementor session) void
InsertRowsCoordinatorTablePerSubclass.insertRows
(PersistentCollection<?> collection, Object id, InsertRowsCoordinator.EntryFilter entryChecker, SharedSessionContractImplementor session) void
AbstractUpdateRowsCoordinator.updateRows
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) void
UpdateRowsCoordinator.updateRows
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) void
UpdateRowsCoordinatorNoOp.updateRows
(Object key, PersistentCollection<?> collection, SharedSessionContractImplementor session) -
Uses of PersistentCollection in org.hibernate.pretty
Methods in org.hibernate.pretty with parameters of type PersistentCollectionModifier and TypeMethodDescriptionstatic String
MessageHelper.collectionInfoString
(@Nullable CollectionPersister persister, @Nullable PersistentCollection<?> collection, Object collectionKey, SharedSessionContractImplementor session) Generate an info message string relating to a particular managed collection. -
Uses of PersistentCollection in org.hibernate.sql.results.graph.collection
Methods in org.hibernate.sql.results.graph.collection that return PersistentCollectionModifier and TypeMethodDescription@Nullable PersistentCollection
<?> CollectionInitializer.getCollectionInstance
(Data data) default @Nullable PersistentCollection
<?> CollectionInitializer.getCollectionInstance
(RowProcessingState rowProcessingState) LoadingCollectionEntry.getCollectionInstance()
The collection instance being loaded -
Uses of PersistentCollection in org.hibernate.type
Methods in org.hibernate.type that return PersistentCollectionModifier and TypeMethodDescriptionArrayType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) BagType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) abstract PersistentCollection
<?> CollectionType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) Instantiate an uninitialized collection wrapper or holder.CustomCollectionType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) IdentifierBagType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) ListType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) MapType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) SetType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) SortedMapType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) SortedSetType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister, Object key) ArrayType.wrap
(SharedSessionContractImplementor session, Object array) BagType.wrap
(SharedSessionContractImplementor session, Object collection) abstract PersistentCollection
<?> CollectionType.wrap
(SharedSessionContractImplementor session, Object collection) Wrap the naked collection instance in a wrapper, or instantiate a holder.CustomCollectionType.wrap
(SharedSessionContractImplementor session, Object collection) IdentifierBagType.wrap
(SharedSessionContractImplementor session, Object collection) ListType.wrap
(SharedSessionContractImplementor session, Object collection) MapType.wrap
(SharedSessionContractImplementor session, Object collection) SetType.wrap
(SharedSessionContractImplementor session, Object collection) SortedMapType.wrap
(SharedSessionContractImplementor session, Object collection) SortedSetType.wrap
(SharedSessionContractImplementor session, Object collection) -
Uses of PersistentCollection in org.hibernate.usertype
Methods in org.hibernate.usertype that return PersistentCollectionModifier and TypeMethodDescriptionUserCollectionType.instantiate
(SharedSessionContractImplementor session, CollectionPersister persister) Instantiate an uninitialized instance of the collection wrapperUserCollectionType.wrap
(SharedSessionContractImplementor session, Object collection) Wrap an instance of a collection