Package org.eclipse.emf.cdo.common.revision

## Class CDORevisionUtil

- java.lang.Object
- - org.eclipse.emf.cdo.common.revision.CDORevisionUtil

-     public final class CDORevisionUtil
      extends java.lang.Object

  Various static helper methods for dealing with `revisions`.
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `CDORevisionUtil.AllRevisionsDumper` | Dumps `revisions`, sorted and grouped by `branch`, to various output formats and targets.
    `static class` | `CDORevisionUtil.CDORevisionComparator` | Compares `revision keys` by `ID` and `version`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.Object` | `UNINITIALIZED` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static CDOListFeatureDelta` | `compareLists​(CDORevision originRevision, CDORevision dirtyRevision, org.eclipse.emf.ecore.EStructuralFeature feature)` |
    `static CDORevisable` | `copyRevisable​(CDORevisable source)` |
    `static CDORevisionKey` | `copyRevisionKey​(CDORevisionKey source)` |
    `static CDOFeatureMapEntry` | `createCDOFeatureMapEntry()` | Deprecated. As of 4.5 `feature maps` are no longer supported.
    `static CDOChangeSet` | `createChangeSet​(CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDOChangeSetData data)` |
    `static CDOChangeSetData` | `createChangeSetData​(java.util.List<CDOIDAndVersion> newObjects, java.util.List<CDORevisionKey> changedObjects, java.util.List<CDOIDAndVersion> detachedObjects)` |
    `static CDOChangeSetData` | `createChangeSetData​(java.util.Set<CDOID> ids, CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDORevisionManager revisionManager)` |
    `static CDOChangeSetData` | `createChangeSetData​(java.util.Set<CDOID> ids, CDORevisionProvider startProvider, CDORevisionProvider endProvider)` |
    `static CDOChangeSetData` | `createChangeSetData​(java.util.Set<CDOID> ids, CDORevisionProvider startProvider, CDORevisionProvider endProvider, boolean useStartVersions)` |
    `static CDORevisionDelta` | `createDelta​(CDORevision revision)` |
    `static org.eclipse.emf.ecore.util.FeatureMap.Entry` | `createFeatureMapEntry​(org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` | Deprecated. As of 4.5 `feature maps` are no longer supported.
    `static CDORevisable` | `createRevisable​(CDOBranch branch, int version, long timeStamp, long revised)` |
    `static CDORevisionCache` | `createRevisionCache​(boolean supportingAudits, boolean supportingBranches)` | Creates and returns a new memory sensitive revision cache.
    `static CDORevisionKey` | `createRevisionKey​(CDOID id, CDOBranch branch, int version)` |
    `static CDORevisionManager` | `createRevisionManager()` |
    `static CDORevisionManager` | `createRevisionManager​(CDORevisionCache cache)` |
    `static java.lang.String` | `dumpAllRevisions​(java.util.Map<CDOBranch,​java.util.List<CDORevision>> map)` |
    `static void` | `dumpAllRevisions​(java.util.Map<CDOBranch,​java.util.List<CDORevision>> map, java.io.PrintStream out)` |
    `static java.lang.String` | `formatRevisionKey​(CDORevisionKey key)` |
    `static java.util.List<CDORevision>` | `getChildRevisions​(CDOID container, CDORevisionProvider provider)` |
    `static java.util.List<CDORevision>` | `getChildRevisions​(CDOID container, CDORevisionProvider provider, boolean onlyProperContents)` |
    `static java.util.List<CDORevision>` | `getChildRevisions​(CDORevision container, CDORevisionProvider provider)` |
    `static java.util.List<CDORevision>` | `getChildRevisions​(CDORevision container, CDORevisionProvider provider, boolean onlyProperContents)` |
    `static CDORevision` | `getParentRevision​(CDORevision revision, CDORevisionProvider provider)` |
    `static java.lang.String` | `getResourceNodeName​(CDORevision revision)` |
    `static java.lang.String` | `getResourceNodePath​(CDOID id, CDORevisionProvider provider)` |
    `static java.lang.String` | `getResourceNodePath​(CDORevision revision, CDORevisionProvider provider)` |
    `static void` | `handleParentRevisions​(CDORevision revision, CDORevisionProvider provider, CDORevisionHandler handler)` |
    `static boolean` | `isContained​(CDOID child, CDOID container, CDORevisionProvider provider)` |
    `static boolean` | `isContained​(InternalCDORevision child, CDOID container, CDORevisionProvider provider)` |
    `static boolean` | `isTreeRestructuring​(InternalCDORevisionDelta[] deltas)` |
    `static CDORevisionKey` | `parseRevisionKey​(java.lang.String source, CDOBranchManager branchManager)` |
    `static java.lang.Object` | `remapID​(java.lang.Object value, java.util.Map<CDOID,​CDOID> idMappings, boolean allowUnmappedTempIDs)` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### UNINITIALIZED

          public static final java.lang.Object UNINITIALIZED

  - ### Method Detail

    - #### createRevisionCache

          public static CDORevisionCache createRevisionCache​(boolean supportingAudits,
                                                             boolean supportingBranches)

      Creates and returns a new memory sensitive revision cache.
      Since:
        4.0

    - #### createRevisionManager

          public static CDORevisionManager createRevisionManager()

      Since:
        4.0

    - #### createRevisionManager

          public static CDORevisionManager createRevisionManager​(CDORevisionCache cache)

      Since:
        4.0

    - #### copyRevisable

          public static CDORevisable copyRevisable​(CDORevisable source)

      Since:
        4.0

    - #### createRevisable

          public static CDORevisable createRevisable​(CDOBranch branch,
                                                     int version,
                                                     long timeStamp,
                                                     long revised)

      Since:
        4.0

    - #### copyRevisionKey

          public static CDORevisionKey copyRevisionKey​(CDORevisionKey source)

      Since:
        4.0

    - #### createRevisionKey

          public static CDORevisionKey createRevisionKey​(CDOID id,
                                                         CDOBranch branch,
                                                         int version)

      Since:
        3.0

    - #### formatRevisionKey

          public static java.lang.String formatRevisionKey​(CDORevisionKey key)

      Since:
        4.0

    - #### parseRevisionKey

          public static CDORevisionKey parseRevisionKey​(java.lang.String source,
                                                        CDOBranchManager branchManager)

      Since:
        4.0

    - #### createFeatureMapEntry

          @Deprecated
          public static org.eclipse.emf.ecore.util.FeatureMap.Entry createFeatureMapEntry​(org.eclipse.emf.ecore.EStructuralFeature feature,
                                                                                          java.lang.Object value)

      Deprecated.
      As of 4.5 `feature maps` are no longer supported.
      Since:
        2.0

    - #### createCDOFeatureMapEntry

          @Deprecated
          public static CDOFeatureMapEntry createCDOFeatureMapEntry()

      Deprecated.
      As of 4.5 `feature maps` are no longer supported.
      Since:
        3.0

    - #### createDelta

          public static CDORevisionDelta createDelta​(CDORevision revision)

      Since:
        4.0

    - #### createChangeSetData

          public static CDOChangeSetData createChangeSetData​(java.util.Set<CDOID> ids,
                                                             CDOBranchPoint startPoint,
                                                             CDOBranchPoint endPoint,
                                                             CDORevisionManager revisionManager)

      Since:
        4.0

    - #### createChangeSetData

          public static CDOChangeSetData createChangeSetData​(java.util.Set<CDOID> ids,
                                                             CDORevisionProvider startProvider,
                                                             CDORevisionProvider endProvider)

      Since:
        4.0

    - #### createChangeSetData

          public static CDOChangeSetData createChangeSetData​(java.util.Set<CDOID> ids,
                                                             CDORevisionProvider startProvider,
                                                             CDORevisionProvider endProvider,
                                                             boolean useStartVersions)

      Since:
        4.1

    - #### createChangeSetData

          public static CDOChangeSetData createChangeSetData​(java.util.List<CDOIDAndVersion> newObjects,
                                                             java.util.List<CDORevisionKey> changedObjects,
                                                             java.util.List<CDOIDAndVersion> detachedObjects)

      Since:
        4.0

    - #### createChangeSet

          public static CDOChangeSet createChangeSet​(CDOBranchPoint startPoint,
                                                     CDOBranchPoint endPoint,
                                                     CDOChangeSetData data)

      Since:
        4.0

    - #### remapID

          public static java.lang.Object remapID​(java.lang.Object value,
                                                 java.util.Map<CDOID,​CDOID> idMappings,
                                                 boolean allowUnmappedTempIDs)

      Since:
        3.0

    - #### isTreeRestructuring

          public static boolean isTreeRestructuring​(InternalCDORevisionDelta[] deltas)

      Since:
        4.5

    - #### isContained

          public static boolean isContained​(CDOID child,
                                            CDOID container,
                                            CDORevisionProvider provider)

      Since:
        4.3

    - #### isContained

          public static boolean isContained​(InternalCDORevision child,
                                            CDOID container,
                                            CDORevisionProvider provider)

      Since:
        4.3

    - #### handleParentRevisions

          public static void handleParentRevisions​(CDORevision revision,
                                                   CDORevisionProvider provider,
                                                   CDORevisionHandler handler)

      Since:
        4.5

    - #### getParentRevision

          public static CDORevision getParentRevision​(CDORevision revision,
                                                      CDORevisionProvider provider)

      Since:
        4.5

    - #### getChildRevisions

          public static java.util.List<CDORevision> getChildRevisions​(CDOID container,
                                                                      CDORevisionProvider provider)

      Since:
        4.4

    - #### getChildRevisions

          public static java.util.List<CDORevision> getChildRevisions​(CDOID container,
                                                                      CDORevisionProvider provider,
                                                                      boolean onlyProperContents)

      Since:
        4.5

    - #### getChildRevisions

          public static java.util.List<CDORevision> getChildRevisions​(CDORevision container,
                                                                      CDORevisionProvider provider)

      Since:
        4.4

    - #### getChildRevisions

          public static java.util.List<CDORevision> getChildRevisions​(CDORevision container,
                                                                      CDORevisionProvider provider,
                                                                      boolean onlyProperContents)

      Since:
        4.5

    - #### getResourceNodeName

          public static java.lang.String getResourceNodeName​(CDORevision revision)

      Since:
        4.15

    - #### getResourceNodePath

          public static java.lang.String getResourceNodePath​(CDOID id,
                                                             CDORevisionProvider provider)

      Since:
        4.3

    - #### getResourceNodePath

          public static java.lang.String getResourceNodePath​(CDORevision revision,
                                                             CDORevisionProvider provider)

      Since:
        4.0

    - #### compareLists

          public static CDOListFeatureDelta compareLists​(CDORevision originRevision,
                                                         CDORevision dirtyRevision,
                                                         org.eclipse.emf.ecore.EStructuralFeature feature)

      Since:
        4.8

    - #### dumpAllRevisions

          public static java.lang.String dumpAllRevisions​(java.util.Map<CDOBranch,​java.util.List<CDORevision>> map)

      Since:
        3.0

    - #### dumpAllRevisions

          public static void dumpAllRevisions​(java.util.Map<CDOBranch,​java.util.List<CDORevision>> map,
                                              java.io.PrintStream out)

      Since:
        3.0