org.hibernate.collection
Class PersistentSortedMap

java.lang.Object
  extended by org.hibernate.collection.AbstractPersistentCollection
      extended by org.hibernate.collection.PersistentMap
          extended by org.hibernate.collection.PersistentSortedMap
All Implemented Interfaces:
java.io.Serializable, java.util.Map, java.util.SortedMap, PersistentCollection

public class PersistentSortedMap
extends PersistentMap
implements java.util.SortedMap

A persistent wrapper for a java.util.SortedMap. Underlying collection is a TreeMap.

Author:
e
See Also:
TreeMap, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection
AbstractPersistentCollection.DelayedOperation
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected  java.util.Comparator comparator
           
 
Fields inherited from class org.hibernate.collection.PersistentMap
map
 
Fields inherited from class org.hibernate.collection.AbstractPersistentCollection
UNKNOWN
 
Constructor Summary
PersistentSortedMap()
           
PersistentSortedMap(SessionImplementor session)
           
PersistentSortedMap(SessionImplementor session, java.util.SortedMap map)
           
 
Method Summary
 java.util.Comparator comparator()
           
 java.lang.Object firstKey()
           
 java.util.SortedMap headMap(java.lang.Object toKey)
           
 java.lang.Object lastKey()
           
 void setComparator(java.util.Comparator comparator)
           
protected  java.io.Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode)
           
 java.util.SortedMap subMap(java.lang.Object fromKey, java.lang.Object toKey)
           
 java.util.SortedMap tailMap(java.lang.Object fromKey)
           
 
Methods inherited from class org.hibernate.collection.PersistentMap
beforeInitialize, clear, containsKey, containsValue, disassemble, empty, entries, entryExists, entrySet, equals, equalsSnapshot, get, getDeletes, getElement, getIndex, getOrphans, getSnapshot, getSnapshotElement, hashCode, initializeFromCache, isEmpty, isSnapshotEmpty, isWrapper, keySet, needsInserting, needsUpdating, put, putAll, readFrom, remove, size, toString, values
 
Methods inherited from class org.hibernate.collection.AbstractPersistentCollection
afterInitialize, afterRowInsert, beginRead, clearDirty, dirty, endRead, forceInitialization, getCachedSize, getIdentifier, getKey, getOrphans, getOwner, getQueuedOrphans, getRole, getSession, getSnapshot, getStoredSnapshot, getValue, hasQueuedOperations, initialize, isClearQueueEnabled, isDirectlyAccessible, isDirty, isOperationQueueEnabled, isPutQueueEnabled, isRowUpdatePossible, 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.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

comparator

protected java.util.Comparator comparator
Constructor Detail

PersistentSortedMap

public PersistentSortedMap(SessionImplementor session)

PersistentSortedMap

public PersistentSortedMap(SessionImplementor session,
                           java.util.SortedMap map)

PersistentSortedMap

public PersistentSortedMap()
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.SortedMap
See Also:
comparator()

subMap

public java.util.SortedMap subMap(java.lang.Object fromKey,
                                  java.lang.Object toKey)
Specified by:
subMap in interface java.util.SortedMap
See Also:
subMap(Object, Object)

headMap

public java.util.SortedMap headMap(java.lang.Object toKey)
Specified by:
headMap in interface java.util.SortedMap
See Also:
headMap(Object)

tailMap

public java.util.SortedMap tailMap(java.lang.Object fromKey)
Specified by:
tailMap in interface java.util.SortedMap
See Also:
tailMap(Object)

firstKey

public java.lang.Object firstKey()
Specified by:
firstKey in interface java.util.SortedMap
See Also:
firstKey()

lastKey

public java.lang.Object lastKey()
Specified by:
lastKey in interface java.util.SortedMap
See Also:
lastKey()


Copyright © 2008 Hibernate.org. All Rights Reserved.