public interface ObjectMerger
| 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 must be disposed of.
|
void |
init(HashMap<String,String> params)
Initialize this instance (called once per transaction).
|
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)
Merges a field.
|
void |
mergeRelations(TmpObject tmpObj1,
TmpObject tmpObj2,
List<TmpObject> relations1,
List<TmpObject> relations2)
Merges relations.
|
void init(HashMap<String,String> params) throws TransactionHandlerException
params - The initialization parameters, provided as
name/value pairs (both String).TransactionHandlerException - if a failure occurred.void mergeField(TmpObject tmpObj1, TmpObject tmpObj2, String 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.name - 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.)void mergeRelations(TmpObject tmpObj1, TmpObject tmpObj2, List<TmpObject> relations1, List<TmpObject> relations2)
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.relations1 - List of all relations of the first
object (as TmpObject instances).relations2 - List of all relations of the second
object (as TmpObject instances).boolean areDuplicates(TmpObject relation1, TmpObject relation2)
relation1 - The first relation.relation2 - The second relation.boolean isAllowedToAdd(TmpObject tmpObj)
tmpObj - The object.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}