Class ReloadablePersistentSet<T>
java.lang.Object
org.hibernate.collection.spi.AbstractPersistentCollection<T>
org.hibernate.collection.spi.PersistentSet<T>
ch.tocco.nice2.persist.core.impl.hibernate.usertype.ReloadablePersistentSet<T>
- All Implemented Interfaces:
Serializable
,Iterable<T>
,Collection<T>
,Set<T>
,org.hibernate.collection.spi.LazyInitializable
,org.hibernate.collection.spi.PersistentCollection<T>
public class ReloadablePersistentSet<T>
extends org.hibernate.collection.spi.PersistentSet<T>
Extension of
PersistentSet
which supports reloading.
Added and removed entities are tracked locally and are re-added/removed after reloading.
If a removed entity is not part of the reloaded collection, an exception is thrown, as the remove would get lost.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
org.hibernate.collection.spi.AbstractPersistentCollection.AbstractValueDelayedOperation, org.hibernate.collection.spi.AbstractPersistentCollection.DelayedOperation<E>, org.hibernate.collection.spi.AbstractPersistentCollection.IteratorProxy<E>, org.hibernate.collection.spi.AbstractPersistentCollection.LazyInitializationWork<T>, org.hibernate.collection.spi.AbstractPersistentCollection.ListIteratorProxy, org.hibernate.collection.spi.AbstractPersistentCollection.ListProxy, org.hibernate.collection.spi.AbstractPersistentCollection.SetProxy<E>, org.hibernate.collection.spi.AbstractPersistentCollection.ValueDelayedOperation<E>
-
Field Summary
Fields inherited from class org.hibernate.collection.spi.PersistentSet
set
Fields inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
elementRemoved, UNKNOWN
-
Constructor Summary
ConstructorsConstructorDescriptionReloadablePersistentSet
(org.hibernate.engine.spi.SharedSessionContractImplementor session) ReloadablePersistentSet
(org.hibernate.engine.spi.SharedSessionContractImplementor session, Set set) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
endRead()
boolean
isSnapshotEmpty
(Serializable snapshot) void
void
reloadCollection
(org.hibernate.engine.spi.SessionImplementor session) boolean
Methods inherited from class org.hibernate.collection.spi.PersistentSet
addAll, clear, contains, containsAll, disassemble, empty, entries, entryExists, equals, equalsSnapshot, getDeletes, getElement, getIndex, getOrphans, getSnapshot, getSnapshotElement, hashCode, initializeEmptyCollection, initializeFromCache, injectLoadedState, isEmpty, isRowUpdatePossible, isWrapper, iterator, needsInserting, needsUpdating, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
afterInitialize, afterRowInsert, beforeInitialize, beginRead, clearDirty, clearOperationQueue, dirty, elementByIndex, elementExists, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSize, getSnapshot, getStoredSnapshot, getValue, hasQueuedOperations, identityRemove, initialize, isClearQueueEnabled, isConnectedToSession, isDirectlyAccessible, isDirty, isElementRemoved, isInitialized, isInitializing, isInverseCollection, isInverseCollectionNoOrphanDelete, isInverseOneToManyOrNoOrphanDelete, isOperationQueueEnabled, isPutQueueEnabled, isUnreferenced, needsRecreate, performQueuedOperations, preInsert, prepareForPossibleLoadingOutsideTransaction, queuedAdditionIterator, queueOperation, read, readElementByIndex, readElementExistence, readIndexExistence, readSize, replaceQueuedOperationValues, setCurrentSession, setDirectlyAccessible, setInitialized, setOwner, setSnapshot, unsetSession, wasInitialized, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.hibernate.collection.spi.PersistentCollection
includeInInsert, includeInRecreate, isDirectlyProvidedCollection, isNewlyInstantiated, needsUpdating, render
Methods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
Method Details
-
add
-
remove
-
endRead
public boolean endRead() -
postAction
public void postAction() -
isSnapshotEmpty
-
reloadCollection
public void reloadCollection(org.hibernate.engine.spi.SessionImplementor session)
-