net.ibizsys.model.util.merger.ba.PSSysBDTableMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.ba;
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.ba.PSSysBDTableImpl.*;
public class PSSysBDTableMerger extends net.ibizsys.model.util.merger.ba.PSSysBDSchemeObjectMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.ba.PSSysBDTableImpl.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_GETALLPSSYSBDCOLSETS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.ba.IPSSysBDColSet.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSSYSBDCOLSETS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETALLPSSYSBDCOLUMNS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.ba.IPSSysBDColumn.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSSYSBDCOLUMNS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETMAJORPSSYSBDTABLERSS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.ba.IPSSysBDTableRS.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETMAJORPSSYSBDTABLERSS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETMINORPSSYSBDTABLERSS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.ba.IPSSysBDTableRS.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETMINORPSSYSBDTABLERSS);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}