net.ibizsys.model.util.merger.dataentity.ds.PSDEDataQueryMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.dataentity.ds;
import com.fasterxml.jackson.databind.node.ObjectNode;
import net.ibizsys.model.util.merger.IPSModelListMerger;
import net.ibizsys.model.util.merger.IPSModelMergeContext;
import net.ibizsys.model.util.merger.PSModelMergerFactory;
import static net.ibizsys.model.dataentity.ds.PSDEDataQueryImpl.*;
public class PSDEDataQueryMerger extends net.ibizsys.model.util.merger.dataentity.PSDataEntityObjectMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.dataentity.ds.PSDEDataQueryImpl.class, strFieldName);
return (ret != null)?ret:super.isEnableMergeChild(iPSModelMergeContext, strFieldName);
}
@Override
protected void onMerge(IPSModelMergeContext iPSModelMergeContext, ObjectNode objectNode, ObjectNode mergeObjectNode) throws Exception {
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETALLPSDEDATAQUERYCODES)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.dataentity.ds.IPSDEDataQueryCode.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSDEDATAQUERYCODES);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDEDQMAIN)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.dataentity.ds.IPSDEDQMain.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDEDQMAIN);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDEDATAQUERYINPUT)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.dataentity.ds.IPSDEDataQueryInput.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDEDATAQUERYINPUT);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDEDATAQUERYRETURN)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.dataentity.ds.IPSDEDataQueryReturn.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDEDATAQUERYRETURN);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}