PersistentObjectCollection (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.util, interface: PersistentObjectCollection

# Interface PersistentObjectCollection<E>

All Superinterfaces:
  `Collection<E>, Iterable<E>`

All Known Implementing Classes:
  `PersistentObjectList, PersistentObjectSet, ToManyList, ToManySet`

public interface PersistentObjectCollection<E> extends Collection<E>
Simple interface to unify PersistentObject* collections in way of setting properties directly

Since:
  3.1
See Also:
  - `ToManyMapProperty`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addDirectly(E target)`
  Adds an object without triggering an event
  `void`
  `removeDirectly(E target)`
  Removes an object without triggering an event

  ### Methods inherited from interface Collection

  `add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray`

  ### Methods inherited from interface Iterable

  `forEach`

- ## Method Details

  - ### addDirectly

    void addDirectly(E target)
    Adds an object without triggering an event

  - ### removeDirectly

    void removeDirectly(E target)
    Removes an object without triggering an event