Package org.apache.cayenne.access
Class ToManyList<E>
java.lang.Object
org.apache.cayenne.util.RelationshipFault<E>
org.apache.cayenne.util.PersistentObjectList<E>
org.apache.cayenne.access.ToManyList<E>
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
,List<E>
,SequencedCollection<E>
,PersistentObjectCollection<E>
,ValueHolder<List<E>>
A list that holds objects for to-many relationships. All operations, except for
resolving the list from DB, are not synchronized. The safest way to implement custom
synchronization is to synchronize on parent ObjectStore.
- See Also:
-
Field Summary
Fields inherited from class org.apache.cayenne.util.PersistentObjectList
addedToUnresolved, objectList, removedFromUnresolved
Fields inherited from class org.apache.cayenne.util.RelationshipFault
relationshipName, relationshipOwner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
hashCode()
protected void
postprocessAdd
(E addedObject) protected void
postprocessAdd
(Collection<? extends E> collection) protected void
postprocessRemove
(E removedObject) protected void
postprocessRemove
(Collection<? extends E> collection) protected boolean
toString()
protected void
updateReverse
(List<E> resolved) Methods inherited from class org.apache.cayenne.util.PersistentObjectList
add, add, addAll, addAll, addDirectly, addLocal, clear, clearLocalChanges, contains, containsAll, equals, get, getValue, getValueDirectly, indexOf, invalidate, isEmpty, isFault, iterator, lastIndexOf, listIterator, listIterator, mergeLocalChanges, remove, remove, removeAll, removeDirectly, removeLocal, resolvedObjectList, retainAll, set, setObjectList, setValue, setValueDirectly, size, subList, toArray, toArray
Methods inherited from class org.apache.cayenne.util.RelationshipFault
getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
ToManyList
Creates ToManyList.- Since:
- 1.1
-
-
Method Details
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<E>
- Specified by:
hashCode
in interfaceList<E>
- Overrides:
hashCode
in classPersistentObjectList<E>
-
shouldAddToRemovedFromUnresolvedList
- Overrides:
shouldAddToRemovedFromUnresolvedList
in classPersistentObjectList<E>
- Returns:
- whether object should be added to
PersistentObjectList.removedFromUnresolved
during removal
-
toString
- Overrides:
toString
in classPersistentObjectList<E>
-
postprocessAdd
- Overrides:
postprocessAdd
in classPersistentObjectList<E>
-
postprocessRemove
- Overrides:
postprocessRemove
in classPersistentObjectList<E>
-
postprocessAdd
- Overrides:
postprocessAdd
in classPersistentObjectList<E>
-
postprocessRemove
- Overrides:
postprocessRemove
in classPersistentObjectList<E>
-
updateReverse
- Overrides:
updateReverse
in classRelationshipFault<E>
-