Class CDORevisionTransitionUtil

java.lang.Object
org.eclipse.emf.internal.cdo.CDORevisionTransitionUtil

public final class CDORevisionTransitionUtil extends Object
Semantic helpers for protecting partially loaded list representations while revisions are structurally derived.
Since:
4.31
Author:
Eike Stepper
  • Method Details

    • getCoordinateChangingFeatures

      public static Set<EStructuralFeature> getCoordinateChangingFeatures(CDORevisionDelta delta)
      Returns the many-valued features whose unresolved positions can change coordinates when the delta is applied.
      Parameters:
      delta - the revision delta to inspect
      Returns:
      the affected features, never null
    • ensureCoordinateChangingFeaturesFullyLoaded

      public static void ensureCoordinateChangingFeaturesFullyLoaded(InternalCDORevision revision, CDORevisionDelta delta, CDOSession session)
      Ensures that every many-valued feature whose list coordinates are changed by the given delta is fully loaded. Features that are only assigned, cleared, or unset are not materialized for representation validity.
      Parameters:
      revision - the revision that will receive the delta
      delta - the feature delta to be applied
    • ensureCoordinateChangingFeaturesFullyLoaded

      public static void ensureCoordinateChangingFeaturesFullyLoaded(InternalCDORevision revision, CDOFeatureDelta delta, CDOSession session)
      Ensures that every many-valued feature whose list coordinates are changed by the given delta is fully loaded.
      Parameters:
      revision - the revision that will receive the delta
      delta - the feature delta to be applied
    • ensureFeaturesFullyLoaded

      public static void ensureFeaturesFullyLoaded(InternalCDORevision revision, Set<EStructuralFeature> features, CDOSession session)
      Ensures that the specified many-valued features are fully loaded.
      Parameters:
      revision - the revision whose features are to be loaded
      features - the exact features to load
    • compareFeatures

      public static InternalCDORevisionDelta compareFeatures(InternalCDORevision sourceRevision, InternalCDORevision targetRevision, Set<EStructuralFeature> features, CDOSession session)
      Compares exactly the supplied features after loading only their partially loaded list values.

      The ordinary revision comparison remains intentionally complete. This operation is for callers that already have a feature-scoped change set and must derive a target-relative delta without turning unrelated partial features into complete revisions.

      Parameters:
      sourceRevision - the source revision
      targetRevision - the target revision
      features - the features whose values are relevant
      Returns:
      the feature-scoped revision delta