org.hibernate.collection

Class PersistentSortedSet

Implemented Interfaces:
Serializable, 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:
java.util.TreeSet

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()
Empty constructor.
PersistentSortedSet(SessionImplementor session)
Constructor matching super.
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, beginRead, clearDirty, dirty, empty, endRead, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, getValue, hasQueuedOperations, initialize, isClearQueueEnabled, isDirectlyAccessible, isDirty, isOperationQueueEnabled, isPutQueueEnabled, isRowUpdatePossible, isUnreferenced, needsRecreate, performQueuedOperations, postAction, preInsert, queueOperation, queuedAdditionIterator, read, readElementByIndex, readElementExistence, readIndexExistence, readSize, setCurrentSession, setDirectlyAccessible, setInitialized, setOwner, setSnapshot, unsetSession, wasInitialized, write

Field Details

comparator

protected Comparator comparator

Constructor Details

PersistentSortedSet

public PersistentSortedSet()
Empty constructor.

Note: this form is not ever ever ever used by Hibernate; it is, however, needed for SOAP libraries and other such marshalling code.


PersistentSortedSet

public PersistentSortedSet(SessionImplementor session)
Constructor matching super. Instantiates a lazy set (the underlying set is un-initialized).
Parameters:
session - The session to which this set will belong.

PersistentSortedSet

public PersistentSortedSet(SessionImplementor session,
                           SortedSet set)

Method Details

comparator

public Comparator comparator()

first

public Object first()

headSet

public SortedSet headSet(Object toElement)

last

public Object last()

setComparator

public void setComparator(Comparator comparator)

snapshot

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

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)

tailSet

public SortedSet tailSet(Object fromElement)