public class

PersistentSet

extends AbstractPersistentCollection
implements Set<E>
java.lang.Object
   ↳ org.hibernate.collection.AbstractPersistentCollection
     ↳ org.hibernate.collection.PersistentSet
Known Direct Subclasses

Class Overview

A persistent wrapper for a java.util.Set. The underlying collection is a HashSet.

See Also
  • java.util.HashSet

Summary

Fields
protected Set set
protected List tempList
[Expand]
Inherited Fields
From class org.hibernate.collection.AbstractPersistentCollection
Public Constructors
PersistentSet()
Empty constructor.
PersistentSet(SessionImplementor session)
Constructor matching super.
PersistentSet(SessionImplementor session, Set set)
Instantiates a non-lazy set (the underlying set is constructed from the incoming set reference).
Public Methods
boolean add(Object value)
boolean addAll(Collection coll)
void beforeInitialize(CollectionPersister persister, int anticipatedSize)
void beginRead()
Called just before reading any rows from the JDBC result set
void clear()
boolean contains(Object object)
boolean containsAll(Collection coll)
Serializable disassemble(CollectionPersister persister)
boolean empty()
Is the initialized collection empty?
boolean endRead()
Called after reading all rows from the JDBC result set
Iterator entries(CollectionPersister persister)
boolean entryExists(Object key, int i)
boolean equals(Object other)
boolean equalsSnapshot(CollectionPersister persister)
Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula)
Object getElement(Object entry)
Object getIndex(Object entry, int i, CollectionPersister persister)
Collection getOrphans(Serializable snapshot, String entityName)
get all "orphaned" elements
Serializable getSnapshot(CollectionPersister persister)
Object getSnapshotElement(Object entry, int i)
int hashCode()
void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner)
boolean isEmpty()
boolean isRowUpdatePossible()
boolean isSnapshotEmpty(Serializable snapshot)
boolean isWrapper(Object collection)
Iterator iterator()
boolean needsInserting(Object entry, int i, Type elemType)
boolean needsUpdating(Object entry, int i, Type elemType)
Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
boolean remove(Object value)
boolean removeAll(Collection coll)
boolean retainAll(Collection coll)
int size()
Object[] toArray(Object[] array)
Object[] toArray()
String toString()
[Expand]
Inherited Methods
From class org.hibernate.collection.AbstractPersistentCollection
From class java.lang.Object
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.Set
From interface org.hibernate.collection.PersistentCollection

Fields

protected Set set

protected List tempList

Public Constructors

public PersistentSet ()

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.

public PersistentSet (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.

public PersistentSet (SessionImplementor session, Set set)

Instantiates a non-lazy set (the underlying set is constructed from the incoming set reference).

Parameters
session The session to which this set will belong.
set The underlying set data.

Public Methods

public boolean add (Object value)

See Also

public boolean addAll (Collection coll)

public void beforeInitialize (CollectionPersister persister, int anticipatedSize)

public void beginRead ()

Called just before reading any rows from the JDBC result set

public void clear ()

See Also

public boolean contains (Object object)

See Also

public boolean containsAll (Collection coll)

public Serializable disassemble (CollectionPersister persister)

public boolean empty ()

Is the initialized collection empty?

public boolean endRead ()

Called after reading all rows from the JDBC result set

public Iterator entries (CollectionPersister persister)

public boolean entryExists (Object key, int i)

public boolean equals (Object other)

public boolean equalsSnapshot (CollectionPersister persister)

public Iterator getDeletes (CollectionPersister persister, boolean indexIsFormula)

public Object getElement (Object entry)

public Object getIndex (Object entry, int i, CollectionPersister persister)

public Collection getOrphans (Serializable snapshot, String entityName)

get all "orphaned" elements

public Serializable getSnapshot (CollectionPersister persister)

public Object getSnapshotElement (Object entry, int i)

public int hashCode ()

public void initializeFromCache (CollectionPersister persister, Serializable disassembled, Object owner)

public boolean isEmpty ()

See Also

public boolean isRowUpdatePossible ()

public boolean isSnapshotEmpty (Serializable snapshot)

public boolean isWrapper (Object collection)

public Iterator iterator ()

See Also

public boolean needsInserting (Object entry, int i, Type elemType)

public boolean needsUpdating (Object entry, int i, Type elemType)

public Object readFrom (ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)

public boolean remove (Object value)

See Also

public boolean removeAll (Collection coll)

public boolean retainAll (Collection coll)

public int size ()

See Also

public Object[] toArray (Object[] array)

public Object[] toArray ()

See Also

public String toString ()