public class PersistentObjectSet extends RelationshipFault implements Set, ValueHolder, PersistentObjectCollection
| Modifier and Type | Field and Description |
|---|---|
protected Set |
addedToUnresolved |
protected Set |
objectSet |
protected Set |
removedFromUnresolved |
relationshipName, relationshipOwner| Constructor and Description |
|---|
PersistentObjectSet(Persistent relationshipOwner,
String relationshipName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
void |
addDirectly(Object target)
Adds an object without triggering an event
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o) |
Object |
getValue()
Returns an object stored by this ValueHolder.
|
Object |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution.
|
int |
hashCode() |
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() |
protected void |
mergeLocalChanges(List resolved) |
protected void |
postprocessAdd(Collection<?> collection) |
protected void |
postprocessAdd(Object addedObject) |
protected void |
postprocessRemove(Collection<?> collection) |
protected void |
postprocessRemove(Object removedObject) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
void |
removeDirectly(Object target)
Removes an object without triggering an event
|
protected Set |
resolvedObjectSet()
Returns internal objects list resolving it if needed.
|
boolean |
retainAll(Collection c) |
void |
setObjectSet(Set objectSet) |
Object |
setValue(Object value)
Sets an object stored by this ValueHolder.
|
Object |
setValueDirectly(Object value)
Sets ValueHolder vaue without triggering fault resolution.
|
protected boolean |
shouldAddToRemovedFromUnresolvedSet(Object object) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString() |
getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB, updateReverseclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streamprotected Set objectSet
protected Set addedToUnresolved
protected Set removedFromUnresolved
public PersistentObjectSet(Persistent relationshipOwner, String relationshipName)
public 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 setObjectSet(Set objectSet)
protected boolean shouldAddToRemovedFromUnresolvedSet(Object object)
public boolean add(Object o)
add in interface Collectionadd in interface Setpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface Setpublic void clear()
clear in interface Collectionclear in interface Setpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Setpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Setpublic boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Setpublic Iterator iterator()
public boolean remove(Object o)
remove in interface Collectionremove in interface Setpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Setpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface Setpublic int size()
size in interface Collectionsize in interface Setpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Setpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface Setprotected Set resolvedObjectSet()
protected void mergeLocalChanges(List resolved)
mergeLocalChanges in class RelationshipFaultprotected 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–2023 Apache Cayenne. All rights reserved.