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:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.Set, java.util.SortedSet, PersistentCollection

public class PersistentSortedSet
extends PersistentSet
implements java.util.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  java.util.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, java.util.SortedSet set)
           
 
Method Summary
 java.util.Comparator comparator()
           
 java.lang.Object first()
           
 java.util.SortedSet headSet(java.lang.Object toElement)
           
 java.lang.Object last()
           
 void setComparator(java.util.Comparator comparator)
           
protected  java.io.Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode)
           
 java.util.SortedSet subSet(java.lang.Object fromElement, java.lang.Object toElement)
           
 java.util.SortedSet tailSet(java.lang.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 java.util.Comparator comparator
Constructor Detail

PersistentSortedSet

public PersistentSortedSet(SessionImplementor session)

PersistentSortedSet

public PersistentSortedSet(SessionImplementor session,
                           java.util.SortedSet set)

PersistentSortedSet

public PersistentSortedSet()
Method Detail

snapshot

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

setComparator

public void setComparator(java.util.Comparator comparator)

comparator

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

subSet

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

headSet

public java.util.SortedSet headSet(java.lang.Object toElement)
Specified by:
headSet in interface java.util.SortedSet
See Also:
headSet(Object)

tailSet

public java.util.SortedSet tailSet(java.lang.Object fromElement)
Specified by:
tailSet in interface java.util.SortedSet
See Also:
tailSet(Object)

first

public java.lang.Object first()
Specified by:
first in interface java.util.SortedSet
See Also:
first()

last

public java.lang.Object last()
Specified by:
last in interface java.util.SortedSet
See Also:
last()


Copyright © 2008 Hibernate.org. All Rights Reserved.