|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.pbeans.PersistentMap<TKey,TValue>
public class PersistentMap<TKey,TValue>
A persistent map of strings to Persistent objects.
Note: Use this class only when you need a map of keys to objects
of different types. If you simply need to retrieve
objects of a known type by a property value, use one
of the Store.selectParts(Object, Class, String) methods in Store.
| Constructor Summary | |
|---|---|
PersistentMap()
|
|
| Method Summary | |
|---|---|
TValue |
get(TKey key)
Gets a persistent instance mapped to a string. |
java.lang.String |
getName()
|
TValue |
getObject(TKey key)
|
Store |
getStore()
|
TValue |
put(TKey key,
TValue value)
Maps a key to a value. |
TValue |
putObject(TKey key,
TValue value)
|
TValue |
remove(TKey key)
Removes a mapping for the given key, if it exists. |
TValue |
removeObject(TKey key)
|
void |
setName(java.lang.String name)
|
void |
setStore(Store store)
This transient Store value must be set before map methods can work. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentMap()
| Method Detail |
|---|
public Store getStore()
public void setStore(Store store)
public java.lang.String getName()
public void setName(java.lang.String name)
public TValue put(TKey key,
TValue value)
key - Must be of type String, Integer or Long.value - Must implement Persistent.public TValue get(TKey key)
key - Must be of type String, Integer or Long.public TValue remove(TKey key)
key - Must be of type String, Integer or Long.
public TValue putObject(TKey key,
TValue value)
throws StoreException
StoreException
public TValue getObject(TKey key)
throws StoreException
StoreException
public TValue removeObject(TKey key)
throws StoreException
StoreException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||