}
// start iterating all copy's properties
for (Iterator iterInstanceProperties = copy.getInstanceProperties().iterator();
iterInstanceProperties.hasNext();) {
SDOProperty eachProperty = (SDOProperty)iterInstanceProperties.next();
boolean isSet = isSet(dataObject, eachProperty, cs);
if (isSet) {
Object o = getValue(dataObject, eachProperty, cs);
if (eachProperty.getType().isDataType()) {
if (!eachProperty.getType().isChangeSummaryType()) {
/**
* ChangeSummaries must be cleared with logging set to the original state without creating oldSettings.
* The logging flag from the original will be set on the copy after this copy call completes
* and gets set on its container.
* The cs is off by default in the copy object.
* updateSequence flag is false - we will populate the sequence in order after subtree creation
*/
copy.setInternal(eachProperty, o, false);
}
} else {
// case matrix for containment and opposite combinations
// cont=false, opp=false -> unidirectional
// cont=false, opp=true -> bidirectional
// cont=true, opp=false -> normal containment
// cont=true, opp=true -> bidirectional
if (eachProperty.isContainment()) {
// process containment properties (normal, half of bidirectionals)
copyContainmentPropertyValue(copy, eachProperty, o, doMap, ncPropMap, cs);
} else {
// copy non-containment do (not properties (unidirectional, half of bidirectionals))
//copyPropertyValue(dataObject, copy, eachProperty, o, copyRoot, doMap);