public class DefaultComparisonUtils extends Object implements ComparisonUtils
Modifier and Type | Class and Description |
---|---|
static class |
DefaultComparisonUtils.EquivalentObjectSeeker |
Constructor and Description |
---|
DefaultComparisonUtils() |
Modifier and Type | Method and Description |
---|---|
void |
compareCollections(Collection<? extends DbObject> leftCollection,
Collection<? extends DbObject> rightCollection,
DiffContext ctx)
Compare collections of
DbObject s using their DbObject.diff(DbObject, DiffContext) method. |
void |
compareSimple(DbProperty leftProperty,
DbProperty rightProperty,
DiffContext ctx)
Compare two 'simple' (i.e.
|
void |
compareSimpleCollections(DbProperty leftProp,
DbProperty rightProp,
DiffContext ctx)
Compare two collections.
|
void |
compareSimpleOrderedLists(DbProperty refProp,
DbProperty targetProp,
DiffContext ctx)
Compare two
List s of 'simple' (i.e. |
List<DbObject> |
findEquivalentObjects(DbObject rootObject,
DbObject objToMatch) |
public List<DbObject> findEquivalentObjects(DbObject rootObject, DbObject objToMatch)
findEquivalentObjects
in interface ComparisonUtils
public void compareSimpleOrderedLists(DbProperty refProp, DbProperty targetProp, DiffContext ctx)
ComparisonUtils
List
s of 'simple' (i.e. non-DbObject
) objects. Ordering
is significant - if an element E appears in both collections but at different indexes
then it is not considered to be the same item.compareSimpleOrderedLists
in interface ComparisonUtils
refProp
- DbPropertytargetProp
- DbPropertyctx
- DiffContextpublic void compareSimpleCollections(DbProperty leftProp, DbProperty rightProp, DiffContext ctx)
ComparisonUtils
ComparisonUtils.compareSimpleOrderedLists(DbProperty, DbProperty, DiffContext)
except that this method operates on Collection
s and order (and cardinality) is not important. If
an element E from the reference collection appears one or more times at any position in the target collection
then that element is said to be in both with no difference
.compareSimpleCollections
in interface ComparisonUtils
leftProp
- DbPropertyrightProp
- DbPropertyctx
- - contextpublic void compareCollections(Collection<? extends DbObject> leftCollection, Collection<? extends DbObject> rightCollection, DiffContext ctx)
ComparisonUtils
DbObject
s using their DbObject.diff(DbObject, DiffContext)
method.compareCollections
in interface ComparisonUtils
ctx
- - contextpublic void compareSimple(DbProperty leftProperty, DbProperty rightProperty, DiffContext ctx)
ComparisonUtils
DbObject
) objects using their Object.equals(Object)
method
to decide if there is a difference.compareSimple
in interface ComparisonUtils
leftProperty
- DbPropertyrightProperty
- DbPropertyctx
- - contextCopyright © 2005–2017 Alfresco Software. All rights reserved.