Top Description Inners Fields Constructors Methods
org.hibernate.collection.internal

public Class PersistentSortedSet

extends PersistentSet
implements SortedSet
Class Inheritance
All Implemented Interfaces
java.util.SortedSet, java.util.SequencedSet, java.util.Set, java.util.Collection, java.lang.Iterable, java.util.SequencedCollection
Imports
java.io.Serializable, java.util.Comparator, .SortedSet, .TreeMap, org.hibernate.EntityMode, .HibernateException, org.hibernate.engine.spi.SessionImplementor, .SharedSessionContractImplementor, org.hibernate.persister.collection.BasicCollectionPersister

A persistent wrapper for a java.util.SortedSet. Underlying collection is a TreeSet.
Author
e
See Also
java.util.TreeSet

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
PersistentSortedSet.SubSetProxy

wrapper for subSets to propagate write to its backing set

Field Summary

Modifier and TypeField and Description
protected Comparator<T>
Inherited from org.hibernate.collection.internal.PersistentSet:
settempList

Constructor Summary

AccessConstructor and Description
public
PersistentSortedSet()

Constructs a PersistentSortedSet.

public
PersistentSortedSet(SharedSessionContractImplementor
The session
session
)

Constructs a PersistentSortedSet

public
PersistentSortedSet(SessionImplementor
The session
session
)

Deprecated PersistentSortedSet(SharedSessionContractImplementor) should be used instead.
Constructs a PersistentSortedSet
public
PersistentSortedSet(SharedSessionContractImplementor
The session
session
,
SortedSet<E>
The underlying set data
set
)

Constructs a PersistentSortedSet

public
PersistentSortedSet(SessionImplementor
The session
session
,
SortedSet<E>
The underlying set data
set
)

Constructs a PersistentSortedSet

Method Summary

Modifier and TypeMethod and Description
public Comparator<T>
comparator()

Implements java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.
public Object
first()

Implements java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.
public SortedSet<E>
headSet(Object
high endpoint (exclusive) of the returned set
toElement
)

Implements java.util.SortedSet.headSet.

Returns a view of the portion of this set whose elements are strictly less than toElement.
public Object
last()

Implements java.util.SortedSet.last.

Returns the last (highest) element currently in this set.
public void
setComparator(Comparator<T> comparator)

protected Serializable
public SortedSet<E>
subSet(Object
low endpoint (inclusive) of the returned set
fromElement
,
Object
high endpoint (exclusive) of the returned set
toElement
)

Implements java.util.SortedSet.subSet.

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
public SortedSet<E>
tailSet(Object
low endpoint (inclusive) of the returned set
fromElement
)

Implements java.util.SortedSet.tailSet.

Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
Inherited from org.hibernate.collection.internal.PersistentSet:
addaddAllbeforeInitializebeginReadclearcontainscontainsAlldisassembleemptyendReadentriesentryExistsequalsequalsSnapshotgetDeletesgetElementgetIndexgetOrphansgetSnapshotgetSnapshotElementhashCodeinitializeFromCacheisEmptyisRowUpdatePossibleisSnapshotEmptyisWrapperiteratorneedsInsertingneedsUpdatingreadFromremoveremoveAllretainAllsizetoArraytoArraytoString

Field Detail

comparatorback to summary
protected Comparator<T> comparator

Constructor Detail

PersistentSortedSetback to summary
public PersistentSortedSet()

Constructs a PersistentSortedSet. This form needed for SOAP libraries, etc

Annotations
@SuppressWarnings:UnusedDeclaration
PersistentSortedSetback to summary
public PersistentSortedSet(SharedSessionContractImplementor session)

Constructs a PersistentSortedSet

Parameters
session:SharedSessionContractImplementor

The session

PersistentSortedSetback to summary
public PersistentSortedSet(SessionImplementor session)

Deprecated

PersistentSortedSet(SharedSessionContractImplementor) should be used instead.

Constructs a PersistentSortedSet

Parameters
session:SessionImplementor

The session

Annotations
@Deprecated
PersistentSortedSetback to summary
public PersistentSortedSet(SharedSessionContractImplementor session, SortedSet<E> set)

Constructs a PersistentSortedSet

Parameters
session:SharedSessionContractImplementor

The session

set:SortedSet<E>

The underlying set data

PersistentSortedSetback to summary
public PersistentSortedSet(SessionImplementor session, SortedSet<E> set)

Constructs a PersistentSortedSet

Parameters
session:SessionImplementor

The session

set:SortedSet<E>

The underlying set data

Annotations
@Deprecated

Method Detail

comparatorback to summary
public Comparator<T> comparator()

Implements java.util.SortedSet.comparator.

Doc from java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.

Returns:Comparator<T>

the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements

Annotations
@Override
firstback to summary
public Object first()

Implements java.util.SortedSet.first.

Doc from java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.

Returns:Object

the first (lowest) element currently in this set

