for (Map.Entry<String, Property> changesEntry : changes.getMap().entrySet()) {
String changesPropertyName = changesEntry.getKey();
Property changesProperty = changesEntry.getValue();
if (changesProperty instanceof PropertySimple) {
PropertySimple changesPropertySimple = (PropertySimple) changesProperty;
if ((changesPropertySimple.getOverride() == null) || (!changesPropertySimple.getOverride())) {
continue;
}
PropertySimple basePropertySimple = (PropertySimple) base.get(changesPropertyName);
if (basePropertySimple == null) {
basePropertySimple = new PropertySimple(changesPropertyName, changesPropertySimple.getStringValue());
base.put(basePropertySimple);
} else {
basePropertySimple.setStringValue(changesPropertySimple.getStringValue());
}
} else if (changesProperty instanceof PropertyMap) {
PropertyMap changesPropertyMap = (PropertyMap) changesProperty;
PropertyMap basePropertyMap = (PropertyMap) base.get(changesPropertyName);
if (basePropertyMap == null) {