|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.collection.PersistentCollection net.sf.hibernate.collection.Map
A persistent wrapper for a java.util.Map. Underlying collection is a HashMap.
HashMap
,
Serialized FormNested 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 PersistentCollection
HibernateException
public Collection getOrphans(Serializable snapshot) throws HibernateException
PersistentCollection
getOrphans
in class PersistentCollection
HibernateException
public boolean equalsSnapshot(Type elementType) throws HibernateException
PersistentCollection
equalsSnapshot
in class PersistentCollection
HibernateException
public boolean isWrapper(Object collection)
PersistentCollection
isWrapper
in class PersistentCollection
public void beforeInitialize(CollectionPersister persister)
PersistentCollection
beforeInitialize
in class PersistentCollection
public int size()
Map.size()
public boolean isEmpty()
Map.isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map
Map.containsKey(Object)
public boolean containsValue(Object value)
containsValue
in interface Map
Map.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 PersistentCollection
public String toString()
public void writeTo(PreparedStatement st, CollectionPersister persister, Object entry, int i, boolean writeOrder) throws HibernateException, SQLException
PersistentCollection
writeTo
in class PersistentCollection
public Object readFrom(ResultSet rs, CollectionPersister persister, Object owner) throws HibernateException, SQLException
PersistentCollection
readFrom
in class PersistentCollection
public Iterator entries()
PersistentCollection
entries
in class PersistentCollection
PersistentCollection.entries()
public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
PersistentCollection
initializeFromCache
in class PersistentCollection
HibernateException
public Serializable disassemble(CollectionPersister persister) throws HibernateException
PersistentCollection
disassemble
in class PersistentCollection
HibernateException
public Iterator getDeletes(Type elemType) throws HibernateException
PersistentCollection
getDeletes
in class PersistentCollection
HibernateException
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsInserting
in class PersistentCollection
HibernateException
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsUpdating
in class PersistentCollection
HibernateException
public Object getIndex(Object entry, int i)
PersistentCollection
getIndex
in class PersistentCollection
public 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 |