Class EntityMergeHooker
java.lang.Object
net.datenwerke.rs.utils.entitymerge.service.hooker.EntityMergeHooker
- All Implemented Interfaces:
Hook,EntityMergeHook
- Direct Known Subclasses:
DashboardDefaultMergeHooker,DatasinkDefaultMergeHooker,DatasourceDefaultMergeHooker,FileServerDefaultMergeHooker,ReportDefaultMergeHooker
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EntityMergeHooker
-
-
Method Details
-
consumes
Evaluates if the hook should apply to the supplied objects. Should only return true if both are of type targetClazz- Specified by:
consumesin interfaceEntityMergeHook- Parameters:
oldInstance- the object to be mergednewInstance- the object with the target values- Returns:
- true if merge is possible otherwise false
-
mergeEntity
Description copied from interface:EntityMergeHookPerforms the merge of two entities- Specified by:
mergeEntityin interfaceEntityMergeHook- Parameters:
oldInstance- the object to be mergednewInstance- the object with the target values- Throws:
IllegalAccessException- if the merging of fields failed
-