|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.hibernate.collection.PersistentCollection
net.sf.hibernate.collection.Map
A persistent wrapper for a java.util.Map. Underlying collection is a HashMap.
HashMap,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
Map.Entry |
| Constructor Summary | |
Map()
|
|
Map(SessionImplementor session)
|
|
Map(SessionImplementor session,
Map map)
|
|
| Method Summary | |
void |
beforeInitialize(CollectionPersister persister)
Called before any elements are read into the collection, allowing appropriate initializations to occur. |
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Serializable |
disassemble(CollectionPersister persister)
Disassemble the collection, ready for the cache |
boolean |
empty()
Is the initialized collection empty? |
Iterator |
entries()
Iterate all collection entries, during update of the database |
boolean |
entryExists(Object entry,
int i)
Does an element exist at this entry in the collection? |
Set |
entrySet()
|
boolean |
equals(Object other)
|
boolean |
equalsSnapshot(Type elementType)
Does the current state exactly match the snapshot? |
Object |
get(Object key)
|
Iterator |
getDeletes(Type elemType)
Get all the elements that need deleting |
Object |
getIndex(Object entry,
int i)
Get the index of the given collection entry |
Collection |
getOrphans(Serializable snapshot)
get all "orphaned" elements |
int |
hashCode()
|
void |
initializeFromCache(CollectionPersister persister,
Serializable disassembled,
Object owner)
Read the state of the collection from a disassembled cached value |
boolean |
isEmpty()
|
boolean |
isWrapper(Object collection)
Is this the wrapper for the given underlying collection instance? |
Set |
keySet()
|
boolean |
needsInserting(Object entry,
int i,
Type elemType)
Do we need to insert this element? |
boolean |
needsUpdating(Object entry,
int i,
Type elemType)
Do we need to update this element? |
Object |
put(Object key,
Object value)
|
void |
putAll(Map puts)
|
Object |
readFrom(ResultSet rs,
CollectionPersister persister,
Object owner)
Read a row from the JDBC result set |
Object |
remove(Object key)
|
int |
size()
|
protected Serializable |
snapshot(CollectionPersister persister)
Return a new snapshot of the current state |
String |
toString()
|
Collection |
values()
|
void |
writeTo(PreparedStatement st,
CollectionPersister persister,
Object entry,
int i,
boolean writeOrder)
Write a row to the JDBC prepared statement |
| Methods inherited from class net.sf.hibernate.collection.PersistentCollection |
afterRowInsert, beginRead, delayedAddAll, endRead, forceInitialization, getCollectionSnapshot, getOrphans, getSession, getSnapshot, getSnapshot, getValue, hasQueuedAdditions, initialize, isDirectlyAccessible, needsRecreate, postFlush, preInsert, queueAdd, queueAddAll, queuedAdditionIterator, read, setCollectionSnapshot, setCurrentSession, setDirectlyAccessible, setInitialized, unsetSession, wasInitialized, write |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Map(SessionImplementor session)
public Map()
public Map(SessionImplementor session, Map map)
| Method Detail |
protected Serializable snapshot(CollectionPersister persister) throws HibernateException
PersistentCollection
snapshot in class PersistentCollectionHibernateExceptionpublic Collection getOrphans(Serializable snapshot) throws HibernateException
PersistentCollection
getOrphans in class PersistentCollectionHibernateExceptionpublic boolean equalsSnapshot(Type elementType) throws HibernateException
PersistentCollection
equalsSnapshot in class PersistentCollectionHibernateExceptionpublic boolean isWrapper(Object collection)
PersistentCollection
isWrapper in class PersistentCollectionpublic void beforeInitialize(CollectionPersister persister)
PersistentCollection
beforeInitialize in class PersistentCollectionpublic int size()
Map.size()public boolean isEmpty()
Map.isEmpty()public boolean containsKey(Object key)
containsKey in interface MapMap.containsKey(Object)public boolean containsValue(Object value)
containsValue in interface MapMap.containsValue(Object)public Object get(Object key)
Map.get(Object)public Object put(Object key, Object value)
Map.put(Object, Object)public Object remove(Object key)
Map.remove(Object)public void putAll(Map puts)
Map.putAll(java.util.Map puts)public void clear()
Map.clear()public Set keySet()
Map.keySet()public Collection values()
Map.values()public Set entrySet()
Map.entrySet()public boolean empty()
PersistentCollection
empty in class PersistentCollectionpublic String toString()
public void writeTo(PreparedStatement st, CollectionPersister persister, Object entry, int i, boolean writeOrder) throws HibernateException, SQLException
PersistentCollection
writeTo in class PersistentCollectionpublic Object readFrom(ResultSet rs, CollectionPersister persister, Object owner) throws HibernateException, SQLException
PersistentCollection
readFrom in class PersistentCollectionpublic Iterator entries()
PersistentCollection
entries in class PersistentCollectionPersistentCollection.entries()public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
PersistentCollection
initializeFromCache in class PersistentCollectionHibernateExceptionpublic Serializable disassemble(CollectionPersister persister) throws HibernateException
PersistentCollection
disassemble in class PersistentCollectionHibernateExceptionpublic Iterator getDeletes(Type elemType) throws HibernateException
PersistentCollection
getDeletes in class PersistentCollectionHibernateExceptionpublic boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsInserting in class PersistentCollectionHibernateExceptionpublic boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsUpdating in class PersistentCollectionHibernateExceptionpublic Object getIndex(Object entry, int i)
PersistentCollection
getIndex in class PersistentCollectionpublic boolean equals(Object other)
public int hashCode()
public boolean entryExists(Object entry, int i)
PersistentCollection
entryExists in class PersistentCollection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||