Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.collection.AbstractPersistentCollection
org.hibernate.collection.PersistentMap
java.util.HashMap
Nested Class Summary |
Nested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection | |
AbstractPersistentCollection.DelayedOperation |
Field Summary | |
protected Map |
Fields inherited from class org.hibernate.collection.AbstractPersistentCollection | |
UNKNOWN |
Constructor Summary | |
| |
| |
|
Method Summary | |
void |
|
void |
|
boolean |
|
boolean |
|
Serializable |
|
boolean |
|
Iterator |
|
boolean |
|
Set |
|
boolean |
|
boolean |
|
Object |
|
Iterator |
|
Object |
|
Object |
|
Collection |
|
Serializable |
|
Object |
|
int |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
Set |
|
boolean |
|
boolean |
|
Object |
|
void |
|
Object |
|
Object |
|
int |
|
String |
|
Collection |
|
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 void beforeInitialize(CollectionPersister persister, int anticipatedSize)
Called before any elements are read into the collection, allowing appropriate initializations to occur.
- Specified by:
- beforeInitialize in interface PersistentCollection
- Parameters:
persister
- The underlying collection persister.anticipatedSize
- The anticipated size of the collection after initilization is complete.
public void clear()
- See Also:
java.util.Map.clear()
public boolean containsKey(Object key)
- See Also:
java.util.Map.containsKey(Object)
public boolean containsValue(Object value)
- See Also:
java.util.Map.containsValue(Object)
public Serializable disassemble(CollectionPersister persister) throws HibernateException
Disassemble the collection, ready for the cache
- Specified by:
- disassemble in interface PersistentCollection
public boolean empty()
Is the initialized collection empty?
- Specified by:
- empty in interface PersistentCollection
- Overrides:
- empty in interface AbstractPersistentCollection
public Iterator entries(CollectionPersister persister)
Iterate all collection entries, during update of the database
- Specified by:
- entries in interface PersistentCollection
public boolean entryExists(Object entry, int i)
Does an element exist at this entry in the collection?
- Specified by:
- entryExists in interface PersistentCollection
public Set entrySet()
- See Also:
java.util.Map.entrySet()
public boolean equals(Object other)
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException
Does the current state exactly match the snapshot?
- Specified by:
- equalsSnapshot in interface PersistentCollection
public Object get(Object key)
- See Also:
java.util.Map.get(Object)
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException
Get all the elements that need deleting
- Specified by:
- getDeletes in interface PersistentCollection
public Object getElement(Object entry)
Get the value of the given collection entry
- Specified by:
- getElement in interface PersistentCollection
public Object getIndex(Object entry, int i, CollectionPersister persister)
Get the index of the given collection entry
- Specified by:
- getIndex in interface PersistentCollection
- Parameters:
persister
- it was more elegant before we added this...
public Collection getOrphans(Serializable snapshot, String entityName) throws HibernateException
get all "orphaned" elements
- Specified by:
- getOrphans in interface PersistentCollection
- Overrides:
- getOrphans in interface AbstractPersistentCollection
public Serializable getSnapshot(CollectionPersister persister) throws HibernateException
Return a new snapshot of the current state of the collection
- Specified by:
- getSnapshot in interface PersistentCollection
public Object getSnapshotElement(Object entry, int i)
Get the snapshot value of the given collection entry
- Specified by:
- getSnapshotElement in interface PersistentCollection
public int hashCode()
public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
Read the state of the collection from a disassembled cached value
- Specified by:
- initializeFromCache in interface PersistentCollection
public boolean isEmpty()
- See Also:
java.util.Map.isEmpty()
public boolean isSnapshotEmpty(Serializable snapshot)
Is the snapshot empty?
- Specified by:
- isSnapshotEmpty in interface PersistentCollection
public boolean isWrapper(Object collection)
Is this the wrapper for the given underlying collection instance?
- Specified by:
- isWrapper in interface PersistentCollection
public Set keySet()
- See Also:
java.util.Map.keySet()
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
Do we need to insert this element?
- Specified by:
- needsInserting in interface PersistentCollection
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException
Do we need to update this element?
- Specified by:
- needsUpdating in interface PersistentCollection
public Object put(Object key, Object value)
- See Also:
java.util.Map.put(Object, Object)
public void putAll(Map puts)
- See Also:
java.util.Map.putAll(java.util.Map puts)
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException
Read a row from the JDBC result set
- Specified by:
- readFrom in interface PersistentCollection
public Object remove(Object key)
- See Also:
java.util.Map.remove(Object)
public int size()
- See Also:
java.util.Map.size()
public String toString()
public Collection values()
- See Also:
java.util.Map.values()