|
||||||||||
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.PersistentObjectList
public class PersistentObjectList
A list of persistent objects lazily resolved on the first access.
Field Summary | |
---|---|
protected LinkedList |
addedToUnresolved
|
protected List |
objectList
|
protected LinkedList<Object> |
removedFromUnresolved
|
Fields inherited from class org.apache.cayenne.util.RelationshipFault |
---|
relationshipName, relationshipOwner |
Constructor Summary | |
---|---|
PersistentObjectList(Persistent relationshipOwner,
String relationshipName)
Creates PersistentObjectList initializing it with list owner persistent object and relationship name that this list maps to. |
Method Summary | |
---|---|
void |
add(int index,
Object o)
|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
protected boolean |
addLocal(Object object)
|
void |
clear()
|
protected void |
clearLocalChanges()
|
boolean |
contains(Object o)
|
boolean |
containsAll(Collection c)
|
boolean |
equals(Object o)
|
Object |
get(int index)
|
Object |
getValue()
Returns an object stored by this ValueHolder. |
Object |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution. |
int |
hashCode()
|
int |
indexOf(Object o)
|
void |
invalidate()
Turns itself into a fault, thus forcing a refresh on the next access. |
boolean |
isEmpty()
|
boolean |
isFault()
Returns whether this list is not yet resolved and requires a fetch. |
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
protected void |
mergeLocalChanges(List fetchedList)
|
protected void |
postprocessAdd(Collection collection)
|
protected void |
postprocessAdd(Object addedObject)
|
protected void |
postprocessRemove(Collection collection)
|
protected void |
postprocessRemove(Object removedObject)
|
Object |
remove(int index)
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
protected boolean |
removeLocal(Object object)
|
protected List |
resolvedObjectList()
Returns internal objects list resolving it if needed. |
boolean |
retainAll(Collection c)
|
Object |
set(int index,
Object o)
|
void |
setObjectList(List objectList)
|
Object |
setValue(Object value)
Sets an object stored by this ValueHolder. |
Object |
setValueDirectly(Object value)
Sets ValueHolder vaue without triggering fault resolution. |
protected boolean |
shouldAddToRemovedFromUnresolvedList(Object object)
|
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
String |
toString()
|
Methods inherited from class org.apache.cayenne.util.RelationshipFault |
---|
getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB, updateReverse |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List objectList
protected LinkedList addedToUnresolved
protected LinkedList<Object> removedFromUnresolved
Constructor Detail |
---|
public PersistentObjectList(Persistent relationshipOwner, String relationshipName)
relationshipOwner
- persistent object that owns this list.relationshipName
- a query used to resolve the listMethod Detail |
---|
public boolean isFault()
isFault
in interface ValueHolder
public void invalidate()
invalidate
in interface ValueHolder
public Object setValueDirectly(Object value) throws CayenneRuntimeException
ValueHolder
setValueDirectly
in interface ValueHolder
CayenneRuntimeException
public Object getValue() throws CayenneRuntimeException
ValueHolder
getValue
in interface ValueHolder
CayenneRuntimeException
public Object getValueDirectly() throws CayenneRuntimeException
ValueHolder
getValueDirectly
in interface ValueHolder
CayenneRuntimeException
public Object setValue(Object value) throws CayenneRuntimeException
ValueHolder
setValue
in interface ValueHolder
value
- a new value of the ValueHolder.
CayenneRuntimeException
public void setObjectList(List objectList)
public boolean add(Object o)
add
in interface Collection
add
in interface List
public void add(int index, Object o)
add
in interface List
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index, Collection c)
addAll
in interface List
public void clear()
clear
in interface Collection
clear
in interface List
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in class Object
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class Object
public Object get(int index)
get
in interface List
public int indexOf(Object o)
indexOf
in interface List
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface List
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public Object remove(int index)
remove
in interface List
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
public Object set(int index, Object o)
set
in interface List
public int size()
size
in interface Collection
size
in interface List
public List subList(int fromIndex, int toIndex)
subList
in interface List
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
protected List resolvedObjectList()
protected void clearLocalChanges()
protected void mergeLocalChanges(List fetchedList)
protected boolean addLocal(Object object)
protected boolean removeLocal(Object object)
protected boolean shouldAddToRemovedFromUnresolvedList(Object object)
removedFromUnresolved
during removalprotected void postprocessAdd(Collection collection)
protected void postprocessRemove(Collection collection)
protected void postprocessAdd(Object addedObject)
protected void postprocessRemove(Object removedObject)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |