net.ibizsys.model.util.merger.control.chart.PSDEChartMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.control.chart;
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.control.chart.PSDEChartImpl.*;
public class PSDEChartMerger extends net.ibizsys.model.util.merger.control.chart.PSChartMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.control.chart.PSDEChartImpl.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_GETPSCHARTCOORDINATESYSTEMS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.chart.IPSChartCoordinateSystem.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSCHARTCOORDINATESYSTEMS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDECHARTLEGEND)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.chart.IPSDEChartLegend.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDECHARTLEGEND);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDECHARTSERIESES)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.chart.IPSDEChartSeries.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDECHARTSERIESES);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDECHARTTITLE)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.chart.IPSDEChartTitle.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDECHARTTITLE);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}