|
|||||||||||
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 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()
size
in interface Map
Map.size()
public boolean isEmpty()
isEmpty
in interface Map
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)
get
in interface Map
Map.get(Object)
public Object put(Object key, Object value)
put
in interface Map
Map.put(Object, Object)
public Object remove(Object key)
remove
in interface Map
Map.remove(Object)
public void putAll(Map puts)
putAll
in interface Map
Map.putAll(java.util.Map puts)
public void clear()
clear
in interface Map
Map.clear()
public Set keySet()
keySet
in interface Map
Map.keySet()
public Collection values()
values
in interface Map
Map.values()
public Set entrySet()
entrySet
in interface Map
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
HibernateException
SQLException
PersistentCollection.writeTo(PreparedStatement, CollectionPersister, Object, int, boolean)
public Object readFrom(ResultSet rs, CollectionPersister persister, Object owner) throws HibernateException, SQLException
PersistentCollection
readFrom
in class PersistentCollection
HibernateException
SQLException
PersistentCollection.readFrom(ResultSet, CollectionPersister, Object)
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)
equals
in interface Map
public int hashCode()
hashCode
in interface Map
public boolean entryExists(Object entry, int i)
PersistentCollection
entryExists
in class PersistentCollection
PersistentCollection.entryExists(java.lang.Object, int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |