# Class ToManySet<E>

java.lang.Object
org.apache.cayenne.util.RelationshipFault<E>
org.apache.cayenne.util.PersistentObjectSet<E>
org.apache.cayenne.access.ToManySet<E>

All Implemented Interfaces:
  `Serializable, Iterable<E>, Collection<E>, Set<E>, PersistentObjectCollection<E>, ValueHolder<Object>`

public class ToManySet<E> extends PersistentObjectSet<E> implements Serializable

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class PersistentObjectSet

  `addedToUnresolved, objectSet, removedFromUnresolved`

  ### Fields inherited from class RelationshipFault

  `relationshipName, relationshipOwner`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ToManySet(Persistent relationshipOwner, String relationshipName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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`
  `shouldAddToRemovedFromUnresolvedSet(E object)`
  `protected void`
  `updateReverse(List<E> resolved)`

  ### Methods inherited from class PersistentObjectSet

  `add, addAll, addDirectly, clear, contains, containsAll, equals, getValue, getValueDirectly, hashCode, invalidate, isEmpty, isFault, iterator, mergeLocalChanges, remove, removeAll, removeDirectly, resolvedObjectSet, retainAll, setObjectSet, setValue, setValueDirectly, size, toArray, toArray, toString`

  ### Methods inherited from class RelationshipFault

  `getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface Collection

  `parallelStream, removeIf, stream, toArray`

  ### Methods inherited from interface Iterable

  `forEach`

  ### Methods inherited from interface Set

  `spliterator`

- ## Constructor Details

  - ### ToManySet

    protected ToManySet(Persistent relationshipOwner, String relationshipName)

- ## Method Details

  - ### shouldAddToRemovedFromUnresolvedSet

    protected boolean shouldAddToRemovedFromUnresolvedSet(E object)
    Overrides:
      `shouldAddToRemovedFromUnresolvedSet` in class `PersistentObjectSet<E>`

  - ### postprocessAdd

    protected void postprocessAdd(Collection<? extends E> collection)
    Overrides:
      `postprocessAdd` in class `PersistentObjectSet<E>`

  - ### postprocessRemove

    protected void postprocessRemove(Collection<? extends E> collection)
    Overrides:
      `postprocessRemove` in class `PersistentObjectSet<E>`

  - ### postprocessAdd

    protected void postprocessAdd(E addedObject)
    Overrides:
      `postprocessAdd` in class `PersistentObjectSet<E>`

  - ### postprocessRemove

    protected void postprocessRemove(E removedObject)
    Overrides:
      `postprocessRemove` in class `PersistentObjectSet<E>`

  - ### updateReverse

    protected void updateReverse(List<E> resolved)
    Overrides:
      `updateReverse` in class `RelationshipFault<E>`