/** * INTERNAL: * Build and return a database row built with the values from * the specified attribute value. */ protected AbstractRecord buildRowFromAggregateWithChangeRecord(ChangeRecord changeRecord, ObjectChangeSet objectChangeSet, AbstractSession session) throws DescriptorException { return buildRowFromAggregateWithChangeRecord(changeRecord, objectChangeSet, session, false); }
/** * INTERNAL: * Get the attribute value from the object and add the appropriate * values to the specified database row. */ public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord databaseRow, AbstractSession session) throws DescriptorException { if (isReadOnly()) { return; } AbstractRecord targetRow = buildRowFromAggregateWithChangeRecord(changeRecord, (ObjectChangeSet)((AggregateChangeRecord)changeRecord).getChangedObject(), session); for (Enumeration stream = targetRow.keys(); stream.hasMoreElements();) { DatabaseField field = (DatabaseField)stream.nextElement(); Object value = targetRow.get(field); databaseRow.add(field, value); } }