public class PersistentObjectList extends RelationshipFault implements List, ValueHolder, PersistentObjectCollection
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList |
addedToUnresolved |
protected List |
objectList |
protected LinkedList<Object> |
removedFromUnresolved |
relationshipName, relationshipOwner| Constructor and Description |
|---|
PersistentObjectList(Persistent relationshipOwner,
String relationshipName)
Creates PersistentObjectList initializing it with list owner persistent object and
relationship name that this list maps to.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object o) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
addDirectly(Object target)
Adds an object without triggering an event
|
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) |
void |
removeDirectly(Object target)
Removes an object without triggering an event
|
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() |
getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB, updateReverseclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streamprotected List objectList
protected LinkedList addedToUnresolved
protected LinkedList<Object> removedFromUnresolved
public PersistentObjectList(Persistent relationshipOwner, String relationshipName)
relationshipOwner - persistent object that owns this list.relationshipName - a query used to resolve the listpublic boolean isFault()
isFault in interface ValueHolderpublic void invalidate()
invalidate in interface ValueHolderpublic Object setValueDirectly(Object value) throws CayenneRuntimeException
ValueHoldersetValueDirectly in interface ValueHolderCayenneRuntimeExceptionpublic Object getValue() throws CayenneRuntimeException
ValueHoldergetValue in interface ValueHolderCayenneRuntimeExceptionpublic Object getValueDirectly() throws CayenneRuntimeException
ValueHoldergetValueDirectly in interface ValueHolderCayenneRuntimeExceptionpublic Object setValue(Object value) throws CayenneRuntimeException
ValueHoldersetValue in interface ValueHoldervalue - a new value of the ValueHolder.CayenneRuntimeExceptionpublic void setObjectList(List objectList)
public boolean add(Object o)
add in interface Collectionadd in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface Listpublic boolean addAll(int index,
Collection c)
public void clear()
clear in interface Collectionclear in interface Listpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Listpublic boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Listpublic Iterator iterator()
public int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface Listpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface Listpublic int size()
size in interface Collectionsize in interface Listpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Listpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface Listprotected List resolvedObjectList()
protected void clearLocalChanges()
protected void mergeLocalChanges(List fetchedList)
mergeLocalChanges in class RelationshipFaultprotected 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 void addDirectly(Object target)
PersistentObjectCollectionaddDirectly in interface PersistentObjectCollectionpublic void removeDirectly(Object target)
PersistentObjectCollectionremoveDirectly in interface PersistentObjectCollectionCopyright © 2001–2018 Apache Cayenne. All rights reserved.