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

# Class CDORevisionUtil

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

public final class CDORevisionUtil extends 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 final Object`
`UNINITIALIZED`

## Method Summary

Modifier and Type
Method
Description
`static CDOListFeatureDelta`
`compareLists(CDORevision originRevision, CDORevision dirtyRevision, 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 CDOChangeSet`
`createChangeSet(CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDOChangeSetData data, CDORevisionProvider startRevisionProvider)`
Creates a change set and retains the complete revisions at its start point for consumers that must interpret executable feature deltas against their actual common base.
`static CDOChangeSetData`
`createChangeSetData(List<CDOIDAndVersion> newObjects, List<CDORevisionKey> changedObjects, List<CDOIDAndVersion> detachedObjects)`
`static CDOChangeSetData`
`createChangeSetData(Set<CDOID> ids, CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDORevisionManager revisionManager)`
`static CDOChangeSetData`
`createChangeSetData(Set<CDOID> ids, CDORevisionProvider startProvider, CDORevisionProvider endProvider)`
`static CDOChangeSetData`
`createChangeSetData(Set<CDOID> ids, CDORevisionProvider startProvider, CDORevisionProvider endProvider, boolean useStartVersions)`
`static CDORevisionDelta`
`createDelta(CDORevision revision)`
`static FeatureMap.Entry`
`createFeatureMapEntry(EStructuralFeature feature, 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 String`
`dumpAllRevisions(Map<CDOBranch,List<CDORevision>> map)`
`static void`
`dumpAllRevisions(Map<CDOBranch,List<CDORevision>> map, PrintStream out)`
`static void`
`forEachChildRevision(CDOID container, CDORevisionProvider provider, boolean onlyProperContents, Consumer<CDORevision> consumer)`
`static void`
`forEachChildRevision(CDORevision container, CDORevisionProvider provider, boolean onlyProperContents, Consumer<CDORevision> consumer)`
`static void`
`forEachValue(CDORevision revision, EStructuralFeature feature, int maxValues, Consumer<Object> consumer)`
`static void`
`forEachValue(CDORevision revision, EStructuralFeature feature, Consumer<Object> consumer)`
`static String`
`formatRevisionKey(CDORevisionKey key)`
`static List<CDORevision>`
`getChildRevisions(CDOID container, CDORevisionProvider provider)`
`static List<CDORevision>`
`getChildRevisions(CDOID container, CDORevisionProvider provider, boolean onlyProperContents)`
`static List<CDORevision>`
`getChildRevisions(CDORevision container, CDORevisionProvider provider)`
`static List<CDORevision>`
`getChildRevisions(CDORevision container, CDORevisionProvider provider, boolean onlyProperContents)`
`static CDORevision`
`getParentRevision(CDORevision revision, CDORevisionProvider provider)`
`static CDORevision`
`getParentRevision(CDORevision revision, CDORevisionProvider provider, EClass type)`
`static String`
`getResourceNodeName(CDORevision revision)`
`static String`
`getResourceNodePath(CDOID id, CDORevisionProvider provider)`
`static String`
`getResourceNodePath(CDORevision revision, CDORevisionProvider provider)`
`static void`
`handleParentRevisions(CDORevision revision, CDORevisionProvider provider, CDORevisionHandler handler)`
`static boolean`
`hasChildRevisions(CDORevision container)`
`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(String source, CDOBranchManager branchManager)`
`static Object`
`remapID(Object value, 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 Details

### UNINITIALIZED

public static final Object UNINITIALIZED

## Method Details

### 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 String formatRevisionKey(CDORevisionKey key)

Since:
  4.0

### parseRevisionKey

public static CDORevisionKey parseRevisionKey(String source, CDOBranchManager branchManager)

Since:
  4.0

### createFeatureMapEntry

@Deprecated public static FeatureMap.Entry createFeatureMapEntry(EStructuralFeature feature, 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(Set<CDOID> ids, CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDORevisionManager revisionManager)

Since:
  4.0

### createChangeSetData

public static CDOChangeSetData createChangeSetData(Set<CDOID> ids, CDORevisionProvider startProvider, CDORevisionProvider endProvider)

Since:
  4.0

### createChangeSetData

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

Since:
  4.1

### createChangeSetData

public static CDOChangeSetData createChangeSetData(List<CDOIDAndVersion> newObjects, List<CDORevisionKey> changedObjects, List<CDOIDAndVersion> detachedObjects)

Since:
  4.0

### createChangeSet

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

Since:
  4.0

### createChangeSet

public static CDOChangeSet createChangeSet(CDOBranchPoint startPoint, CDOBranchPoint endPoint, CDOChangeSetData data, CDORevisionProvider startRevisionProvider)
Creates a change set and retains the complete revisions at its start point for consumers that must interpret executable feature deltas against their actual common base.

Parameters:
  `startPoint` - the coordinate at which the histories start.
  `endPoint` - the coordinate reached after applying the histories.
  `data` - the change-set data.
  `startRevisionProvider` - the provider of full start revisions.
Returns:
  a change set retaining the supplied start-revision context.
Since:
  4.28

### remapID

public static Object remapID(Object value, Map<CDOID,CDOID> idMappings, boolean allowUnmappedTempIDs)

Since:
  3.0

### forEachValue

public static void forEachValue(CDORevision revision, EStructuralFeature feature, Consumer<Object> consumer)

Since:
  4.27

### forEachValue

public static void forEachValue(CDORevision revision, EStructuralFeature feature, int maxValues, Consumer<Object> consumer)

Since:
  4.27

### 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

### getParentRevision

public static CDORevision getParentRevision(CDORevision revision, CDORevisionProvider provider, EClass type)

Since:
  4.26

### hasChildRevisions

public static boolean hasChildRevisions(CDORevision container)

Since:
  4.21

### getChildRevisions

public static List<CDORevision> getChildRevisions(CDOID container, CDORevisionProvider provider)

Since:
  4.4

### getChildRevisions

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

Since:
  4.5

### getChildRevisions

public static List<CDORevision> getChildRevisions(CDORevision container, CDORevisionProvider provider)

Since:
  4.4

### getChildRevisions

public static List<CDORevision> getChildRevisions(CDORevision container, CDORevisionProvider provider, boolean onlyProperContents)

Since:
  4.5

### forEachChildRevision

public static void forEachChildRevision(CDOID container, CDORevisionProvider provider, boolean onlyProperContents, Consumer<CDORevision> consumer)

Since:
  4.18

### forEachChildRevision

public static void forEachChildRevision(CDORevision container, CDORevisionProvider provider, boolean onlyProperContents, Consumer<CDORevision> consumer)

Since:
  4.18

### getResourceNodeName

public static String getResourceNodeName(CDORevision revision)

Since:
  4.15

### getResourceNodePath

public static String getResourceNodePath(CDOID id, CDORevisionProvider provider)

Since:
  4.3

### getResourceNodePath

public static String getResourceNodePath(CDORevision revision, CDORevisionProvider provider)

Since:
  4.0

### compareLists

public static CDOListFeatureDelta compareLists(CDORevision originRevision, CDORevision dirtyRevision, EStructuralFeature feature)

Since:
  4.8

### dumpAllRevisions

public static String dumpAllRevisions(Map<CDOBranch,List<CDORevision>> map)

Since:
  3.0

### dumpAllRevisions

public static void dumpAllRevisions(Map<CDOBranch,List<CDORevision>> map, PrintStream out)

Since:
  3.0