this.recordData = recordData;   Object[] objs = new Object[subObjectsV.size()]; subObjectsV.copyInto(objs); for (int i=0; i < objs.length; i++) { if (objs[i] instanceof Field)	{ Field field = (Field)objs[i]; VDBFieldData fieldData = field.getFieldData(); VDBFieldData newFieldData = recordData.getField(fieldData.getName()); if (newFieldData!=null) { field.fieldData=newFieldData; } else { removeLink((Linkable)field); field.destroy(); } } }
setRecordData(recordData);
public boolean morph(java.lang.String newType) {	changedFields.clear();		//	copies VDBData	VDBRecordData recordData = VDBData.morphVDBRecordData(				DataProvider.getInstance().getDbdDB(), getRecordData(), newType, getName());					if (recordData==null) {		Console.getInstance().println("o) Interal error: failed to morph record "+getName()+" ("+getType()+")!");		return false;	}					   		this.recordData = recordData;		//	fix object links	Object[] objs = new Object[subObjectsV.size()];	subObjectsV.copyInto(objs);	for (int i=0; i < objs.length; i++) {		if (objs[i] instanceof Field)	{			Field field = (Field)objs[i];			VDBFieldData fieldData = field.getFieldData();			VDBFieldData newFieldData = recordData.getField(fieldData.getName());			if (newFieldData!=null) {				field.fieldData=newFieldData;			} else {				removeLink((Linkable)field);					field.destroy();	// this also adds an undo action (FieldValueChanged)			}		}	}		return true;}