org.hibernate.collection
Class PersistentSortedSet

java.lang.Object
  extended by org.hibernate.collection.AbstractPersistentCollection
      extended by org.hibernate.collection.PersistentSet
          extended by org.hibernate.collection.PersistentSortedSet
All Implemented Interfaces:
Serializable, Iterable, Collection, Set, SortedSet, PersistentCollection

public class PersistentSortedSet
extends PersistentSet
implements SortedSet

A persistent wrapper for a java.util.SortedSet. Underlying collection is a TreeSet.

Author:
e
See Also:
TreeSet, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection
AbstractPersistentCollection.DelayedOperation
 
Field Summary
protected  Comparator comparator
           
 
Fields inherited from class org.hibernate.collection.PersistentSet
set, tempList
 
Fields inherited from class org.hibernate.collection.AbstractPersistentCollection
UNKNOWN
 
Constructor Summary
PersistentSortedSet()
           
PersistentSortedSet(SessionImplementor session)
           
PersistentSortedSet(SessionImplementor session, SortedSet set)
           
 
Method Summary
 Comparator comparator()
           
 Object first()
           
 SortedSet headSet(Object toElement)
           
 Object last()
           
 void setComparator(Comparator comparator)
           
protected  Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode)
           
 SortedSet subSet(Object fromElement, Object toElement)
           
 SortedSet tailSet(Object fromElement)
           
 
Methods inherited from class org.hibernate.collection.PersistentSet
add, addAll, beforeInitialize, beginRead, clear, contains, containsAll, disassemble, empty, endRead, entries, entryExists, equals, equalsSnapshot, getDeletes, getElement, getIndex, getOrphans, getSnapshot, getSnapshotElement, hashCode, initializeFromCache, isEmpty, isRowUpdatePossible, isSnapshotEmpty, isWrapper, iterator, needsInserting, needsUpdating, readFrom, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class org.hibernate.collection.AbstractPersistentCollection
afterInitialize, afterRowInsert, clearDirty, dirty, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, getValue, hasQueuedOperations, initialize, isClearQueueEnabled, isDirectlyAccessible, isDirty, isOperationQueueEnabled, isPutQueueEnabled, isUnreferenced, needsRecreate, performQueuedOperations, postAction, preInsert, queuedAdditionIterator, queueOperation, read, readElementByIndex, readElementExistence, readIndexExistence, readSize, 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.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

comparator

protected Comparator comparator
Constructor Detail

PersistentSortedSet

public PersistentSortedSet(SessionImplementor session)

PersistentSortedSet

public PersistentSortedSet(SessionImplementor session,
                           SortedSet set)

PersistentSortedSet

public PersistentSortedSet()
Method Detail

snapshot

protected Serializable snapshot(BasicCollectionPersister persister,
                                EntityMode entityMode)
                         throws HibernateException
Throws:
HibernateException

setComparator

public void setComparator(Comparator comparator)

comparator

public Comparator comparator()
Specified by:
comparator in interface SortedSet
See Also:
comparator()

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)
Specified by:
subSet in interface SortedSet
See Also:
subSet(Object,Object)

headSet

public SortedSet headSet(Object toElement)
Specified by:
headSet in interface SortedSet
See Also:
headSet(Object)

tailSet

public SortedSet tailSet(Object fromElement)
Specified by:
tailSet in interface SortedSet
See Also:
tailSet(Object)

first

public Object first()
Specified by:
first in interface SortedSet
See Also:
first()

last

public Object last()
Specified by:
last in interface SortedSet
See Also:
last()