|
||||||||||
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 ValueHolder
CayenneRuntimeException
public Object getValueDirectly() throws CayenneRuntimeException
ValueHolder
getValueDirectly
in interface ValueHolder
CayenneRuntimeException
public void invalidate()
ValueHolder
invalidate
in interface ValueHolder
public boolean isFault()
ValueHolder
isFault
in interface ValueHolder
public Object setValue(Object value) throws CayenneRuntimeException
ValueHolder
setValue
in interface ValueHolder
value
- a new value of the ValueHolder.
CayenneRuntimeException
public Object setValueDirectly(Object value) throws CayenneRuntimeException
ValueHolder
setValueDirectly
in interface ValueHolder
CayenneRuntimeException
public void setObjectMap(Map objectMap)
protected Map resolvedObjectMap()
protected Map indexCollection(Collection collection)
public String toString()
toString
in class Object
public void clear()
clear
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Set entrySet()
entrySet
in interface Map
public Object get(Object key)
get
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Set keySet()
keySet
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public void putAll(Map map)
putAll
in interface Map
public Object remove(Object key)
remove
in interface Map
public int size()
size
in interface Map
public Collection values()
values
in interface Map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |