Package org.eclipse.emf.cdo.compare
Class CDOCompareUtil
- java.lang.Object
- 
- org.eclipse.emf.cdo.compare.CDOCompareUtil
 
- 
 public final class CDOCompareUtil extends java.lang.ObjectProvides static factory methods that return CDO-scopedcomparisons.Two different scopesare supported:- CDOComparisonScope.AllContentstakes an arbitrary- object(including- resource nodes) and returns- matchesfor all elements of its- content tree. This scope has the advantage that the comparison can be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid. The following method returns comparisons that are based on this scope algorithm:
- CDOComparisonScope.Minimaltakes a- view/- transactionand returns- matchesonly for the changed elements of the entire content tree of its- root resource. The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container objects are considered as matches, making this scope scale seamlessly with the overall size of a repository. The following method returns comparisons that are based on this scope algorithm:
 origin sideof a comparison is automaticallydeterminedby inspecting thebranch treeand used if its different from the left or right side.The matcherused by the comparisons is based on anID functionthat considers theCDOIDs of theobjects.Resourcesandfoldersare treated as normalEObjects.- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static CDOViewOpenerDEFAULT_VIEW_OPENER
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.emf.compare.Comparisoncompare(CDOObject left, CDOView rightView, CDOView[] originView)Takes an arbitraryobject(includingresource nodes) and returnsmatchesfor all elements of itscontent tree.static org.eclipse.emf.compare.Comparisoncompare(CDOObject left, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener)Takes an arbitraryobject(includingresource nodes) and returnsmatchesfor all elements of itscontent tree.static org.eclipse.emf.compare.Comparisoncompare(CDOView leftView, CDOView rightView, CDOView[] originView)Takes aview/transactionand returnsmatchesonly for the changed elements of the entire content tree of itsroot resource.static org.eclipse.emf.compare.Comparisoncompare(CDOView leftView, CDOView rightView, CDOView[] originView, java.util.Set<CDOID> ids)static org.eclipse.emf.compare.Comparisoncompare(CDOView leftView, CDOView rightView, CDOView[] originView, java.util.Set<CDOID> ids, CDOViewOpener viewOpener)static org.eclipse.emf.compare.Comparisoncompare(CDOView leftView, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener)Takes aview/transactionand returnsmatchesonly for the changed elements of the entire content tree of itsroot resource.static org.eclipse.emf.compare.Comparisoncompare(org.eclipse.emf.compare.scope.IComparisonScope scope)static org.eclipse.emf.compare.ComparisoncompareUncommittedChanges(CDOTransaction transaction)static org.eclipse.emf.compare.ComparisoncompareUncommittedChanges(CDOTransaction transaction, CDOViewOpener viewOpener)
 
- 
- 
- 
Field Detail- 
DEFAULT_VIEW_OPENERpublic static final CDOViewOpener DEFAULT_VIEW_OPENER - Since:
- 4.3
 
 
- 
 - 
Method Detail- 
comparepublic static org.eclipse.emf.compare.Comparison compare(org.eclipse.emf.compare.scope.IComparisonScope scope) 
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOObject left, CDOView rightView, CDOView[] originView) Takes an arbitraryobject(includingresource nodes) and returnsmatchesfor all elements of itscontent tree. This scope has the advantage that the comparison can be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid.
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOObject left, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener) Takes an arbitraryobject(includingresource nodes) and returnsmatchesfor all elements of itscontent tree. This scope has the advantage that the comparison can be rooted at specific objects that are different from (below of) the root resource. The disadvantage is that all the transitive children of this specific object are matched, whether they differ or not. Major parts of huge repositories can be loaded to the client side easily, if no attention is paid.- Since:
- 4.3
 
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView) Takes aview/transactionand returnsmatchesonly for the changed elements of the entire content tree of itsroot resource. The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container objects are considered as matches, making this scope scale seamlessly with the overall size of a repository.
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, CDOViewOpener viewOpener) Takes aview/transactionand returnsmatchesonly for the changed elements of the entire content tree of itsroot resource. The advantage of this scope is that CDO-specific mechanisms are used to efficiently (remotely) determine the set of changed objects. Only those and their container objects are considered as matches, making this scope scale seamlessly with the overall size of a repository.- Since:
- 4.3
 
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, java.util.Set<CDOID> ids) 
 - 
comparepublic static org.eclipse.emf.compare.Comparison compare(CDOView leftView, CDOView rightView, CDOView[] originView, java.util.Set<CDOID> ids, CDOViewOpener viewOpener) - Since:
- 4.3
 
 - 
compareUncommittedChangespublic static org.eclipse.emf.compare.Comparison compareUncommittedChanges(CDOTransaction transaction) 
 - 
compareUncommittedChangespublic static org.eclipse.emf.compare.Comparison compareUncommittedChanges(CDOTransaction transaction, CDOViewOpener viewOpener) - Since:
- 4.3
 
 
- 
 
-