Class ChangedCdoSnapshotsFactory

java.lang.Object
org.javers.core.snapshot.ChangedCdoSnapshotsFactory

public class ChangedCdoSnapshotsFactory extends Object
Builds snapshots for provided live objects. Result contains only snapshots of objects that were newly created or changed (comparing to provided collection of latest snapshots). Result can be easily serialized and persisted.
  • Method Details

    • create

      public List<CdoSnapshot> create(LiveGraph liveGraph, Set<CdoSnapshot> latestSnapshots, CommitMetadata commitMetadata)
      Parameters:
      liveGraph - wrapped CDOs for which snapshots should be created if they differ from latest snapshots
      latestSnapshots - CDO snapshots used to check which of liveObjects have been created or changed
      commitMetadata - commit metadata used to create new snapshots