|
|||||||||||
| 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 PersistentCollectionHibernateException
public Collection getOrphans(Serializable snapshot)
throws HibernateException
PersistentCollection
getOrphans in class PersistentCollectionHibernateException
public 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()
size in interface MapMap.size()public boolean isEmpty()
isEmpty in interface MapMap.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)
get in interface MapMap.get(Object)
public Object put(Object key,
Object value)
put in interface MapMap.put(Object, Object)public Object remove(Object key)
remove in interface MapMap.remove(Object)public void putAll(Map puts)
putAll in interface MapMap.putAll(java.util.Map puts)public void clear()
clear in interface MapMap.clear()public Set keySet()
keySet in interface MapMap.keySet()public Collection values()
values in interface MapMap.values()public Set entrySet()
entrySet in interface MapMap.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 PersistentCollectionHibernateException
SQLExceptionPersistentCollection.writeTo(PreparedStatement, CollectionPersister, Object, int, boolean)
public Object readFrom(ResultSet rs,
CollectionPersister persister,
Object owner)
throws HibernateException,
SQLException
PersistentCollection
readFrom in class PersistentCollectionHibernateException
SQLExceptionPersistentCollection.readFrom(ResultSet, CollectionPersister, Object)public Iterator entries()
PersistentCollection
entries in class PersistentCollectionPersistentCollection.entries()
public void initializeFromCache(CollectionPersister persister,
Serializable disassembled,
Object owner)
throws HibernateException
PersistentCollection
initializeFromCache in class PersistentCollectionHibernateException
public Serializable disassemble(CollectionPersister persister)
throws HibernateException
PersistentCollection
disassemble in class PersistentCollectionHibernateException
public Iterator getDeletes(Type elemType)
throws HibernateException
PersistentCollection
getDeletes in class PersistentCollectionHibernateException
public boolean needsInserting(Object entry,
int i,
Type elemType)
throws HibernateException
PersistentCollection
needsInserting in class PersistentCollectionHibernateException
public boolean needsUpdating(Object entry,
int i,
Type elemType)
throws HibernateException
PersistentCollection
needsUpdating in class PersistentCollectionHibernateException
public Object getIndex(Object entry,
int i)
PersistentCollection
getIndex in class PersistentCollectionpublic boolean equals(Object other)
equals in interface Mappublic int hashCode()
hashCode in interface Map
public boolean entryExists(Object entry,
int i)
PersistentCollection
entryExists in class PersistentCollectionPersistentCollection.entryExists(java.lang.Object, int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||