public class

PersistentMap

extends AbstractPersistentCollection
implements Map<K, V>
java.lang.Object
   ↳ org.hibernate.collection.AbstractPersistentCollection
     ↳ org.hibernate.collection.PersistentMap
Known Direct Subclasses

Class Overview

A persistent wrapper for a java.util.Map. Underlying collection is a HashMap.

See Also
  • java.util.HashMap

Summary

Fields
protected Map map
[Expand]
Inherited Fields
From class org.hibernate.collection.AbstractPersistentCollection
Public Constructors
PersistentMap()
Empty constructor.
PersistentMap(SessionImplementor session)
Instantiates a lazy map (the underlying map is un-initialized).
PersistentMap(SessionImplementor session, Map map)
Instantiates a non-lazy map (the underlying map is constructed from the incoming map reference).
Public Methods
void beforeInitialize(CollectionPersister persister, int anticipatedSize)
void clear()
boolean containsKey(Object key)
boolean containsValue(Object value)
Serializable disassemble(CollectionPersister persister)
boolean empty()
Is the initialized collection empty?
Iterator entries(CollectionPersister persister)
boolean entryExists(Object entry, int i)
Set entrySet()
boolean equals(Object other)
boolean equalsSnapshot(CollectionPersister persister)
Object get(Object key)
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 isSnapshotEmpty(Serializable snapshot)
boolean isWrapper(Object collection)
Set keySet()
boolean needsInserting(Object entry, int i, Type elemType)
boolean needsUpdating(Object entry, int i, Type elemType)
Object put(Object key, Object value)
void putAll(Map puts)
Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
Object remove(Object key)
int size()
String toString()
Collection values()
[Expand]
Inherited Methods
From class org.hibernate.collection.AbstractPersistentCollection
From class java.lang.Object
From interface java.util.Map
From interface org.hibernate.collection.PersistentCollection

Fields

protected Map map

Public Constructors

public PersistentMap ()

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 PersistentMap (SessionImplementor session)

Instantiates a lazy map (the underlying map is un-initialized).

Parameters
session The session to which this map will belong.

public PersistentMap (SessionImplementor session, Map map)

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

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

Public Methods

public void beforeInitialize (CollectionPersister persister, int anticipatedSize)

public void clear ()

See Also

public boolean containsKey (Object key)

public boolean containsValue (Object value)

public Serializable disassemble (CollectionPersister persister)

public boolean empty ()

Is the initialized collection empty?

public Iterator entries (CollectionPersister persister)

public boolean entryExists (Object entry, int i)

public Set entrySet ()

See Also

public boolean equals (Object other)

public boolean equalsSnapshot (CollectionPersister persister)

public Object get (Object key)

See Also

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 isSnapshotEmpty (Serializable snapshot)

public boolean isWrapper (Object collection)

public Set keySet ()

See Also

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

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

public Object put (Object key, Object value)

public void putAll (Map puts)

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

public Object remove (Object key)

See Also

public int size ()

See Also

public String toString ()

public Collection values ()

See Also