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>,- PersistentObjectCollection<E>,- ValueHolder<List<E>>
public class ToManyList<E> extends PersistentObjectList<E> implements Serializable
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:
- Serialized Form
- 
Field SummaryFields inherited from class org.apache.cayenne.util.PersistentObjectListaddedToUnresolved, objectList, removedFromUnresolvedFields inherited from class org.apache.cayenne.util.RelationshipFaultrelationshipName, relationshipOwner
- 
Constructor SummaryConstructors Constructor Description ToManyList(Persistent source, String relationship)Creates ToManyList.
- 
Method SummaryModifier and Type Method Description inthashCode()protected voidpostprocessAdd(E addedObject)protected voidpostprocessAdd(Collection<? extends E> collection)protected voidpostprocessRemove(E removedObject)protected voidpostprocessRemove(Collection<? extends E> collection)protected booleanshouldAddToRemovedFromUnresolvedList(Object object)StringtoString()protected voidupdateReverse(List<E> resolved)Methods inherited from class org.apache.cayenne.util.PersistentObjectListadd, 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, toArrayMethods inherited from class org.apache.cayenne.util.RelationshipFaultgetRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDBMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.ListreplaceAll, sort, spliterator
- 
Constructor Details- 
ToManyListCreates ToManyList.- Since:
- 1.1
 
 
- 
- 
Method Details- 
hashCodepublic int hashCode()- Specified by:
- hashCodein interface- Collection<E>
- Specified by:
- hashCodein interface- List<E>
- Overrides:
- hashCodein class- PersistentObjectList<E>
 
- 
shouldAddToRemovedFromUnresolvedList- Overrides:
- shouldAddToRemovedFromUnresolvedListin class- PersistentObjectList<E>
- Returns:
- whether object should be added to PersistentObjectList.removedFromUnresolvedduring removal
 
- 
toString- Overrides:
- toStringin class- PersistentObjectList<E>
 
- 
postprocessAdd- Overrides:
- postprocessAddin class- PersistentObjectList<E>
 
- 
postprocessRemove- Overrides:
- postprocessRemovein class- PersistentObjectList<E>
 
- 
postprocessAdd- Overrides:
- postprocessAddin class- PersistentObjectList<E>
 
- 
postprocessRemove- Overrides:
- postprocessRemovein class- PersistentObjectList<E>
 
- 
updateReverse- Overrides:
- updateReversein class- RelationshipFault<E>
 
 
-