|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.util.RelationshipFault
org.apache.cayenne.util.PersistentObjectMap
public class PersistentObjectMap
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
protected Accessor |
mapKeyAccessor
|
protected Map |
objectMap
|
| Fields inherited from class org.apache.cayenne.util.RelationshipFault |
|---|
relationshipName, relationshipOwner |
| Constructor Summary | |
|---|---|
PersistentObjectMap(Persistent relationshipOwner,
String relationshipName,
Accessor mapKeyAccessor)
Creates PersistentObjectList initializing it with list owner persistent object and relationship name that this list maps to. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set |
entrySet()
|
Object |
get(Object key)
|
Object |
getValue()
Returns an object stored by this ValueHolder. |
Object |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution. |
protected Map |
indexCollection(Collection collection)
Converts a collection into a map indexed by map key. |
void |
invalidate()
Turns a ValueHolder into a fault. |
boolean |
isEmpty()
|
boolean |
isFault()
Returns true if the internal value is not yet resolved. |
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map map)
|
Object |
remove(Object key)
|
protected Map |
resolvedObjectMap()
Returns internal objects list resolving it if needed. |
void |
setObjectMap(Map objectMap)
|
Object |
setValue(Object value)
Sets an object stored by this ValueHolder. |
Object |
setValueDirectly(Object value)
Sets ValueHolder vaue without triggering fault resolution. |
int |
size()
|
String |
toString()
|
Collection |
values()
|
| Methods inherited from class org.apache.cayenne.util.RelationshipFault |
|---|
getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB, updateReverse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
protected Map objectMap
protected Accessor mapKeyAccessor
| Constructor Detail |
|---|
public PersistentObjectMap(Persistent relationshipOwner,
String relationshipName,
Accessor mapKeyAccessor)
relationshipOwner - persistent object that owns this list.relationshipName - a query used to resolve the listmapKeyAccessor - an accessor that can read a map key from an object.| Method Detail |
|---|
public Object getValue()
throws CayenneRuntimeException
ValueHolder
getValue in interface ValueHolderCayenneRuntimeException
public Object getValueDirectly()
throws CayenneRuntimeException
ValueHolder
getValueDirectly in interface ValueHolderCayenneRuntimeExceptionpublic void invalidate()
ValueHolder
invalidate in interface ValueHolderpublic boolean isFault()
ValueHolder
isFault in interface ValueHolder
public Object setValue(Object value)
throws CayenneRuntimeException
ValueHolder
setValue in interface ValueHoldervalue - a new value of the ValueHolder.
CayenneRuntimeException
public Object setValueDirectly(Object value)
throws CayenneRuntimeException
ValueHolder
setValueDirectly in interface ValueHolderCayenneRuntimeExceptionpublic void setObjectMap(Map objectMap)
protected Map resolvedObjectMap()
protected Map indexCollection(Collection collection)
public String toString()
toString in class Objectpublic void clear()
clear in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Set entrySet()
entrySet in interface Mappublic Object get(Object key)
get in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Set keySet()
keySet in interface Map
public Object put(Object key,
Object value)
put in interface Mappublic void putAll(Map map)
putAll in interface Mappublic Object remove(Object key)
remove in interface Mappublic int size()
size in interface Mappublic Collection values()
values in interface Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||