public class BasicMerger extends Object implements ObjectMerger
| Constructor and Description |
|---|
BasicMerger() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areDuplicates(TmpObject relation1,
TmpObject relation2)
Tests if two relations should be considered duplicates,
indicating that one of them can be disposed of.
|
void |
init(HashMap<String,String> params)
Initialize this instance.
|
boolean |
isAllowedToAdd(TmpObject tmpObj)
Tests if this object should be added to the persistent cloud
when not present already.
|
void |
mergeField(TmpObject tmpObj1,
TmpObject tmpObj2,
String name)
Merge a field.
|
void |
mergeRelations(TmpObject tmpObj1,
TmpObject tmpObj2,
List<TmpObject> relations1,
List<TmpObject> relations2)
Merge relations.
|
public void init(HashMap<String,String> params)
init in interface ObjectMergerparams - The initialization parameters, provided as
name/value pairs (both String).public void mergeField(TmpObject tmpObj1, TmpObject tmpObj2, String name)
mergeField in interface ObjectMergername - The name of the field.
(Note: "number" and "owner" are not considered fields in this context,
so this method will not be called with these values for name.)tmpObj1 - The first object to be merged. This will hold
the resulting merged object afterwards.tmpObj2 - The second object. this object must be deleted
afterwards.public void mergeRelations(TmpObject tmpObj1, TmpObject tmpObj2, List<TmpObject> relations1, List<TmpObject> relations2)
mergeRelations in interface ObjectMergertmpObj1 - The first object to be merged. This will hold
the resulting merged object afterwards.tmpObj2 - The second object. this object must be deleted
afterwards.relations1 - List of all relations of the first object.relations2 - List of all relations of the second object.public boolean areDuplicates(TmpObject relation1, TmpObject relation2)
areDuplicates in interface ObjectMergerrelation1 - The first relation.relation2 - The second relation.public boolean isAllowedToAdd(TmpObject tmpObj)
isAllowedToAdd in interface ObjectMergertmpObj - The object.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}