|
||||||||||
| 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 java.util.LinkedList |
addedToUnresolved
|
protected java.util.List |
objectList
|
protected java.util.LinkedList<java.lang.Object> |
removedFromUnresolved
|
| Fields inherited from class org.apache.cayenne.util.RelationshipFault |
|---|
relationshipName, relationshipOwner |
| Constructor Summary | |
|---|---|
PersistentObjectList(Persistent relationshipOwner,
java.lang.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,
java.lang.Object o)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
addDirectly(java.lang.Object target)
Adds an object without triggering an event |
protected boolean |
addLocal(java.lang.Object object)
|
void |
clear()
|
protected void |
clearLocalChanges()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(int index)
|
java.lang.Object |
getValue()
Returns an object stored by this ValueHolder. |
java.lang.Object |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution. |
int |
hashCode()
|
int |
indexOf(java.lang.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. |
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
protected void |
mergeLocalChanges(java.util.List fetchedList)
|
protected void |
postprocessAdd(java.util.Collection collection)
|
protected void |
postprocessAdd(java.lang.Object addedObject)
|
protected void |
postprocessRemove(java.util.Collection collection)
|
protected void |
postprocessRemove(java.lang.Object removedObject)
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
void |
removeDirectly(java.lang.Object target)
Removes an object without triggering an event |
protected boolean |
removeLocal(java.lang.Object object)
|
protected java.util.List |
resolvedObjectList()
Returns internal objects list resolving it if needed. |
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object o)
|
void |
setObjectList(java.util.List objectList)
|
java.lang.Object |
setValue(java.lang.Object value)
Sets an object stored by this ValueHolder. |
java.lang.Object |
setValueDirectly(java.lang.Object value)
Sets ValueHolder vaue without triggering fault resolution. |
protected boolean |
shouldAddToRemovedFromUnresolvedList(java.lang.Object object)
|
int |
size()
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.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 java.util.List objectList
protected java.util.LinkedList addedToUnresolved
protected java.util.LinkedList<java.lang.Object> removedFromUnresolved
| Constructor Detail |
|---|
public PersistentObjectList(Persistent relationshipOwner,
java.lang.String relationshipName)
relationshipOwner - persistent object that owns this list.relationshipName - a query used to resolve the list| Method Detail |
|---|
public boolean isFault()
isFault in interface ValueHolderpublic void invalidate()
invalidate in interface ValueHolder
public java.lang.Object setValueDirectly(java.lang.Object value)
throws CayenneRuntimeException
ValueHolder
setValueDirectly in interface ValueHolderCayenneRuntimeException
public java.lang.Object getValue()
throws CayenneRuntimeException
ValueHolder
getValue in interface ValueHolderCayenneRuntimeException
public java.lang.Object getValueDirectly()
throws CayenneRuntimeException
ValueHolder
getValueDirectly in interface ValueHolderCayenneRuntimeException
public java.lang.Object setValue(java.lang.Object value)
throws CayenneRuntimeException
ValueHolder
setValue in interface ValueHoldervalue - a new value of the ValueHolder.
CayenneRuntimeExceptionpublic void setObjectList(java.util.List objectList)
public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.List
public void add(int index,
java.lang.Object o)
add in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class java.lang.Objectpublic java.lang.Object get(int index)
get in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object o)
set in interface java.util.Listpublic int size()
size in interface java.util.Collectionsize in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.Listprotected java.util.List resolvedObjectList()
protected void clearLocalChanges()
protected void mergeLocalChanges(java.util.List fetchedList)
protected boolean addLocal(java.lang.Object object)
protected boolean removeLocal(java.lang.Object object)
protected boolean shouldAddToRemovedFromUnresolvedList(java.lang.Object object)
removedFromUnresolved during
removalprotected void postprocessAdd(java.util.Collection collection)
protected void postprocessRemove(java.util.Collection collection)
protected void postprocessAdd(java.lang.Object addedObject)
protected void postprocessRemove(java.lang.Object removedObject)
public java.lang.String toString()
toString in class java.lang.Objectpublic void addDirectly(java.lang.Object target)
PersistentObjectCollection
addDirectly in interface PersistentObjectCollectionpublic void removeDirectly(java.lang.Object target)
PersistentObjectCollection
removeDirectly in interface PersistentObjectCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||