Package org.hibernate.collection.spi
Class PersistentSortedSet<E>
- java.lang.Object
-
- org.hibernate.collection.spi.AbstractPersistentCollection<E>
-
- org.hibernate.collection.spi.PersistentSet<E>
-
- org.hibernate.collection.spi.PersistentSortedSet<E>
-
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
,Set<E>
,SortedSet<E>
,LazyInitializable
,PersistentCollection<E>
@Incubating public class PersistentSortedSet<E> extends PersistentSet<E> implements SortedSet<E>
A persistent wrapper for aSortedSet
. Underlying collection is aTreeSet
.- See Also:
- Serialized Form
- API Note:
- Incubating in terms of making this non-internal. These contracts will be getting cleaned up in following releases.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
AbstractPersistentCollection.AbstractValueDelayedOperation, AbstractPersistentCollection.DelayedOperation<E>, AbstractPersistentCollection.IteratorProxy<E>, AbstractPersistentCollection.LazyInitializationWork<T>, AbstractPersistentCollection.ListIteratorProxy, AbstractPersistentCollection.ListProxy, AbstractPersistentCollection.SetProxy<E>, AbstractPersistentCollection.ValueDelayedOperation<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected Comparator<? super E>
comparator
-
Fields inherited from class org.hibernate.collection.spi.PersistentSet
set
-
Fields inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
elementRemoved, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description PersistentSortedSet()
Constructs a PersistentSortedSet.PersistentSortedSet(SharedSessionContractImplementor session, Comparator<E> comparator)
Constructs a PersistentSortedSetPersistentSortedSet(SharedSessionContractImplementor session, SortedSet<E> set)
Constructs a PersistentSortedSet
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparator<? super E>
comparator()
E
first()
SortedSet<E>
headSet(E toElement)
E
last()
void
setComparator(Comparator<? super E> comparator)
protected Serializable
snapshot(BasicCollectionPersister persister)
SortedSet<E>
subSet(E fromElement, E toElement)
SortedSet<E>
tailSet(E fromElement)
-
Methods inherited from class org.hibernate.collection.spi.PersistentSet
add, addAll, clear, contains, containsAll, disassemble, empty, entries, entryExists, equals, equalsSnapshot, getDeletes, getElement, getIndex, getOrphans, getSnapshot, getSnapshotElement, hashCode, initializeEmptyCollection, initializeFromCache, injectLoadedState, isEmpty, isRowUpdatePossible, isSnapshotEmpty, isWrapper, iterator, needsInserting, needsUpdating, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class org.hibernate.collection.spi.AbstractPersistentCollection
afterInitialize, afterRowInsert, beforeInitialize, beginRead, clearDirty, clearOperationQueue, dirty, elementByIndex, elementExists, endRead, 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, postAction, 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
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Field Detail
-
comparator
protected Comparator<? super E> comparator
-
-
Constructor Detail
-
PersistentSortedSet
public PersistentSortedSet()
Constructs a PersistentSortedSet. This form needed for SOAP libraries, etc
-
PersistentSortedSet
public PersistentSortedSet(SharedSessionContractImplementor session, Comparator<E> comparator)
Constructs a PersistentSortedSet- Parameters:
session
- The sessioncomparator
- The sort comparator
-
PersistentSortedSet
public PersistentSortedSet(SharedSessionContractImplementor session, SortedSet<E> set)
Constructs a PersistentSortedSet- Parameters:
session
- The sessionset
- The underlying set data
-
-
Method Detail
-
snapshot
protected Serializable snapshot(BasicCollectionPersister persister) throws HibernateException
- Throws:
HibernateException
-
setComparator
public void setComparator(Comparator<? super E> comparator)
-
comparator
public Comparator<? super E> comparator()
- Specified by:
comparator
in interfaceSortedSet<E>
-
-