}
firePropertyChange(EOAttribute.PROTOTYPE, oldPrototype, _prototype);
if (prototypeNameChanged && _updateFromPrototype) {
for (int propertyNum = 0; propertyNum < PROTOTYPED_PROPERTIES.length; propertyNum++) {
String propertyName = PROTOTYPED_PROPERTIES[propertyNum];
IKey propertyKey = EOAttribute.getPropertyKey(propertyName);
Object oldValue = oldValues.get(propertyName);
Object newPrototypeValue = _prototype != null ? propertyKey.getValue(_prototype) : oldValue;
Object newValue;
if (AbstractEOArgument.NAME.equals(propertyName)) {
newValue = oldValue;
}
else if (AbstractEOArgument.COLUMN_NAME.equals(propertyName) && oldValue != null) {
newValue = oldValue;
}
else {
newValue = newPrototypeValue;
}
//System.out.println("EOAttribute.setPrototype: " + propertyName + "," + newValue + "," + oldValue + " (" + wasPrototyped + ")");
propertyKey.setValue(this, newValue);
firePropertyChange(propertyName, oldValue, newValue);
}
//Q: The value of DataType is probably going to change underneath us as we iterate and if it happens to end up back at what we started with it may not get updated
// so we pass a null to force an update of the UI
updateDataType(null);