MutableChangeMap (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.commitlog.model, class: MutableChangeMap

# Class MutableChangeMap

java.lang.Object
org.apache.cayenne.commitlog.model.MutableChangeMap

All Implemented Interfaces:
  `ChangeMap`

public class MutableChangeMap extends Object implements ChangeMap
A mutable implementation of `ChangeMap`.

Since:
  4.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MutableChangeMap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MutableObjectChange`
  `aliasId(ObjectId preCommitId, ObjectId postCommitId)`
  `Map<ObjectId, ? extends ObjectChange>`
  `getChanges()`
  Returns a map of changes.
  `MutableObjectChange`
  `getOrCreate(ObjectId id, ObjectChangeType type)`
  `Collection<? extends ObjectChange>`
  `getUniqueChanges()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MutableChangeMap

    public MutableChangeMap()

- ## Method Details

  - ### getOrCreate

    public MutableObjectChange getOrCreate(ObjectId id, ObjectChangeType type)

  - ### aliasId

    public MutableObjectChange aliasId(ObjectId preCommitId, ObjectId postCommitId)

  - ### getUniqueChanges

    public Collection<? extends ObjectChange> getUniqueChanges()
    Specified by:
      `getUniqueChanges` in interface `ChangeMap`

  - ### getChanges

    public Map<ObjectId, ? extends ObjectChange> getChanges()
    Description copied from interface: `ChangeMap`
    Returns a map of changes. Note the same change sometimes can be present in the map twice. If ObjectId of an object has changed during the commit, the change will be accessible by both pre-commit and post-commit ID. To get unique changes, call `ChangeMap.getUniqueChanges()`.
    Specified by:
      `getChanges` in interface `ChangeMap`