Annotations
@Override
@SuppressWarnings:unchecked
headSetback to summary
public SortedSet<E> headSet(Object toElement)

Implements java.util.SortedSet.headSet.

Doc from java.util.SortedSet.headSet.

Returns a view of the portion of this set whose elements are strictly less than toElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
toElement:Object

high endpoint (exclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements are strictly less than toElement

Annotations
@Override
@SuppressWarnings:unchecked
lastback to summary
public Object last()

Implements java.util.SortedSet.last.

Doc from java.util.SortedSet.last.

Returns the last (highest) element currently in this set.

Returns:Object

the last (highest) element currently in this set

Annotations
@Override
@SuppressWarnings:unchecked
setComparatorback to summary
public void setComparator(Comparator<T> comparator)
snapshotback to summary
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException
Annotations
@SuppressWarnings:unchecked, UnusedParameters
subSetback to summary
public SortedSet<E> subSet(Object fromElement, Object toElement)

Implements java.util.SortedSet.subSet.

Doc from java.util.SortedSet.subSet.

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
fromElement:Object

low endpoint (inclusive) of the returned set

toElement:Object

high endpoint (exclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive

Annotations
@Override
@SuppressWarnings:unchecked
tailSetback to summary
public SortedSet<E> tailSet(Object fromElement)

Implements java.util.SortedSet.tailSet.

Doc from java.util.SortedSet.tailSet.

Returns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
fromElement:Object

low endpoint (inclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements are greater than or equal to fromElement

Annotations
@Override
@SuppressWarnings:unchecked
org.hibernate.collection.internal back to summary

pack-priv Class PersistentSortedSet.SubSetProxy

extends SetProxy
implements SortedSet
Class Inheritance
All Implemented Interfaces
java.util.SortedSet, java.util.SequencedSet, java.util.Set, java.util.Collection, java.lang.Iterable, java.util.SequencedCollection

wrapper for subSets to propagate write to its backing set

Field Summary

Inherited from org.hibernate.collection.internal.AbstractPersistentCollection.SetProxy:
set

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Comparator<T>
comparator()

Implements java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.
public Object
first()

Implements java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.
public SortedSet<E>
headSet(Object
high endpoint (exclusive) of the returned set
toValue
)

Implements java.util.SortedSet.headSet.

Returns a view of the portion of this set whose elements are strictly less than toElement.
public Object
last()

Implements java.util.SortedSet.last.

Returns the last (highest) element currently in this set.
public SortedSet<E>
subSet(Object
low endpoint (inclusive) of the returned set
fromValue
,
Object
high endpoint (exclusive) of the returned set
toValue
)

Implements java.util.SortedSet.subSet.

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
public SortedSet<E>
tailSet(Object
low endpoint (inclusive) of the returned set
fromValue
)

Implements java.util.SortedSet.tailSet.

Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
Inherited from org.hibernate.collection.internal.AbstractPersistentCollection.SetProxy:
addaddAllclearcontainscontainsAllisEmptyiteratorremoveremoveAllretainAllsizetoArraytoArray

Constructor Detail

SubSetProxyback to summary
pack-priv SubSetProxy(SortedSet<E> s)

Method Detail

comparatorback to summary
public Comparator<T> comparator()

Implements java.util.SortedSet.comparator.

Doc from java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.

Returns:Comparator<T>

the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements

Annotations
@Override
@SuppressWarnings:unchecked
firstback to summary
public Object first()

Implements java.util.SortedSet.first.

Doc from java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.

Returns:Object

the first (lowest) element currently in this set

Annotations
@Override
@SuppressWarnings:unchecked
headSetback to summary
public SortedSet<E> headSet(Object toValue)

Implements java.util.SortedSet.headSet.

Doc from java.util.SortedSet.headSet.

Returns a view of the portion of this set whose elements are strictly less than toElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
toValue:Object

high endpoint (exclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements are strictly less than toElement

Annotations
@Override
@SuppressWarnings:unchecked
lastback to summary
public Object last()

Implements java.util.SortedSet.last.

Doc from java.util.SortedSet.last.

Returns the last (highest) element currently in this set.

Returns:Object

the last (highest) element currently in this set

Annotations
@Override
@SuppressWarnings:unchecked
subSetback to summary
public SortedSet<E> subSet(Object fromValue, Object toValue)

Implements java.util.SortedSet.subSet.

Doc from java.util.SortedSet.subSet.

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
fromValue:Object

low endpoint (inclusive) of the returned set

toValue:Object

high endpoint (exclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive

Annotations
@Override
@SuppressWarnings:unchecked
tailSetback to summary
public SortedSet<E> tailSet(Object fromValue)

Implements java.util.SortedSet.tailSet.

Doc from java.util.SortedSet.tailSet.

Returns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters
fromValue:Object

low endpoint (inclusive) of the returned set

Returns:SortedSet<E>

a view of the portion of this set whose elements are greater than or equal to fromElement

Annotations
@Override
@SuppressWarnings:unchecked